rsurv.RdGenerating data with spatial confounding
rsurv( n_id, coefs = c(0.1, 0.4, -0.3), cens = 0, cens_type = "interval", hazard = "weibull", hazard_params = hazard_dft(), spatial = "ICAR", neigh = NULL, W = NULL, tau = 1, confounding = "none", proj = "none", sd_x = 0, X = NULL, scale = TRUE )
| n_id | vector with the number of individuals in each region to be generated. |
|---|---|
| coefs | vector of coefficients. |
| cens | proportion of censoring. |
| cens_type | censoring scheme: "none", "left", "right" or "interval". |
| hazard | hazard model: "exponential", "weibull" or "pwe" for piecewise exponential. |
| hazard_params | named list with parameters for the hazard model: hazard_dft(). |
| spatial | spatial model: "none" for the conventional Cox model, "gamma" for an independent gamma frailty, "lognormal" for an independent lognormal frailty, "ICAR" or "BYM" for spatial structured models. |
| neigh | neighborhood structure. A |
| W | adjacency matrix. |
| tau | precision for ICAR and BYM models. |
| confounding | "none", "linear", "quadratic" or "cubic". |
| proj | "none", "rhz", "hh" or "spock". |
| sd_x | standard deviation to generating confounding. |
| X | matrix of covariates. Default = NULL. |
| scale | scale X. TRUE or FALSE. |