CI 95% Prais wisten

Hey folks

How can I calculate the CI 95% in the model:

temp <- c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26)
tx <- c(33,19,35,32,3,13,11,2,24,36,40,15,10,29,50,42,8,26,16,7,10,21,47,29,40,8)
dados1 <- data.frame(temp, tx)

m1 <- prais_winsten(tx ~ temp, index = "temp", data = dados1)

summary(m1)
call:

Residuals:
Min 1Q Median 3Q Max
-21.01 -12.91 -0.83 11.72 26.69

AR(1) coefficient rho after 5 iterations: 0.2279

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 22.67389 7.19953 3.149 0.00434 **
temp 0.04233 0.46369 0.091 0.92802

Signif. codes: 0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 14.16 on 24 degrees of freedom
Multiple R-squared: 0.02283, Adjusted R-squared: -0.01788
F-statistic: 0.5608 on 1 and 24 DF, p-value: 0.4612

Durbin-Watson statistic (original): 1.5
Durbin-Watson statistic (transformed): 1.789

Can anybody teach me how to script some way to perform it?

Thanks

Could you say more about what you mean by this?

I would like to know how I can calculate de CI 95% of this script.

FAQ Asking Questions](FAQ: How to do a minimal reproducible example ( reprex ) for beginners - General - Posit Community)

Currently we have no idea what R package you may be using, and no idea if it is even possible to calculate a CI.

I'm still not sure what you mean: The code you gave gives estimates of the slope and intercept coefficients of a line. Could you say more?

The confidence interval is the coefficient plus and minus the critical value times the standard error. The critical value is approximately 2, but you’ll need to use a function from the t distribution to get the exact value.

Thanks, @startz.

In this case, does "coefficient" refer to rho?

And is the reported value here the critical value you're referring to?

I assume you want the confidence interval for the coefficient on temp. Are you looking for something else?

I'm not the OP; I was just trying to understand what you meant.

Apologies, @dromano.

The problem presented is one where sequential error terms are correlated. This violates an assumption of standard least squares. The technique being used corrects for this violation. Once the correction is made the statistical analysis is pretty standard.

The value of rho is the estimated correlation between sequential error terms.

1 Like

Thank you for the clarification, @startz !