Description Usage Arguments Details Examples
annualDoseToCumulativeDose
Convert annual dose to cumulative
dose with given id vector. The years associated with dose records for a
given id should be in increasing order.
cumulativeDoseToAnnualDose
Convert cumulative dose to annual
dose with given id vector. The years associated with dose records for a
given id should be in increasing order.
hsumaAnnualDose
Generate dose realizations with annual dose
records using hierachical SUMA model (with only multiplicative errors).
hsumaCumulativeDose
Generate dose realizations with cumulative
dose records using hierachical SUMA model (with only multiplicative
errors).
1 2 3 4 5 6 7 | annualDoseToCumulativeDose(dose, doseyr.id)
cumulativeDoseToAnnualDose(dose, doseyr.id)
hsumaAnnualDose(seed, uM, sM, pM, dose.mean, doseyr.id)
hsumaCumulativeDose(seed, uM, sM, pM, dose.mean, doseyr.id)
|
dose |
A vector describing year exposure, either annually or cumulative |
doseyr.id |
A vector describing the id information of the dose vector. Both dose and doseyr.id should be in increasing order with respect to doseyr.id |
uM, sM, pM |
Multiplicative error, unshared, shared and partially shared |
dose.mean |
Average dose vecotr |
seed |
Random seed to ensure reproducibility. |
Function cumulativeDoseToAnnualDose
and
annualDoseToCumulativeDose
help with converting cumulative data to
annual data and the other way around.
Function hsumaAnnualDose
and hsumaCumulativeDose
generates
annual and cumulative dose replications using the SUMA model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | n <- 5000
n.year <- 10
id <- rep(1:n, each = n.year)
z.annual <- rchisq(n * n.year, 1)
z.cumulative <- annualDoseToCumulativeDose(z.annual, id)
z.annual.back <- cumulativeDoseToAnnualDose(z.cumulative, id)
all.equal(z.annual, z.annual.back)
um <- 0.5
sm <- 0.2
z.reps.annual <- hsumaAnnualDose(0, um, sm, 0, z.annual, id)
z.reps.cumulative <- hsumaCumulativeDose(0, um, sm, 0, z.cumulative, id)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.