Prais–Winsten Regression and the First Transformed Row
2026-11-26

Prais–Winsten Regression and the First Transformed Row

The Prais–Winsten transformation keeps the first row of a regression with a particular model of serially correlated errors. Subsequent rows subtract a scaled copy of the previous original row. The first row instead has a special scale. In a four-observation example, treating the correlation coefficient as known makes it possible to compare the transformed data and the fitted coefficients directly.

Write the mean model and the stationary error model

Let the response at time t have mean a + bxt, with error εt. Assume the errors satisfy εt = ρ εt−1 + ut, where the innovations u are mutually uncorrelated, have zero mean and share variance σ². Use a stationary starting error, so its variance is σ²/(1−ρ²) and its covariance with future innovations is zero. Use four consecutive times with the same interval between records. Take ρ = 0.6 as given for this example. No parameter is inferred about the error process from these four observations.

The invented predictor values are 1, 2, 4 and 5, and the response values are 3, 5, 6 and 9. Write a column of ones beside the predictor. Treat that column as part of the design to transform. The first original row is (1, 1) with observed response 3. The fourth original row is (1, 5) with observed response 9. Keeping these records in time order matters because later transformed rows use the preceding original one.

The four original rows have a constant column, predictor one to five and responses three, five, six and nine.
Preceding values must come from this original table. Source: Zhilianhai editorial desk, original AI-assisted conceptual illustration.

Transform both the predictor and the constant column

For t of at least two, replace yt by yt − ρyt−1 and xt by xt − ρxt−1. The transformed constant is 1−ρ = 0.4 in these rows. For example, at t = 3 the response becomes 6−0.6×5 = 3.0 and the predictor becomes 4−0.6×2 = 2.8. The three later transformed predictor values are 1.4, 2.8 and 2.6. The three later response values are 3.2, 3.0 and 5.4.

The first transformed row multiplies every original entry by √(1−ρ²) = 0.8. Its design entries are (0.8, 0.8) and its response is 2.4. This factor changes the variance of the starting error to σ², the innovation variance of the other transformed rows. A new column of ones would describe a different design. Adding it to the transformed model in place of the transformed constant changes the estimating equations even if the predictor and response have been transformed correctly.

Use the original records as inputs to each subtraction. In the fourth response calculation, for instance, the previous response is the original value of six. The fourth transformed response is 9 − 0.6×6 = 5.4. Using the previously transformed value of three would produce 7.2 and a different model. Keeping a separate original table and transformed table makes that discrepancy visible. The same principle applies when the input design contains additional predictors.

The first transformed row is 0.8, 0.8 and 2.4. Later constants are all 0.4.
Fit the transformed constant and predictor columns together. Source: Zhilianhai editorial desk, original AI-assisted conceptual illustration.

Fit the transformed rows with the same model coefficients

Ordinary least squares on the four transformed rows estimates the coefficients a and b of the original mean model. In this case it gives a = 2489/1246 ≈ 1.99759 and b = 229/178 ≈ 1.28652. The transform changes how each original residual enters the least-squares objective while a and b keep their original interpretation. The fitted mean for an original predictor value of four is therefore a + 4b, about 7.14366.

Holding ρ fixed and instead discarding the special first row gives the Cochrane–Orcutt transformation for this example. The three remaining rows would give a = 565/86 ≈ 6.56977 and b = 47/86 ≈ 0.54651. These coefficients differ because the rows used in the objective differ. The four invented observations are meant to expose that calculation. They do not establish the relative accuracy of the two estimators for a particular process or population.

Preserve the spacing and covariance assumptions in the record

A reproducible fit can save the original time index, the exact ρ used, the transformed first row, and a note on whether ρ was supplied or estimated. With fixed known ρ, least squares on the transformed design agrees with generalized least squares using entries proportional to ρ raised to the absolute lag distance in the original covariance matrix. If ρ is estimated from residuals, the estimation procedure and convergence condition add information to the record. Consecutive row numbers alone do not prove equally spaced observations when there are gaps in collection.

At ρ equal to zero the first-row scale and later constant both become one, and every transformed response and predictor is the original value. That limiting case is an easy check on a spreadsheet or numerical implementation. The site’s technical articles and industry resources offer related regression examples.

The example uses one stationary time series. A new independent series starts a separate covariance block and gets its own starting row in the corresponding transformation. Applying a lag across the boundary would combine unrelated responses. When series boundaries or interruptions are present, save the indexing rule with the fit so the transformed rows can be rebuilt from the same observations.

Sources include Stata’s methods and formulas for Prais–Winsten regression and the R prais package documentation of the first-observation transformation.

18028484626 CONTACT US

公司:智联海(惠州)科技有限公司

地址:惠州仲恺高新区陈江街道白云山工业大道 5 号六楼 601

Q Q:18028484626

Copyright © 2002-2026

粤xxx

咨询 在线留言 电话:18028484626
微信 微信扫码添加我