Specify a FunFEM method
lcMethodFunFEM(
response,
time = getOption("latrend.time"),
id = getOption("latrend.id"),
nClusters = 2,
basis = function(time) fda::create.bspline.basis(time, nbasis = 10, norder = 4),
...
)
The name of the response variable.
The name of the time variable.
The name of the trajectory identifier variable.
The number of clusters to estimate.
The basis function. By default, a 3rd-order B-spline with 10 breaks is used.
Arguments passed to funFEM::funFEM. The following external arguments are ignored: fd, K, disp, graph.
bouveyron2015funfemlatrend
Other lcMethod implementations:
getArgumentDefaults()
,
getArgumentExclusions()
,
lcMethod-class
,
lcMethodAkmedoids
,
lcMethodCrimCV
,
lcMethodDtwclust
,
lcMethodFeature
,
lcMethodFunction
,
lcMethodGCKM
,
lcMethodKML
,
lcMethodLMKM
,
lcMethodLcmmGBTM
,
lcMethodLcmmGMM
,
lcMethodMclustLLPA
,
lcMethodMixAK_GLMM
,
lcMethodMixtoolsGMM
,
lcMethodMixtoolsNPRM
,
lcMethodRandom
,
lcMethodStratify
data(latrendData)
if (require("funFEM") && require("fda")) {
method <- lcMethodFunFEM("Y", id = "Id", time = "Time", nClusters = 3)
model <- latrend(method, latrendData)
method <- lcMethodFunFEM("Y",
basis = function(time) {
create.bspline.basis(time, nbasis = 10, norder = 4)
}
)
}
#> Loading required package: funFEM
#> Loading required package: MASS
#> Loading required package: fda
#> Loading required package: splines
#> Loading required package: fds
#> Loading required package: rainbow
#> Loading required package: pcaPP
#> Loading required package: RCurl
#> Loading required package: deSolve
#>
#> Attaching package: ‘fda’
#> The following object is masked from ‘package:lattice’:
#>
#> melanoma
#> The following object is masked from ‘package:graphics’:
#>
#> matplot
#> Loading required package: elasticnet
#> Loading required package: lars
#> Loaded lars 1.3