[R] Functional data analysis - problems with smoothing
spencerg
spencer.graves at prodsyse.com
Fri Oct 23 10:11:49 CEST 2009
Hi, Ben:
Which chapter in which of Ramsay's books?
For his most recent book ("Functional Data Analysis with R and
Matlab", with Giles Hooker and your's truly), there is one script file
for each chapter with names like "fdarm-ch01.R", ... "fdarm-ch11.R".
These script files "reproduce nearly all the examples in the book
including all but one of the 76 figures" (according to what I wrote for
back cover). The preface tells you how to find those script files:
system.file('scripts', package='fda')
[1] "c:/Users/sgraves/R/R-2.9.1/library/fda/scripts"
Obviously, the answer is the path on my installation; the answer
you get should tell you where to look on the computer (and start-up
sequence) you are using.
This same scripts directory contains similar partial scripts for
"Functional Data Analysis" and "Applied Functional Data Analysis". If
you'd care to send me updates to any of those partial scripts, I can see
that they are included in the package to make those examples easier for
others in the future.
Hope this helps.
Spencer Graves
Peter Ehlers wrote:
> The error message is pretty clear: regardless of what
> *you* think, R says that 'isi' is not numeric.
>
> Are you sure that 'isi' is not a *factor* object?
> I'm willing to bet that it is.
>
> Use str() to check your data.
>
> -Peter Ehlers
>
> Benjamin Cheah wrote:
>> Hi all,
>>
>> I'm having major issues with smoothing my functional data
>>
>> I'm referring to Jim Ramsay's
>> examples in his books. The following error message keeps appearing,
>> despite all my data being numeric.... can anyone kindly offer any
>> suggestions?
>>
>> isi - vector of argument values - i.e. the independent variable of
>> the curves
>> rlz - data array
>> TMSfdPar - functional data parameter.
>>
>>> TMSfdPar = fdPar(TMSbasis, 4, 0.01)
>>> TMSfdsmooth = smooth.basis(isi, rlz, TMSfdPar)
>> Error in smooth.basis(isi, rlz, TMSfdPar) : 'argvals' is not numeric.
>>
>> I don't understand why the error message keeps popping up. I've tried
>> playing around with Jim Ramsay's datasets and I think my data is
>> organised in a similar manner to his, so can't understand what's
>> going on.... oh, the frustration!
>>
>> Thanks in advance,
>>
>> Ben
>> (the amateur R data analyst and statistician.....)
>>
>>
>>
>>
>> __________________________________________________________________________________
>>
>>
>>
>> [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Spencer Graves, PE, PhD
President and Chief Operating Officer
Structure Inspection and Monitoring, Inc.
751 Emerson Ct.
San José, CA 95126
ph: 408-655-4567
More information about the R-help
mailing list