QoLSEM_longitudinal: Estimation of a QoLSEM model at each visit

View source: R/QoLSEM_longitudinal.R

QoLSEM_longitudinalR Documentation

Estimation of a QoLSEM model at each visit

Description

This function is the generalisation of QoLSEM function where sereval visits/measurement times are considered in the follow-up of patients (statistic units).

Usage

QoLSEM_longitudinal(data, col_y, col_X1, col_X2, col_Ty = 0,
  col_T1 = 0, col_T2 = 0, col_visit = 0)

Arguments

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

Value

A list with the following elements:

output.data

matrix of data including predicted factors.

C

matrix of the 2 estimated parameters c1 and c2, rows corresponds to the visits/datasets

A1

matrix of parameters associated with the factor in the first variable block

A2

matrix of parameters associated with the factor in the second variable block

D

matrix 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

output.sigma2

matrix of variance parameters

Author(s)

Antoine Barbieri, Myriam Tami

References

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.

See Also

generation.QoLSEM

Examples

## 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


AntoineBbi/QoLSEM documentation built on May 10, 2022, 6:07 a.m.