On Thu, Aug 29, 2013 at 6:21 AM, Ben Bolker wrote:
> On 13-08-28 05:43 PM, Gabriel Becker wrote:
> > Ben,
> >
> > It works for me ...
> >> x = rpois(100, 5) + 1
> >> y = rnorm(100, x)
> >> d = data.frame(x,y)
> >> m <- lm(y~log(x),d)
> >> update(m,data=model.frame(m))
> >
> > Call:
> > lm(formula
On 13-08-28 05:43 PM, Gabriel Becker wrote:
> Ben,
>
> It works for me ...
>> x = rpois(100, 5) + 1
>> y = rnorm(100, x)
>> d = data.frame(x,y)
>> m <- lm(y~log(x),d)
>> update(m,data=model.frame(m))
>
> Call:
> lm(formula = y ~ log(x), data = model.frame(m))
>
> Coefficients:
> (Intercept)
Ben,
It works for me ...
> x = rpois(100, 5) + 1
> y = rnorm(100, x)
> d = data.frame(x,y)
> m <- lm(y~log(x),d)
> update(m,data=model.frame(m))
Call:
lm(formula = y ~ log(x), data = model.frame(m))
Coefficients:
(Intercept) log(x)
-4.0105.817
You can also re-fit using the
Bump: just trying one more time to see if anyone had thoughts on this
(so far it's just ...)
Original Message
Subject: model.frame(), model.matrix(), and derived predictor variables
Date: Sat, 17 Aug 2013 12:19:58 -0400
From: Ben Bolker
To: r-de...@stat.math.ethz.ch
De
Dear r-developers:
I am struggling with some fundamental aspects of model.frame().
Conceptually, I think of a flow from data -> model.frame() ->
model.matrix; the data contain _input variables_, while model.matrix
contains _predictor variables_: data have been transformed, splines and
poly