Displaying 2 results from an estimated 2 matches for "linmod2".
Did you mean:
linmod
2009 Sep 14
3
Eliminate cases in a subset of a dataframe
...After a residual diagnostic of a regression analysis, I detected three
outliers:
linmod <- lm(y ~ x, data=subdata)
plot(linmod)
Say, the cases 11,22, and 33 were outliers.
Here comes the problem: When I want to exclude these three cases in a
further regression analysis,
- for instance with linmod2 <- lm(y[-c(11,22,33)] ~ x[-c(11,22,33)],
data=subdata) - it does not work.
I guess this has something to do with this strange "row.names"-vector which
has been added to the dataframe when creating the subset. I find it very
strange why R gives the case numbers in the diagnostics but t...
2012 May 29
2
setting parameters equal in lm
Forgive me if this is a trivial question, but I couldn't find it an answer
in former forums. I'm trying to reproduce some SAS results where they set
two parameters equal. For example:
y = b1X1 + b2X2 + b1X3
Notice that the variables X1 and X3 both have the same slope and the
intercept has been removed. How do I get an estimate of this regression
model? I know how to remove the intercept