functionaldata / tPACE

Testing version of fdapace
Other
31 stars 22 forks source link

Wrong grid used for GetINScores in FPCA.R when outPercent is specified #55

Closed CrossD closed 2 years ago

CrossD commented 3 years ago

A minimal example is below:

library(fdapace)
dat <- readr::read_csv('tmp.csv')
samp <- with(dat, MakeFPCAInputs(name, x, y))
res <- FPCA(samp$Ly, samp$Lt, optns=
            list(useBinnedData='FORCE', numBins=50, outPercent=c(0.01, 0.99)))

The data is here: tmp.csv

It seems there has been quite a few changes for the IN method in both FPCA.R and GetINScores.R. To make the truncation of the domain to work in this step, the time grid needs to be truncObsGrid instead of obsGrid. The minimal example would work if I made this change on line 236 of FPCA.R. I did not create a pull request because I did not extensively test and don't want to introduce incompatibility. The Travis CI seems to be broken, since the last passing commit is 6 months ago.

aegajardo commented 2 years ago

Thanks, this issue was addressed in fdapace version 0.5.8.