[R] Regression with factor having1 level
peter dalgaard
pdalgd at gmail.com
Fri Mar 11 09:40:20 CET 2016
> On 11 Mar 2016, at 02:03 , Robert McGehee <rmcgehee at gmail.com> wrote:
>
>> df <- data.frame(y=c(0,2,4,6,8), x1=c(1,1,2,2,NA),
> x2=factor(c("A","A","A","A","B")))
>> resid(lm(y~x1+x2, data=df, na.action=na.exclude)
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-help
mailing list