model.frame mangles time series (PR#121)

Thomas Lumley thomas@biostat.washington.edu
Thu, 18 Feb 1999 08:52:15 -0800 (PST)


On 18 Feb 1999, Peter Dalgaard BSA wrote:

> 
> (6) since [subset,] seems to work, perhaps do_subset is what should be
> called from inside do_modelframe?

No, subset doesn't work -- it loses contrasts

R>  contrasts(df$x)
  [,1] [,2]
1    1    0
2    0    1
3   -1   -1
R> contrasts(df[1:5,]$x)
  2 3
1 0 0
2 1 0
3 0 1
 
	-thomas


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._