| predict.cnormBetaBinomial | R Documentation |
This function calculates norm scores based on raw scores, age, and a fitted cnormBetaBinomial model.
## S3 method for class 'cnormBetaBinomial'
predict(object, ...)
object |
A fitted model object of class 'cnormBetaBinomial' or 'cnormBetaBinomial2'. |
... |
Additional arguments passed to the prediction method:
|
The function first predicts the alpha and beta parameters of the beta-binomial distribution for each unique age using the provided model. It then calculates the mid-p cumulative probability for each raw score given these parameters and converts these probabilities to the norm scale specified in the model. The distribution is computed only once per unique age value, which considerably speeds up predictions for grouped data.
A numeric vector of norm scores (or percentiles, if no norm scale was specified in the model).
Other predict:
derivationTable(),
getNormCurve(),
normTable(),
predict.cnormBetaBinomial2(),
predict.cnormShash(),
predictNorm(),
predictRaw(),
rawTable()
## Not run:
# Assuming you have a fitted model named 'bb_model':
model <- cnorm.betabinomial(ppvt$age, ppvt$raw)
raw <- c(100, 121, 97, 180)
ages <- c(7, 8, 9, 10)
norm_scores <- predict(model, ages, raw)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.