Re: [R] dummy variable encoding

2009-03-06 Thread Richard . Cotton
> > The best encoding depends upon which language you would like to manipulate > > the variable in. In R, genders are most naturally represented as factors. > > That means that in an external data source (like a spreadsheet of data), > > you should ideally have the gender recorded as human-

Re: [R] dummy variable encoding

2009-03-05 Thread news
richard.cot...@hsl.gov.uk writes: > The best encoding depends upon which language you would like to manipulate > the variable in. In R, genders are most naturally represented as factors. > That means that in an external data source (like a spreadsheet of data), > you should ideally have the g

Re: [R] dummy variable encoding

2009-03-05 Thread Richard . Cotton
>can anyone tell me why an encoding of 1/2 for a dummy variable for >two groups (e.g. gender) seems to be preferred over 0/1? >It's been bugging me for a while, 0/1 seems more natural, but I have >been told (without explanation) that 1/2 is better. Why? The best encoding depends up

[R] dummy variable encoding

2009-03-05 Thread news
Hi, can anyone tell me why an encoding of 1/2 for a dummy variable for two groups (e.g. gender) seems to be preferred over 0/1? It's been bugging me for a while, 0/1 seems more natural, but I have been told (without explanation) that 1/2 is better. Why? -- aleblanc __