Description Usage Arguments Details Value Examples
View source: R/predict.repolr.R
Calculates predictions and standard errors of predictions for a fitted repolr
model object.
1 2 3 |
object |
is a model fitted using |
newdata |
optionally, a data frame in which to find variables with which to predict; if missing the model fitted values are reported. |
se.fit |
Logical indicating if standard errors are required. |
robust.var |
logical; if |
type |
is the type of prediction required. The default “ |
... |
further arguments passed to or from other methods. |
If newdata is missing predictions are based on the data used to fit the repolr
model. If newdata are supplied then the format of these data must conform to the same format required for model fitting using repolr
. See repolr
for details.
fit |
Predictions. |
se.fit |
Estimated standard errors. |
1 2 3 4 5 6 | data(HHSpain)
mod.0 <- repolr(HHSpain~Sex*Time, data=HHSpain, categories=4, subjects="Patient",
times=c(1,2,5), corr.mod="uniform", alpha=0.5)
predict(mod.0, newdata = data.frame(Patient = rep(100, 3), Time = c(1, 2, 5),
Sex = factor(rep(1, 3), levels=1:2, labels=c("F", "M"))),
type="link", se.fit = TRUE)
|
$fit
100.1 100.2 100.3 100.4 100.5 100.6 100.7
0.4144049 1.4897464 2.7977472 0.2003748 1.2757162 2.5837170 -0.4417157
100.8 100.9
0.6336257 1.9416266
$se.fit
100.1 100.2 100.3 100.4 100.5 100.6 100.7 100.8
0.3776881 0.3946639 0.4513134 0.3450574 0.3565973 0.4184568 0.4218454 0.4135311
100.9
0.4679883
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.