ARpMMEC.sim {ARpLMEC}  R Documentation 
This function simulates a censored response variable with autoregressive errors of order p
, with mixed effect and a established censoring rate. This function returns the censoring vector and censored response vector.
ARpMMEC.sim( m, x = NULL, z = NULL, tt = NULL, nj, beta, sigmae, D, phi, p.cens = 0, cens.type = "left" )
m 
Number of individuals 
x 
Design matrix of the fixed effects of order 
z 
Design matrix of the random effects of order 
tt 
Vector 
nj 
Vector 
beta 
Vector of values fixed effects. 
sigmae 
It's the value for sigma. 
D 
Covariance Matrix for the random effects. 
phi 
Vector of length 
p.cens 
Censoring level for the process. Default is 
cens.type 

returns list:
cc 
Vector of censoring indicators. 
y_cc 
Vector of responses censoring. 
## 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,m) tt=rep(seq(1:6),m) 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) y<data$y_cc cc<data$cc ## End(Not run)