Displaying 1 result from an estimated 1 matches for "lgsst".
Did you mean:
lgss
2012 Nov 16
2
R-Square in WLS
...formula = fmla1,weights = Weights,data =
data.frame(cbind(X,Y)))
bhat <- coef(fitwls)
############################## 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...