search for: data2fd

Displaying 9 results from an estimated 9 matches for "data2fd".

Did you mean: data2
2010 Mar 26
0
fda Data2fd
...bject where both domain and range are matrices. My erroneous attempts are below. Can you suggest corrections? library(fda) domain<-matrix(c(1,1.1,1.2,2,2.1,2.1,3,3.1,3.2,4,4.1,4.2,5,5.1,5.2), nrow = 5, ncol=3, byrow=TRUE) range<-sin(domain)+matrix(rnorm(15,sd=0.1),nrow=5, ncol=3) myfd<-Data2fd(argvals=domain, y=range) #Error in create.bspline.basis(argvals) : # rangeval is not a vector; class(rangeval) = matrix mybasis<-create.bspline.basis(rangeval=c(0.5,5.2), nbasis=6) myfd<-Data2fd(argvals=domain, y=range,basisobj=mybasis) #Error in smooth.basis(argvals, y, fdP, wtvec = w,...
2008 Nov 07
1
Problems with packages fda and splines (PR#13263)
...es) > predict.bs Erreur : objet "predict.bs" non trouv? # in english: object "predict.bs" not found Also, I cannot track the package splines on the CRAN website. Why is that? 2) Package fda: it does not handle at all NAs although promising to. I have met this problem using Data2fd and project.basis as well. An example script is enclosed at the end of this email. Can you help on this ? Thanks, David %%%%%%%%%%%%%%%%%%%%%%%%%%%%% R SCRIPT for Data2fd with NAs %%%%%%%%%%%%%%%%%%%%%%%%%%%%% > library(fda) > y=runif(10) > x=Data2fd(1:10,y) # creates functional obje...
2005 Jun 07
0
Smooth monotone estimation on R
...n to our data which correspond to a non-linear function. We follow the example posted on the web, but in our case it did not apply. We always get a straight line in response. Which parameters we should change. ind.basis = create.bspline.basis(c(min(time),max(time)),nbasis=38,norder=4) Wfdob = data2fd(rep(0,length(time)),time,ind.basis) fd = data2fd(alphaest,time,ind.basis) solution= smooth.monotone(time,alphaest,Wfdobj=Wfdob,lambda=0.1, conv=0.01) Alpha = solution$beta[1]+solution$beta[2]*eval.monfd(time,solution$Wfdobj) plot(Alpha) Thanks a lot. Best, Rafa [[alternative HTML v...
2020 Oct 02
1
help in R code
...never i put phat=24 i.e want to predict each 24 hours its give the results in the form of NA. the code is given below fdata<- function(mat){? nb = 27 # number of basis functions for the data? fbf = create.fourier.basis(rangeval=c(0,1), nbasis=nb) # basis for data? args=seq(0,1,length=24)? fdata1=Data2fd(args,y=t(mat),fbf) # functions generated from discretized y? return(fdata1)}prediction.ffpe = function(fdata1){? n = ncol(fdata1$coef)? D = nrow(fdata1$coef)? #center the data? #mu = mean.fd(fdata1)? data = center.fd(fdata1)? #ffpe = fFPE(fdata1, Pmax=10)? #p.hat = ffpe[2] #order of the model? d.ha...
2020 Oct 04
1
Help in R code
...utphat=24 i.e want to predict each 24 hours its give the results in the form ofNA. the code is given below ? fdata<- function(mat){ ? nb = 27 # number of basis functions for the data ? fbf = create.fourier.basis(rangeval=c(0,1), nbasis=nb) #basis for data ? args=seq(0,1,length=24) ? fdata1=Data2fd(args,y=t(mat),fbf) # functions generatedfrom discretized y ? return(fdata1) } prediction.ffpe = function(fdata1){ ? n = ncol(fdata1$coef) ? D = nrow(fdata1$coef) ? #center the data ? #mu = mean.fd(fdata1) ? data = center.fd(fdata1) ? #ffpe = fFPE(fdata1, Pmax=10) ? #p.hat = ffpe[2] #order...
2020 Oct 18
1
Help in R code
...I use functional final prediction error for the selection of the parameters on the VAR model(4) Using VAR for the analysis and forecasting .(1)?nb = 23 # number of basis functions for the data? fbf = create.fourier.basis(rangeval=c(0,1), nbasis=nb) # basis for data? args=seq(0,1,length=24)? fdata1=Data2fd(args,y=t(mat),fbf) # functions generated from discretized y(2)?ffpe = fFPE(fdata1, Pmax=10)? d.hat = ffpe[1] #order of the model? p.hat = ffpe[2] #lag of the model (3) n = ncol(fdata1$coef)? D = nrow(fdata1$coef)? #center the data? mu = mean.fd(fdata1)? data = center.fd(fdata1)? #fPCA? fpca = pca.f...
2020 Oct 14
1
Help in Coding
...I use functional final prediction error for the selection of the parameters on the VAR model(4) Using VAR for the analysis and forecasting .(1)?nb = 23 # number of basis functions for the data? fbf = create.fourier.basis(rangeval=c(0,1), nbasis=nb) # basis for data? args=seq(0,1,length=24)? fdata1=Data2fd(args,y=t(mat),fbf) # functions generated from discretized y(2)?ffpe = fFPE(fdata1, Pmax=10)? d.hat = ffpe[1] #order of the model? p.hat = ffpe[2] #lag of the model (3) n = ncol(fdata1$coef)? D = nrow(fdata1$coef)? #center the data? mu = mean.fd(fdata1)? data = center.fd(fdata1)? #fPCA? fpca = pca.f...
2012 Aug 08
1
dimnames in array
...ike to ask "How can I get the names of the second dimension of the array(data11a) to have length "2" ? It seems to me that the analysis will run if I can make this array have the correct length dimnames I thank you for your help. ____________ * fd.data11a = data11a DEfd11a = Data2fd(fd.data11a, times, bbasis, fdnames=list(NULL,NULL,varnames)) profile11a.obj=LS.setup(pars,DEfd11a$coefs,fhn,basisvals=bbasis,lambda,fd.obj=NULL, more=NULL,data=data11a,weights=NULL,times=times,quadrature=NULL,eps=1e-6, posproc=FALSE,poslik=FALSE,discrete=FALSE,names=NULL,sparse=FALSE) lik...
2009 Jan 17
2
DierckxSpline segfault
I've just encountered a segfault when using DierckxSpline::percur function. Below is the minimal example which triggers the error: --- library(DierckxSpline) x <- 1:10 y <- rep(0, 10) pspline <- percur(x, y) --- *** caught segfault *** address (nil), cause 'memory not mapped' Traceback: 1: .Fortran("percur", iopt = as.integer(iopt), m = as.integer(m), x =