vmonaco / frailtySurv

General Semiparametric Shared Frailty Model
12 stars 2 forks source link

baseline hazard #5

Open kadayo-kay opened 4 years ago

kadayo-kay commented 4 years ago

Hello Monaco, Hi, Thanks for all the efforts of putting the package together. I have been trying to run a simulation using “simfrail” function for a lognormal shared frailty with pareto baseline hazard function and obtaining confidence interval for the coefficients. But the code is not running. Sometimes hanging for like 2-3days and will not give any result and most time it gives Error message like we have below.

“Error in if (common.len == 1L) unlist(x, recursive = FALSE) else if (common.len > : argument is of length zero In addition: Warning messages: 1: In plapply(reps, try.fn, cores) : parallel not supported on Windows yet... 2: In simfrail(100, genfrail.args = alist(beta = c(log(2), log(3)), : 100 out of 100 repetitions failed to complete”

below is the code

simpareto <- simfrail(100, genfrail.args = alist(beta = c(2,3), frailty = "gamma", censor.rate = 0.30, N = 300, K = 2, theta = 2, covar.distr = "uniform", covar.param = c(0, 1), lambda_0 = function(t, a = 0.01, c =1 ,d = 4.6) (dca(dt)^(c-1) (1 + (dt)^c)^-1), fitfrail.args = alist( formula = Surv(time, status) ~ Z1 + Z2 + cluster(family), frailty = “lognormal"), Lambda.times = 1:120)) summary(simpareto)

Please, can you be of help?

kadayo-kay commented 4 years ago

Please, the baseline hazard is Pareto Type IV [dca(dt)^(c-1) (1 + (dt)^c)^-1)] And frailty distribution is lognormal pls help me