Displaying 1 result from an estimated 1 matches for "zz_z".
Did you mean:
z1_z
2002 Sep 13
3
subset
Dear list,
I have a simple question. If I need to run linear regression on a subset of
the dataset, will
the following two commands give the same output:
lm(y ~ as.factor(x1) + as.factor(x2), data, subset = z==Z[1])
and
lm(y ~ as.factor(x1) + as.factor(x2), data[data$z==Z[1],] )
I have got different results running the two commands. Am I missing
something here, or it
there a bug on the