Re: [R] Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ?

2013-09-24 Thread E Joffe
] Sent: Friday, September 20, 2013 5:12 PM To: E Joffe Cc: r-help@r-project.org Subject: Re: [R] Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ? On Sep 13, 2013, at 11:21 PM, E Joffe wrote: Hi David, First I ordered the levels

Re: [R] Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ?

2013-09-20 Thread David Winsemius
] Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ? On Sep 13, 2013, at 4:15 AM, E Joffe wrote: Hello, I have a problem with creating an identity matrix for glmnet by using the contrasts function. Why do you want to do this? I

[R] Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ?

2013-09-13 Thread E Joffe
Hello, I have a problem with creating an identity matrix for glmnet by using the contrasts function. I have a factor with 4 levels. When I create dummy variables I think there should be n-1 variables (in this case 3) - so that the contrasts would be against the baseline level. This is

Re: [R] Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ?

2013-09-13 Thread David Winsemius
On Sep 13, 2013, at 4:15 AM, E Joffe wrote: Hello, I have a problem with creating an identity matrix for glmnet by using the contrasts function. Why do you want to do this? I have a factor with 4 levels. When I create dummy variables I think there should be n-1 variables (in this

Re: [R] Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ?

2013-09-13 Thread E Joffe
- Health Science Center in Houston 832.287.0829 (c) -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Friday, September 13, 2013 3:05 PM To: E Joffe Cc: r-help@r-project.org Subject: Re: [R] Creating dummy vars with contrasts - why does the returned identity matrix

Re: [R] Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ?

2013-09-13 Thread David Winsemius
, 2013 3:05 PM To: E Joffe Cc: r-help@r-project.org Subject: Re: [R] Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ? On Sep 13, 2013, at 4:15 AM, E Joffe wrote: Hello, I have a problem with creating an identity matrix

Re: [R] Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ?

2013-09-13 Thread David Winsemius
Center in Houston 832.287.0829 (c) -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Friday, September 13, 2013 3:05 PM To: E Joffe Cc: r-help@r-project.org Subject: Re: [R] Creating dummy vars with contrasts - why does the returned identity matrix contain

Re: [R] Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ?

2013-09-13 Thread E Joffe
Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Friday, September 13, 2013 8:51 PM To: E Joffe Cc: r-help@r-project.org Subject: Re: [R] Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ? On Sep 13, 2013, at 9:33