View source: R/QoLSEM_longitudinal.R
| QoLSEM_longitudinal | R Documentation |
This function is the generalisation of QoLSEM function where sereval visits/measurement times are considered
in the follow-up of patients (statistic units).
QoLSEM_longitudinal(data, col_y, col_X1, col_X2, col_Ty = 0, col_T1 = 0, col_T2 = 0, col_visit = 0)
data |
(dataframe/matrix) dataset |
col_y |
(interger) index of the colum associated with the response variable |
col_X1 |
(vector) index of the colum of variables for X1, by default =0 for without covaraites |
col_X2 |
(vector) index of the colum of variables for X2, by default =0 for without covaraites |
col_Ty |
(interger/vector) index of the colum of covariates for y, by default =0 for without covaraites |
col_T1 |
(interger/vector) index of the colum of covariates for X1, by default =0 for without covaraites |
col_T2 |
(interger/vector) index of the colum of covariates for X2, by default =0 for without covaraites |
col_visit |
(interger) index of the colum associated with the visits, by default =0 if only one visit |
A list with the following elements:
output.datamatrix of data including predicted factors.
Cmatrix of the 2 estimated parameters c1 and c2, rows corresponds to the visits/datasets
A1matrix of parameters associated with the factor in the first variable block
A2matrix of parameters associated with the factor in the second variable block
Dmatrix of parameters associated with the covariates in the structural equation
D1matrix of parameters associated with the covariates in block 1
D2matrix of parameters associated with the covariates in block 2
output.sigma2matrix of variance parameters
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
## test avec N>1
test20 <- generation.QoLSEM(N=20,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=7,sigma.X2=5)
## Estimation step
simu20 <- QoLSEM_longitudinal(data=test20,
col_y=4,
col_X1=seq(5,5+6),
col_X2=seq(5+7,5+7+11),
col_Ty=0,
col_T1=0,
col_T2=0,
col_visit=1)
## Estimation of variance parameters for the 20 visits
simu20$output.sigma2
## Estimation of intercept parameters for the 20 visits associated with block 1
## Only the intercept is considered because no covariate is taking into account
simu20$output.D1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.