Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

predict.panelAR

Predict method for fitted objects of class "panelAR".


Description

Predicted values from Prais-Winsten regression.

Usage

## S3 method for class 'panelAR'
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.

Author(s)

Konstantin Kashin kkashin@fas.harvard.edu

See Also

The function panelAR.

See predict.lm and napredict for additional details.

Examples

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)

panelAR

Estimation of Linear AR(1) Panel Data Models with Cross-Sectional Heteroskedasticity and/or Correlation

v0.1
GPL (>= 2)
Authors
Konstantin Kashin <kkashin@fas.harvard.edu>
Initial release
2014-02-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.