panelAR (version 0.1)

predict.panelAR: Predict method for fitted objects of class "panelAR".

Description

Predicted values from Prais-Winsten regression.

Usage

"predict"(object,newdata=NULL,se.fit = FALSE, conf.interval = FALSE, conf.level = 0.95, na.action=na.pass,...)

Arguments

object
an object of class "panelAR".
newdata
an optional data frame used for prediction. If omitted, the fitted values are used.
se.fit
logical. If TRUE, standard errors of predicted values are reported. Default: FALSE.
conf.interval
logical. If TRUE, a confidence interval for predicted values is returned. Default: FALSE.
conf.level
A number in the range $(0,1)$ denoting the confidence level. Default: 0.95.
na.action
function denoting how to handle missing values in newdata. See predict.lm for details. Default: na.pass, which predicts NA values.
...
further arguments passed to or from other methods.

Value

fit
either a vector or a data frame containing the fitted values, as well as standard errors and/or intervals (if specified). If se.fit="TRUE", se.fit column provides the standard errors. If interval is set, lb and ub provide the lower and upper bounds of the interval, respectively.
df
degrees of freedom.

See Also

The function panelAR.

See predict.lm and napredict for additional details.

Examples

Run this code
data(Rehm)
out <- panelAR(NURR ~ gini, data=Rehm, panelVar='ccode', timeVar='year', autoCorr='ar1', 
panelCorrMethod='pcse', rho.na.rm=TRUE, panel.weight='t-1', bound.rho=TRUE)
summary(out)

# fitted values (with SE and CI)
predict(out, se.fit=TRUE, conf.interval=TRUE)

Run the code above in your browser using DataLab