Re: [R] New behavior in estimable(), bug or feature?

2006-04-07 Thread Dieter Menne
CG Pettersson cg.pettersson at evp.slu.se writes:

 
 
 Fitting and reducing a first model for grain yield went smoothly. When I
 wanted to look at the fixed effects with estimable() I got an error
 message claiming that I was using the wrong variable names, estimable
 wanted the variable names in the form usually given by fixed.effects().

... 
 What is happening?
 Is there a new namecheck in estimable acting a little over-enthusiastic or
 what?
 

Yes, estimable has change that it accepts parameter NAMES now, and this might 
collide with some implicit typecasting:

Docs:
If cm is a vector, it should contained named elements each of which gives the 
coefficient to be applied to the corresponding parameter. 

Since you did not provide a runnable example, I cannot check in detail what was 
wrong.

Dieter

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] New behavior in estimable(), bug or feature?

2006-04-06 Thread CG Pettersson
Hello all!

w2k, R-2.2.1. update.packages done today.

I just started to work with a new dataset, using lme() (library nlme) and
estimable() (library gmodels). I first wanted to establish the fixed
effects for eight fertiliser treatments (variable treat) coded as A to H.

Fitting and reducing a first model for grain yield went smoothly. When I
wanted to look at the fixed effects with estimable() I got an error
message claiming that I was using the wrong variable names, estimable
wanted the variable names in the form usually given by fixed.effects().

I changed the names in my matrix to the requested form, but got the same
error message. Then I changed to an old library with a variety trial
material using a matrix I _know_ worked two months ago, I got the same
type of error message.

What is happening?
Is there a new namecheck in estimable acting a little over-enthusiastic or
what?

Here are some output from R:

 trMat1

A 1 0 0 0 0 0 0 0
B 0 1 0 0 0 0 0 0
C 0 0 1 0 0 0 0 0
D 0 0 0 1 0 0 0 0
E 0 0 0 0 1 0 0 0
F 0 0 0 0 0 1 0 0
G 0 0 0 0 0 0 1 0
H 0 0 0 0 0 0 0 1
 formula(m4.y)
y.dm ~ treat - 1
 fixed.effects(m4.y)
  treatA   treatB   treatC   treatD   treatE   treatF   treatG   treatH
2065.267 4052.033 4571.479 4933.026 4680.980 5021.347 5063.306 5198.153
 estimable(m4.y, trMat1)
Error in FUN(newX[, i], ...) :
Invalid parameter name(s): , , , , , , ,
Valid names are: treatA, treatB, treatC, treatD, treatE, treatF,
treatG, treatH



All the best
/CG

-- 
CG Pettersson, MSci, PhD Stud.
Swedish University of Agricultural Sciences (SLU)
Dep. of Crop Production Ekology. Box 7043.
SE-750 07 Uppsala, Sweden
[EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html