I have a data frame "reading" that includes a logical variable "OLT" along with response variable "Reading" and predictor "True" (BOTH are numeric variables; it's "True" as in the true value).
When I suppress the intercept, model.matrix gives me OLTTRUE and OLTFALSE columns. Why? Can I do anything to prevent it? > r <- model.matrix(Reading~0+OLT, reading) > r[1:5,] OLTFALSE OLTTRUE 1 1 0 2 1 0 3 1 0 4 1 0 5 1 0 > reading$OLT[1:2] [1] FALSE FALSE > r <- model.matrix(Reading~OLT, reading) > r[1:5,] (Intercept) OLTTRUE 1 1 0 2 1 0 3 1 0 4 1 0 5 1 0 > reading[1:5,] Spec Reader Reading True OLT 1 1 18 1 1 FALSE 2 2 18 1 1 FALSE 3 3 18 1 1 FALSE 4 4 18 4 4 FALSE 5 5 18 4 4 FALSE R 2.5.1-2 on Debian GNU/Linux, running inside ESS. -- Ross Boylan wk: (415) 514-8146 185 Berry St #5700 [EMAIL PROTECTED] Dept of Epidemiology and Biostatistics fax: (415) 514-8150 University of California, San Francisco San Francisco, CA 94107-1739 hm: (415) 550-1062 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.