R/statpsych2.R
size.ci.mape.Rd
Computes the sample size required to estimate a population mean absolute prediction error for a general linear model with desired confidence interval precision. Setting s = 0 gives the sample size requirement for a mean absolute deviation in a one-group design. This function assumes that the prediction errors have an approximate normal distribution.
size.ci.mape(alpha, mape, s, w)
alpha value for 1-alpha confidence
mean absolute prediction error planning value
number of predictor variables
desired confidence interval width
Returns the required sample size
size.ci.mape(.05, 4.5, 5, 2)
#> Sample size
#> 57
# Should return:
# Sample size
# 57