data("grwth_data")
# Most simple model
lmmModel(
data = grwth_data,
sample_id = "subject",
time = "Time",
treatment = "Treatment",
tumor_vol = "TumorVolume",
trt_control = "Control",
drug_a = "DrugA",
drug_b = "DrugB",
combination = "Combination"
)
# Changing the last time point of follow-up
lmmModel(
data = grwth_data,
sample_id = "subject",
time = "Time",
treatment = "Treatment",
tumor_vol = "TumorVolume",
trt_control = "Control",
drug_a = "DrugA",
drug_b = "DrugB",
combination = "Combination",
time_end = 21
)
# Adding additional parameters for model fitting
lmmModel(
data = grwth_data,
sample_id = "subject",
time = "Time",
treatment = "Treatment",
tumor_vol = "TumorVolume",
trt_control = "Control",
drug_a = "DrugA",
drug_b = "DrugB",
combination = "Combination",
# Adding variance function to represent a different variance per subject
weights = nlme::varIdent(form = ~1|SampleID),
# Specifiying control values for lme Fit (useful when convergence problems appear)
control = nlme::lmeControl(maxIter = 1000, msMaxIter = 1000, niterEM = 100, msMaxEval = 1000)
)
# Fit a model specifying a different variance per Time
lmmModel(
data = grwth_data,
sample_id = "subject",
time = "Time",
treatment = "Treatment",
tumor_vol = "TumorVolume",
trt_control = "Control",
drug_a = "DrugA",
drug_b = "DrugB",
combination = "Combination",
# Adding variance function to represent a different variance per Time
weights = nlme::varIdent(form = ~1|Time)
)
# Fit a model using the Gompertz model
lmmModel(
data = grwth_data,
grwth_model = "gompertz", # Selecting Gompertz model
start_values = "selfStart", # Using self-starting values
sample_id = "subject",
time = "Time",
treatment = "Treatment",
tumor_vol = "TumorVolume",
trt_control = "Control",
drug_a = "DrugA",
drug_b = "DrugB",
combination = "Combination"
)
Run the code above in your browser using DataLab