# Degrees of freedom in GLS

Here I perform a GLS regression in R and the degrees of freedom is reported as "Degrees of freedom: 60 total; 58 residual". In this regression I see five parameters that are being estimated: the slope of the regression line, the intercept of the regression line, the residual standard deviation, the constant of the variance function, and the power of the variance function. When I go to generate prediction intervals for the regression line what degrees of freedom should I use? Anticipating the answer is not 55, why aren't the degrees of freedom 55?

library(nlme)

X <- c(1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,
10,10,10,10,10,10,10,10,10,10,20,20,20,20,20,20,
20,20,20,20,30,30,30,30,30,30,30,30,30,30,40,40,
40,40,40,40,40,40,40,40)

Y <- c(1.07,1.01,0.99,1.09,0.94,1.00,1.01,0.98,1.00,
1.03,3.66,3.75,3.77,3.92,4.08,3.99,3.95,4.10,
3.88,4.04,10.13,10.2,9.77,10.28,8.71,9.79,9.82,
9.85,10.07,9.63,20.22,19.46,19.02,20.06,20.94,
19.92,19.96,20.04,19.67,19.96,31.04,31.4,31.84,
30.77,32.13,31.17,30.36,29.95,30.74,30.67,41.14,
40.29,42.77,38.36,39.17,39.61,40.73,39.42,40.72,
40.24)

m <- data.frame(X,Y)

fit <- gls(Y ~ X,weights=varConstPower(form = ~ X),data=m)
summary(fit)