Description Usage Arguments Details Value Author(s) Examples

Obtains predictions for individual observations and optionally estimates standard errors of those predictions from objects of class `"gt"` or `"gt.mp"` returned by `gtreg` and `gtreg.mp`, respectively.

1 2 3 |

`object` |
a fitted object of class |

`newdata` |
optionally, a data frame in which to look for variables with which to predict. If omitted, the fitted linear predictors are used. |

`type` |
the type of prediction required. The option |

`se.fit` |
logical switch indicating if standard errors are required. |

`conf.level` |
confidence level of the interval of the predicted values. |

`na.action` |
function determining what should be done with missing values in |

`...` |
currently not used |

If `newdata` is omitted the predictions are based on the data used for the fit. When `newdata` is present and contains missing values, how the missing values will be dealt with is determined by the `na.action` argument. In this case, if `na.action = na.omit` omitted cases will not appear, whereas if `na.action = na.exclude` they will appear (in predictions and standard errors), with value `NA`. See also `napredict`.

If `se = FALSE`, a vector or matrix of predictions. If `se = TRUE`, a list with components

`fit` |
Predictions |

`se.fit` |
Estimated standard errors |

`lower` |
Lower bound of the confidence interval if calculated |

`upper` |
Upper bound of the confidence interval if calculated |

Boan Zhang

1 2 3 4 5 6 7 8 9 | ```
data(hivsurv)
fit1 <- gtreg(formula = groupres ~ AGE + EDUC., data = hivsurv,
groupn = gnum, sens = 0.9, spec = 0.9, linkf = "logit", method = "V")
pred.data <- data.frame(AGE = c(15, 25, 30), EDUC. = c(1, 3, 2))
predict(object = fit1, newdata = pred.data, type = "link", se.fit = TRUE)
predict(object = fit1, newdata = pred.data, type = "response",
se.fit = TRUE, conf.level = 0.9)
predict(object = fit1, type = "response", se.fit = TRUE, conf.level = 0.9)
``` |

binGroup documentation built on Aug. 24, 2018, 5:05 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.