Apologies -- I have just observed my oversight below!
Please ignore the message below.
Ted.
On 20-May-08 09:14:30, Ted Harding wrote:
> On 20-May-08 06:10:48, Prof Brian Ripley wrote:
>>>From ?contrasts
>> Usage:
>> contrasts(x, how.many) <- value
>> ...
>> how.many: How many contrasts shoul
On 20-May-08 06:10:48, Prof Brian Ripley wrote:
>>From ?contrasts
> Usage:
> contrasts(x, how.many) <- value
> ...
> how.many: How many contrasts should be made. Defaults to one less than
>the number of levels of 'x'. This need not be the same as
>the number of column
From ?contrasts
Usage:
contrasts(x, how.many) <- value
...
how.many: How many contrasts should be made. Defaults to one less than
the number of levels of 'x'. This need not be the same as
the number of columns of 'ctr'.
so that is 2 in your example, and it takes the
Hi Folks,
I'm a bit puzzled by the following (example):
N<-factor(sample(c(1,2,3),1000,replace=TRUE))
unique(N)
# [1] 3 2 1
# Levels: 1 2 3
So far so good. Now:
contrasts(N)<-contr.treatment(3, base=1, contrasts=FALSE)
contrasts(N)
# 1 2
# 1 1 0
# 2 0 1
# 3 0 0
whereas:
contr.treatment(3, ba
4 matches
Mail list logo