Displaying 1 result from an estimated 1 matches for "lgssr".
Did you mean:
lgss
2012 Nov 16
2
R-Square in WLS
...###### Y = Log(Z) Scale
####################################
Yhat <- X%*%bhat # predicted values
mu <- mean(Y)
To <- Y - mu
Er <- Y - Yhat
Re <- Yhat - mu
lgSST <- sum(Weights*(To)^2) # log SST
lgSSE <- sum(Weights*(Er)^2) # log SSE
lgSSR <- sum(Weights*(Re)^2) # log SSR
lgR-sq <- lgSSR/lgSST
############################### Z Scale
######################################
Z <- exp(Y)
muZ <- mean(Z)
Zhat <- exp(Yhat+0.5*Sigma2)
ToZ <- Z-muZ
ErZ <- Z - Zhat
ReZ <- Zhat - muZ
SST <- sum(Weights*...