QoLSEM | R Documentation |
This function fits a structural equation model for the analysis of the Quality of life data from EORTC questionnaires. The estimation is achieved through the EM algorithm. More details can be found in the article cited reference section.
QoLSEM(y, X1, X2, Ty = NULL, T1 = NULL, T2 = NULL, convergence = 0.001, nb_it = 500, trace = FALSE)
y |
a numeriacl vector of observations of the response variable |
X1 |
matrix of a first block of data associated with the first factor |
X2 |
matrix of a second block of data associated with the second factor |
Ty |
matrix/vecteur of covariable(s) associated with |
T1 |
matrix/vecteur covariable(s) associated with |
T2 |
matrix/vecteur covariable(s) associated with |
convergence |
a numerial scalar denoting the criteria of convergence to stop the iteration; =0.001 by default |
nb_it |
a numerical scalar denoting the maximal number of iterations of the EM algorithm; =500 by default |
trace |
if TRUE, the function shows for each iteration the convergence of algorithm (default=FALSE) |
A list with the following elements:
Factors
matrix of size (nx2) of the predicted factors. The first (reps. second) column is associated with the first (resp. second) factor
C
Vector of 2 scalars corresponding to the estimated parameters c1 and c2
A1
vector of parameters associated with the factor in the first variable block
A2
vector of parameters associated with the factor in the second variable block
D
vector of parameters associated with the covariates in the structural equation
D1
matrix of parameters associated with the covariates in block 1
D2
matrix of parameters associated with the covariates in block 2
estimate_sigma2
vector of variance parameters
Convergence
argument diff
Iteration
Number of iterations until the convergence
Antoine Barbieri, Myriam Tami
Barbieri A, Tami M, Bry X, Azria D, Gourgou S, Mollevi C, Lavergne C. (2018) EM algorithm estimation of a structural equation model for the longitudinal study of the quality of life. Statistics in Medicine. 37(6):1031-1046.
generation.QoLSEM
## generation of a dataset test <- generation.QoLSEM(N=1, I=150, c=as.matrix(c(2,-2)), a1=matrix(c(1:7),nrow=7), a2=matrix(c(1:12),nrow=12), d=c(80), D1=matrix(seq(2,14,2)+70,ncol=7), D2=matrix(seq(2,24,2)+20,ncol=12), sigma.y=10, sigma.X1=10, sigma.X2=10) ## Estimation of the model simu <- QoLSEM(test$y, test$X1, test$X2, Ty=NULL, T1=NULL, T2=NULL, convergence=0.001, nb_it=500, trace=FALSE) ## Predicted subject-speficic factors simu$Factors ## Estimation parameters associated with the intercept of the block 1 simu$D1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.