estimate.mocca {fdaMocca} | R Documentation |
Model parameter estimation
Description
Function to estimate model parameters by maximizing the observed log likelihood via an EM algorithm. The estimation procedure is based on an algorithm proposed by James and Sugar (2003).
The function is not normally called directly, but rather service routines for mocca
. See the description of the mocca
function for more detailed information of arguments.
Usage
estimate.mocca(data,K=5,q=6,h=2,random=TRUE,B=NULL,svd=TRUE,
use.covariates=FALSE,stand.cov=TRUE,index.cov=NULL,
lambda=1.4e-4,EM.maxit=50, EMstep.tol=1e-8,Mstep.maxit=10,
Mstep.tol=1e-4, EMplot=TRUE,trace=TRUE,n.cores=NULL)
Arguments
data |
a list containing at least five objects (vectors) named as |
K |
number of clusters (default: |
q |
number of B-splines used to describe the individual curves. Evenly spaced knots are used (default: |
h |
a positive integer, parameter vector dimension in low-dimensionality representation of the curves (spline coefficients).
|
random |
|
B |
an |
svd |
|
use.covariates |
|
stand.cov |
|
index.cov |
a vector of indices indicating which covariates should be used when modelling. If |
lambda |
a positive real number, smoothing parameter value to be used when estimating B-spline coefficients. |
EM.maxit |
a positive integer which gives the maximum number of iterations for a EM algorithm (default: EM.maxit=50). |
EMstep.tol |
the tolerance to use within iterative procedure of the EM algorithm (default: EMstep.tol=1e-8). |
Mstep.maxit |
a positive scalar which gives the maximum number of iterations for an inner loop of the parameter estimation in M step (default: Mstep.maxit=20). |
Mstep.tol |
the tolerance to use within iterative procedure to estimate model parameters (default: Mstep.tol=1e-4). |
EMplot |
|
trace |
|
n.cores |
number of cores to be used with parallel computing. |
Value
A list is returned with the following items:
loglik |
the maximized log likelihood value. |
sig2 |
estimated residual variance for the spline coefficients (for the model without covariates), or a vector of the estimated residual variances for the spline coefficients and for the covariates (for the model with covariates). |
conv |
indicates why the EM algorithm terminated: 0: indicates successful completion. 1: indicates that the iteration limit |
iter |
number of iterations of the EM algorithm taken to get convergence. |
score.hist |
a matrix of the succesive values of the scores: residual variances and log likelihood, up until convergence. |
parameters |
a list containing all the estimated parameters: |
vars |
a list containing results from the E step of the algorithm: the posterior probabilities for each subject |
data |
a list containing all the original data plus re-arranged functional data and covariates (if supplied) needed for EM-steps. |
design |
a list of spline basis matrices with and without covariates:
|
initials |
a list of initial settings: |
Author(s)
Per Arnqvist, Natalya Pya Arnqvist, Sara Sjöstedt de Luna
References
James, G.M., Sugar, C.A. (2003). Clustering for sparsely sampled functional data. Journal of the American Statistical Association, 98.462, 397–408.
Arnqvist, P., and Sjöstedt de Luna, S. (2019). Model based functional clustering of varved lake sediments. arXiv preprint arXiv:1904.10265.