map_surv: Generate age and cohort observations

Description Usage Arguments Value Examples

Description

Generate age and cohort observations

Usage

1
map_surv(map, sample_size, dob_dist, dob_dist_par = NULL)

Arguments

map

A matrix representing the hazard, as provided by map_maker.

sample_size

Number of observations

dob_dist

Marginal distribution of the cohort. Defaults to the uniform distribution with bounds given by dob_dist_par.

dob_dist_par

Parameter of the distribution of the cohort

Value

surv_data, a data frame of observations with age and cohort.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
mu <- log(1e-2)
age_seq <- seq(0, 100, length.out = 100)
cohort_seq <- seq(1900, 1900 + age_seq[101], length.out = age_length + 1)
age_coef <- seq(0, 2, length.out = age_length - 1)
cohort_coef <- seq(0, 0.8, length.out = age_length - 1)
islet_ls = list(list(mean = c(1945, 45), sigma = 100 * diag(2), coef = 40))
hazard <- map_maker(mu, age_coef, cohort_coef, age_seq, cohort_seq, islet_ls = islet_ls)
(map_surv(hazard, 10))

## End(Not run)

goepp/hazreg documentation built on June 7, 2019, 4:03 a.m.