IALSA / ialsa-2016-amsterdam

Multi-study and multivariate evaluation of healthy life expectancy (HLE): An IALSA workshop on multistate modeling using R
GNU General Public License v2.0
0 stars 0 forks source link

Day 2 : Model Modifications #35

Open andkov opened 8 years ago

andkov commented 8 years ago

Modification 1

During the morning discussion we have identified the following model to be tested. Either model A or B can be modified in this way, however we start with model B.

The msm call should be modified in the following way:

The linking of the covariates to the specific transition is implemented in the covariates argument of the msm function:

covariates = list(
"1-2" ~  = covariates,
"2-1" `~ = age,
...
)
andkov commented 8 years ago

image

image

andkov commented 8 years ago

Results for Modification 1

The first modification of models has been estimated : html (more source code) + pdf (less source code):

Form specification ( model B)

# transition matrix
Q <- rbind( c(0, q, 0, q), 
            c(q, 0, q, q),
            c(0, 0, 0, q), 
            c(0, 0, 0, 0)) 
# misclassification matrix
E <- rbind( c( 0,  0,  0, 0),  
            c( 0,  0, .1, 0), 
            c( 0,  0,  0, 0),
            c( 0,  0,  0, 0) )

Covariate specifications:

Model 1:

# Forward transitions:
  "1-2"       = "age + male + educat"
  "2-3"       = "age + male + educat"
# Backward transitions:
  "2-1"       = "age"
# Death transitions: 
  "1-4"       = "age + male"
  "2-4"       = "age + male"
  "3-4"       = "age + male"

Model 2 :

# Forward transitions:
  "1-2"       = "age + age_bl + male + educat"
  "2-3"       = "age + age_bl + male + educat"
# Backward transitions:
  "2-1"       = "age + age_bl"
# Death transitions: 
  "1-4"       = "age + age_bl + male"
  "2-4"       = "age + age_bl + male"
  "3-4"       = "age + age_bl + male"

@GracielaMuniz @smhofer

andkov commented 8 years ago

Modification 2

In order to match the tables from Marioni it was decided to transform education into two dummy variables that would encode comparison between education groups.

The new model fitting in msm call should be modified in the following way:

The construction of the dummies for education:

# ref  D1  D2
#  -1  0   0
#  0   1   0
#  1   0   1

image

andkov commented 8 years ago

Results from Modification 2

The second modification of models has been estimated :

Form specification ( model B)

# transition matrix
Q <- rbind( c(0, q, 0, q), 
            c(q, 0, q, q),
            c(0, 0, 0, q), 
            c(0, 0, 0, 0)) 
# misclassification matrix
E <- rbind( c( 0,  0,  0, 0),  
            c( 0,  0, .1, 0), 
            c( 0,  0,  0, 0),
            c( 0,  0,  0, 0) )

Covariate specifications:

Model 1:

# Forward transitions:
  "1-2"       = "age + male  + edu_low_med + edu_low_high"
  "2-3"       = "age + male  + edu_low_med + edu_low_high"
# Backward transitions:
  "2-1"       = "age"
# Death transitions: 
  "1-4"       = "age + male"
  "2-4"       = "age + male"
  "3-4"       = "age + male"

Model 2 :

# Forward transitions:
  "1-2"       = "age + male  + edu_low_med + edu_low_high"
  "2-3"       = "age + male  + edu_low_med + edu_low_high"
# Backward transitions:
  "2-1"       = "age"
# Death transitions: 
  "1-4"       = "age + male + edu_low_med + edu_low_high"
  "2-4"       = "age + male + edu_low_med + edu_low_high"
  "3-4"       = "age + male + edu_low_med + edu_low_high"

@GracielaMuniz @smhofer @annierobi