Hello,
I am trying to simulate from a TTE model I created. However, I keep getting the error message below:
“LoadError: MethodError: no method matching simobstte(::Pumas.FittedPumasModel”
This my model code:
brain_tte_exp_trt_sex = @model begin
@param begin
λ₁ ∈ RealDomain(lower=0)
β_comb ∈ RealDomain(lower=-10)
β_drug ∈ RealDomain(lower=-10)
β_male ∈ RealDomain(lower=-10)
end
@covariates TRT SEX
@pre begin
_λ₀ = λ₁*exp((TRT == "COMB")*β_comb + (TRT == "DRUG_X")*β_drug) * exp((SEX == "Male")*β_male)
end
@vars begin
λ = _λ₀
end
@dynamics begin
Λ' = λ
end
@derived begin
STATUS ~ @. TimeToEvent(λ, Λ)
end
end
ft_brain_tte_exp_trt_sex = fit(brain_tte_exp_trt_sex,
brain_tte,
brain_tte_param,
Pumas.NaivePooled())
This is my simulation code. I am trying to simulate a dataset that includes event data up to 1000 days for each subject. I have an data frame (brain_sim_data) with Subject ID, the relevant covariates, and empty columns for TIME and STATUS
dropout_sims = simobstte(ft_brain_tte_exp_trt_sex,
coef(ft_brain_tte_exp_trt_sex),
brain_data_sim,
NamedTuple();
minT = 0, maxT=1000, nT = 10, repeated=false)
Also, is there a way to output the cumulative hazard without actually running simulations? And if not, how can I output the cumulative hazard.
This is my first time in a while using Pumas, so apologies if I am missing something simple!
Regards,
Shamir