ARpMMEC.est {ARpLMEC}  R Documentation 
This functino fits left, right or intervalar censored mixedeffects linear model, with autoregressive errors of order p
, using the EM algorithm. It returns estimates, standard errors and prediction of future observations.
ARpMMEC.est( y, x, z, tt, cc, nj, Arp = 1, beta0 = NULL, sigma0 = NULL, D0 = NULL, pi0 = NULL, typeModel = "L", cens.type = "left", LI = NULL, LS = NULL, MaxIter = 200, error = 1e04, Prev = FALSE, step = NULL, isubj = NULL, xpre = NULL, zpre = NULL )
y 
Vector 
x 
Design matrix of the fixed effects of order 
z 
Design matrix of the random effects of order 
tt 
Vector 
cc 
Vector of censoring indicators of length 
nj 
Vector 
Arp 
Order of the autoregressive process. Must be a positive integer value. To consider a model uncorrelated use 
beta0 
Initial values for the vector of fixed effects. If it is not indicated it will be provided automatically. Default is 
sigma0 
Initial values for sigma. If it is not indicated it will be provided automatically. Default is 
D0 
Initial values for the covariance matrix for the random effects. If it is not indicated it will be provided automatically. Default is 
pi0 
Initial values for the vector for autoregressive coefficients pi's. If it is not indicated it will be provided automatically. Default is 
typeModel 

cens.type 

LI 
Vector censoring lower limit indicator of length 
LS 
Vector censoring upper limit indicator of length 
MaxIter 
The maximum number of iterations of the EM algorithm. Default is 
error 
The convergence maximum error. Default is 
Prev 
Indicator of the prediction process. Default is 
step 
Number of steps for prediction. Default is 
isubj 
Vector indicator of subject included in the prediction process. Default is 
xpre 
Design matrix of the fixed effects to be predicted. Default is 
zpre 
Design matrix of the random effects to be predicted. Default is 
returns list of class “ARpMMEC”:
FixEffect 
Data frame with: estimate, standars erros and confidence intervals of the fixed effects. 
Sigma2 
Data frame with: estimate, standars erros and confidence intervals of the variance of the white noise process. 
Phi 
Data frame with: estimate, standars erros and confidence intervals of the autoregressive parameters. 
RnEffect 
Data frame with: estimate, standars erros and confidence intervals of the random effects. 
Est 
Vector of parameters estimate (fixed Effects, sigma2, phi, random effects). 
SE 
Vector of the standard errors of (fixed Effects, sigma2, phi, random effects). 
loglik 
Loglikelihood value. 
AIC 
Akaike information criterion. 
BIC 
Bayesian information criterion. 
AICc 
Corrected Akaike information criterion. 
iter 
Number of iterations until convergence. 
MI 
Information matrix 
Prev 
Predicted values (if xpre and zpre is not 
time 
Processing time. 
## Not run: p.cens = 0.1 m = 50 D = matrix(c(0.049,0.001,0.001,0.002),2,2) sigma2 = 0.30 phi = c(0.48,0.2) beta = c(1,2,1) nj=rep(6,50) tt=rep(seq(1:6),50) x<matrix(runif(sum(nj)*length(beta),1,1),sum(nj),length(beta)) z<matrix(runif(sum(nj)*dim(D)[1],1,1),sum(nj),dim(D)[1]) data=ARpMMEC.sim(m,x,z,tt,nj,beta,sigma2,D,phi,p.cens) attach(data, warn.conflicts = F) Arp = 2 teste1=ARpMMEC.est(y_cc,x,z,tt,cc,nj,Arp,MaxIter = 10) xx=matrix(runif(6*length(beta),1,1),6,length(beta)) zz=matrix(runif(6*dim(D)[1],1,1),6,dim(D)[1]) isubj=c(1,4,5) teste2=ARpMMEC.est(y_cc,x,z,tt,cc,nj,Arp,MaxIter=10,Prev=TRUE,step=2,isubj=isubj,xpre=xx,zpre=zz) teste2$Prev ## End(Not run)