ARpMMEC.sim  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, struc = "ARp", order = 1, typeModel = "Normal", p.cens = NULL, n.cens = NULL, cens.type = "left", nu = NULL )
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 
struc 
Correlation structure. This must be one of 
order 
Order of the autoregressive process. Must be a positive integer value. 
typeModel 

p.cens 
Censoring percentage for the process. Default is 
n.cens 
Censoring level for the process. Default is 
cens.type 

nu 
degrees of freedom for tStudent distibution (nu > 0, maybe noninteger). 
returns list:
cc 
Vector of censoring indicators. 
y_cc 
Vector of responses censoring. 
## Not run: p.cens = 0.1 m = 10 D = matrix(c(0.049,0.001,0.001,0.002),2,2) sigma2 = 0.30 phi = 0.6 beta = c(1,2,1) nj=rep(4,10) tt=rep(1:4,length(nj)) 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,struc="ARp",typeModel="Normal",p.cens=p.cens) y<data$y_cc cc<data$cc ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.