# predict.systemfit: Predictions from System Estimation

### Description

Returns the predicted values, their standard errors and the confidence limits of prediction.

### Usage

  1 2 3 4 5 6 7 8 9 10 11 ## S3 method for class 'systemfit' predict( object, newdata = NULL, se.fit = FALSE, se.pred = FALSE, interval = "none", level=0.95, useDfSys = NULL, ... ) ## S3 method for class 'systemfit.equation' predict( object, newdata = NULL, se.fit = FALSE, se.pred = FALSE, interval = "none", level=0.95, useDfSys = NULL, ... ) 

### Arguments

 object an object of class systemfit or systemfit.equation. newdata An optional data frame in which to look for variables with which to predict. If it is NULL, the fitted values are returned. se.fit return the standard error of the fitted values? se.pred return the standard error of prediction? interval Type of interval calculation ("none", "confidence" or "prediction") level Tolerance/confidence level. useDfSys logical. Use the degrees of freedom of the whole system (in place of the degrees of freedom of the single equation) to calculate the confidence or prediction intervals. If it not specified (NULL), it is set to TRUE if restrictions on the coefficients are imposed and FALSE otherwise. ... additional optional arguments.

### Details

The variance of the fitted values (used to calculate the standard errors of the fitted values and the "confidence interval") is calculated by Var[E[y^0]-\hat{y}^0]=x^0 \; Var[b] \; {x^0}'
The variances of the predicted values (used to calculate the standard errors of the predicted values and the "prediction intervals") is calculated by Var[y^0-\hat{y}^0]=\hat{σ}^2+x^0 \; Var[b] \; {x^0}'

### Value

predict.systemfit returns a dataframe that contains for each equation the predicted values ("<eqnLable>.pred") and if requested the standard errors of the fitted values ("<eqnLable>.se.fit"), the standard errors of the prediction ("<eqnLable>.se.pred"), and the lower ("<eqnLable>.lwr") and upper ("<eqnLable>.upr") limits of the confidence or prediction interval(s).

predict.systemfit.equation returns a dataframe that contains the predicted values ("fit") and if requested the standard errors of the fitted values ("se.fit"), the standard errors of the prediction ("se.pred"), and the lower ("lwr") and upper ("upr") limits of the confidence or prediction interval(s).

### References

Greene, W. H. (2003) Econometric Analysis, Fifth Edition, Macmillan.

Gujarati, D. N. (1995) Basic Econometrics, Third Edition, McGraw-Hill.

Kmenta, J. (1997) Elements of Econometrics, Second Edition, University of Michigan Publishing.

systemfit, predict

### Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 data( "Kmenta" ) eqDemand <- consump ~ price + income eqSupply <- consump ~ price + farmPrice + trend system <- list( demand = eqDemand, supply = eqSupply ) ## OLS estimation fitols <- systemfit( system, data=Kmenta ) ## predicted values and limits predict( fitols ) ## predicted values of the first equation predict( fitols$eq[[1]] ) ## predicted values of the second equation predict( fitols$eq[[2]] ) 

Search within the systemfit package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.