search for: nbasis

Displaying 12 results from an estimated 12 matches for "nbasis".

Did you mean: basis
2011 Apr 20
3
Help needed!
...the resource code of the package "ssfcov". The resource code is as following. I cannot find the resource code of the function "myss2d" anywhere in the package. Can anyone give me a hint how to find it in the package. Thanks a lot!!bv > ssfcov function (time, x, subject, nbasis = 5, centered = FALSE, noDiag = TRUE) { if (!centered) { fit <- smooth.spline(time, x) x <- x - fitted(fit) } gg <- NULL for (zz in unique(subject)) { if (sum(subject == zz) > 1) { tt <- time[subject == zz] xx &...
2008 Dec 16
2
"could not find function" error in "R CMD check"
...s installing data files preparing package fda for lazy loading Loading required package: splines Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric Error in basisfd(type = type, rangeval = rangeval, nbasis = nbasis, params = params, : could not find function "use.proper.basis" Error: unable to load R code in package 'fda' Execution halted make[2]: *** [lazyload] Error 1 make[1]: *** [all] Error 2 make: *** [pkg-fda] Error 2 *** Installation of fda failed *** Removing 'D:/sp...
2020 Oct 02
1
help in R code
...forecasted value for all 23hours? when i put phat=23, but whenever 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 = fFP...
2020 Oct 04
1
Help in R code
...sted value for all 23hours? when i put phat=23, but whenever i putphat=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(fd...
2020 Oct 18
1
Help in R code
...nctional principle components and the corresponding scores(3) 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 =...
2020 Oct 14
1
Help in Coding
...nctional principle components and the corresponding scores(3) 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 =...
2005 Jun 07
0
Smooth monotone estimation on R
...ly the smooth monotone function 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. Bes...
2010 Mar 26
0
fda Data2fd
...,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, fdnames = fdnames) : # 'y' is not the same length as 'argvals'. thank you eal
2024 Feb 29
1
R 4.3.3 is released
...dary cases where a or b or both are 0, fixing PR#18672 thanks to Michael Fay. * pmatch(x, table) for large table, also called for data frame row selection, dfrm[nm, ], is now interruptible, fixing PR#18656. * predict(<rank-deficient lm>, newdata=*) fix computing of nbasis, see Russ Lenth's comment 29 in PR#16158. * Added a work-around for a bug in macOS 14.3.1 and higher which prevents R plots in the Quartz Cocoa device from updating on screen. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plad...
2024 Feb 29
1
R 4.3.3 is released
...dary cases where a or b or both are 0, fixing PR#18672 thanks to Michael Fay. * pmatch(x, table) for large table, also called for data frame row selection, dfrm[nm, ], is now interruptible, fixing PR#18656. * predict(<rank-deficient lm>, newdata=*) fix computing of nbasis, see Russ Lenth's comment 29 in PR#16158. * Added a work-around for a bug in macOS 14.3.1 and higher which prevents R plots in the Quartz Cocoa device from updating on screen. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plad...
2024 Feb 29
1
R 4.3.3 is released
...dary cases where a or b or both are 0, fixing PR#18672 thanks to Michael Fay. * pmatch(x, table) for large table, also called for data frame row selection, dfrm[nm, ], is now interruptible, fixing PR#18656. * predict(<rank-deficient lm>, newdata=*) fix computing of nbasis, see Russ Lenth's comment 29 in PR#16158. * Added a work-around for a bug in macOS 14.3.1 and higher which prevents R plots in the Quartz Cocoa device from updating on screen. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plad...
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 =