# Prediction of a Prais-Winston Estimation

Hi,
my model fits best with a prais-winsten extimation. But how is it possible to use the result of the function prais-winsten for prediction similar to the predict function for the linear modell (lm(..))?
Here's some code as an example:

``````library(prais)
library(sandwich)

y = c(2413.10, 2421.26, 2434.95, 2429.89, 2431.36, 2421.47, 2431.23, 2420.21 ,2402.80, 2330.75, 2269.42, 2258.62,
2177.25, 2141.12)
x1= c(177.0424, 174.2006, 178.3835, 168.5238, 168.4668, 170.4619, 176.6676, 165.3332, 160.8694, 166.1567, 168.7098,
171.1672, 168.3668,182.1042)
x2 = c( 2839,  3249,  3929,  3725,  3204,  3061,  2485,  2073, 15202,  4074,  1996,  1887,   420,  1022)
Daten = data.frame(y, x1, x2)

Modell = lm(y ~ x1+x2)
summary(Modell)

dwtest(lm(Modell), alternative = c("greater","two.sided", "less"),iterations=15, tol=1e-10, data  =list())

Modell_pw = prais_winsten(lm(Modell), data=Daten)
summary(Modell_pw)
NewData = data.frame(y= 2500, x1= 190, x2= 1500)

#prediction of the lm-model:
predict(Modell, newdata = NewData)

#prdiction of the transformed model
predict(Modell_pw, newdata = NewData)
``````

Thanks for helping, Franziska