View source: R/predict-methods.R
predict.easy_tool | R Documentation |
predict.easy_tool
computes predicted simplified
screening scores from new data.
## S3 method for class 'easy_tool' predict(object = NULL, ..., newdata = NULL)
object |
an object of class |
... |
optional arguments to |
newdata |
new dataframe from which predicted simplified screening
scores are desired. The dataframe must contain values of the same
response variables and covariates that were used to obtain |
predict.easy_tool
returns (invisibly) a dataframe
augmenting newdata
with the predicted simplified test screening
scores score
.
new_corns <- data.frame(ID = c("Alice D.", "Bernie P."), testresult = c(NA, NA), Q1 = c(0, 0), Q2 = c(0, 0), Q3 = c(0, 0), Q4 = c(0, 0), Q5 = c(0, 1), Q6 = c(0, 1 ), Q7 = c(0, 1)) attach(uniobj1) et <- easy_tool(uniobj1, max = 3) print(predict(et, newdata = new_corns))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.