Description Usage Arguments Value Examples
View source: R/sclr_ideal_data.R
Allows variation of all parameters and the creation of an arbitrary number of covariates.
| 1 2 3 4 5 6 7 8 9 10 11 | 
| n | Number of observations. | 
| theta | Baseline risk parameter on the logit scale. | 
| beta_0 | Intercept of the linear part. | 
| covariate_list | A list in the form of  | 
| outcome_name | Name to give to the outcome | 
| seed | Seed to set. If  | 
| attach_true_vals, attach_seed | Whether to attach additional attributes. | 
A tibble.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # One titre
one_titre <- sclr_ideal_data(
  covariate_list = list(
    logHI = list(gen_fun = function(n) rnorm(n, 2, 2), true_par = 2)
  )
)
sclr(status ~ logHI, one_titre) # Verify
# Two titres
two_titre <- sclr_ideal_data(
  covariate_list = list(
    logHI = list(gen_fun = function(n) rnorm(n, 2, 2), true_par = 2),
    logNI = list(gen_fun = function(n) rnorm(n, 2, 2), true_par = 1)
  )
)
sclr(status ~ logHI + logNI, two_titre) # Verify
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.