Commit 2350ad89 authored by Kevin's avatar Kevin

fixed msm-age

parent 90809689
......@@ -31,11 +31,14 @@ df_gose <- readRDS(inputfile) %>%
# translate to msm formatting
tmp <- df_gose %>%
group_by(gupi) %>%
summarize_all(first) %>%
mutate(
Outcomes.DerivedCompositeGOSEDaysPostInjury = config$t_out_msm + .5, # needed to offset
Outcomes.DerivedCompositeGOSE = 99
rbind(
df_gose %>%
group_by(gupi) %>%
summarize_all(first) %>%
mutate(
Outcomes.DerivedCompositeGOSEDaysPostInjury = config$t_out_msm + .5, # needed to offset
Outcomes.DerivedCompositeGOSE = 99
)
) %>%
arrange(gupi, Outcomes.DerivedCompositeGOSEDaysPostInjury) %>%
mutate(
......@@ -71,7 +74,7 @@ fit <- msm(
subject = tmp$gupi,
data = tmp,
obstype = tmp$obstype,
covariates = ~ age,
covariates = ~ Subject.Age,
gen.inits = TRUE,
qmatrix = Q,
censor = 99,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment