Description Usage Arguments Details Value Examples
Takes output from make_long() and applies censoring by predicting/fitting from a simple model
1 2 | apply_censoring_hh2(data_in = NULL, simple_model = simplog,
protected = c(1, 1.25, 1.5, 1.75, 2, 3))
|
data_in |
an object returned from calculate_ses() |
protected |
a vector corresponding to age / colnames of age_vec that are protected from censoring so that fpca.face() wont bonk |
Names are hard coded, so stick to script in the examples.
prob.cens as a column added to data_in representing the probability of being censored at that time.
instudy.sim as a column added to data_in representing whether that particular observation is instudy (1) or not (0)
instudy as a column added to data_in builds upon instudy.sim in that once instudy.sim is 0 instudy is 0 for all remaining observation times
1 2 3 4 5 6 7 8 | d<-prep_data()
head(d)
over_samp_mat<-sample_data(d,1000)
with_ses <- calculate_ses(over_samp_mat)
long <-make_long(with_ses)
head(long)
censored <- apply_censoring(long)
head(censored,18)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.