# predict.RRlog: Predict Individual Prevalences of the RR Attribute In danheck/RRreg: Correlation and Regression Analyses for Randomized Response Data

 predict.RRlog R Documentation

## Predict Individual Prevalences of the RR Attribute

### Description

Predictions of the RR logistic regression model for the individual probabilities (or logits) of having the sensitive RR attribute, or of the probability of the RR responses.

### Usage

```## S3 method for class 'RRlog'
predict(
object,
newdata = NULL,
se.fit = FALSE,
ci = 0.95,
...
)
```

### Arguments

 `object` A fitted `RRlog` model `newdata` An optional vector, matrix, or data.frame with values on the predictor variables. Note that for matrices, the order of predictors should match the order of predictors in the formula. Uses the fitted values of the model if omitted. `type` `"response"` returns predicted probabilities for the (observable) RR responses, `"link"` returns predicted logit-values for the (latent) sensitive attribute, and `"attribute"` returns predicted probabilities of having the (latent) sensitive attribute. `se.fit` Return standard errors for the predicted values in addition to confidence intervals. SEs on the logit scale are computed using the observed Fisher information from the fitted model. Standard errors for the probability scale are computed using the delta method. `ci` Confidence level for confidence interval. If `ci=FALSE`, no confidence interval is returned. Confidence intervals on the probability scale (if `type="response"` or `type="attribute"`) are computed based on the CI on the logit-scale using the inverse link function (hence, the CI will in general not be symmetric). `...` ignored

### Value

either a vector of predicted values or a matrix with columns for the point estimates, confidence interval, and standard errors (if `se.fit=TRUE` and `ci=.95`).

danheck/RRreg documentation built on Dec. 3, 2022, 7:50 p.m.