that seems to work, thank you.
would anyone care to explain *why* it works ... ? or where
I could go to read more about why it works ... ?
cheers
Ben Bolker
Felix Andrews wrote:
how about...
nrow(with(cc, model.matrix(params, data=environment(
cheers
-Felix
2009/8/10
Hi,
OK, yes, it does require some explanation...
What is the difference between your examples 2 and 3, where the first
has the formula given explicitly, and the second has the formula
assigned to the object? As you said, case 2 works while case 3 fails.
2.
how about...
nrow(with(cc, model.matrix(params, data=environment(
cheers
-Felix
2009/8/10 Ben Bolker bol...@ufl.edu:
I am having difficulty with evaluation/environment construction
for a formula to be evaluated by model.matrix(). Basically, I
want to construct a model matrix that first
I am having difficulty with evaluation/environment construction
for a formula to be evaluated by model.matrix(). Basically, I
want to construct a model matrix that first looks in newdata
for the values of the model parameters, then in obj...@data.
Here's what I've tried:
1.