shift_req | R Documentation |
This function calculates the shift in a habitual intake distribution required to achieve a user-specified target prevalence of inadequate intakes.
shift_req(
ear,
cv,
target,
shape = NULL,
rate = NULL,
meanlog = NULL,
sdlog = NULL,
plot = F
)
ear |
Estimated Average Requirement (EAR) |
cv |
Coefficient of variation (CV) of the EAR |
target |
Target prevalence (0-100): 0 percent inadequate to 100 percent inadequate |
shape |
Shape parameter for gamma distribution |
rate |
Rate parameter for gamma distribution |
meanlog |
Mean parameter for gamma distribution |
sdlog |
Standard deviation parameter for gamma distribution |
plot |
Boolean (TRUE/FALSE) indicating whether to plot the distributions relative to the EAR |
A list of the parameters for the intake distribution required to obtain the target prevalence
# Gamma-distribution examples
sev(ear=8.1, cv=0.1, shape=9.5, rate=1.3, plot=T)
shift_req(ear=8.1, cv=0.1, target=25, shape=9.5, rate=1.3, plot=T)
shift_req(ear=8.1, cv=0.1, target=10, shape=9.5, rate=1.3, plot=T)
shift_req(ear=8.1, cv=0.1, target=5, shape=9.5, rate=1.3, plot=T)
# Lognormal-distribution examples
sev(ear=8.1, cv=0.1, meanlog=1.9, sdlog=0.3, plot=T)
shift_req(ear=8.1, cv=0.1, target=25, meanlog=1.9, sdlog=0.3, plot=T)
shift_req(ear=8.1, cv=0.1, target=10, meanlog=1.9, sdlog=0.3, plot=T)
shift_req(ear=8.1, cv=0.1, target=5, meanlog=1.9, sdlog=0.3, plot=T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.