Displaying 2 results from an estimated 2 matches for "lmres".
Did you mean:
lares
2011 Nov 14
2
help in fitted values in lm function
Hi,
I have a data set of 10000 rows and ran a linear regression by using the
function lmres = lm(formula,data)
then got the fitted value by using the value fit=fitted(lmres).
but the number of rows in the fitted one is about 9548,
What could be the reason for reduction in the number of rows in the fitted
one
--
View this message in context: http://r.789695.n4.nabble.com/help-in-fitte...
2007 May 23
0
Changing sequential regression code to call systemfit
I use code ( actually its code from vars package and its directly below
) to do a sequence of lm calls and the data I use from the matrix
depends on restrictions.
for(i in 1:K){
datares <- datasub[, which(x$restrictions[i, ] == 1),drop=FALSE]
y <- yendog[, i]
lmres <- lm(y ~ -1 + ., data=datares)
# x$varresult[[i]] <- lmres
# x$resid[, i] <- resid(x$varresult[[i]])
}
I would like to modify the code to make one call to systemfit because I
really should be using SUR rather than a sequence of lms.
But, systemfit needs the following type of...