G'day Jos,
On Mon, 19 Jan 2009 20:22:10 +
Jos Elkink wrote:
> Here is a little bit more R code to show the problem:
Thanks for that, all becomes clear now. :)
> > str(AGE)
> Factor w/ 5 levels "65+","18-24",..: 5 5 1 4 5 5 2 4 1 3 ...
> > table(LABOUR)
> LABOUR
>01
> 692 1409
>
Hi Jos,
does explicitly recoding AGE help?
AGE <- factor(c("65+","18-24","18-24","25-34"))
str(AGE)
AGE <-
factor(c("65+","18-24","18-24","25-34"),levels=c("65+","18-24","25-34"))
str(AGE)
Best,
Stephan
Jos Elkink schrieb:
Hi all,
Thanks for the advice.
See ?relevel for information on h
Hi all,
Thanks for the advice.
> See ?relevel for information on how to reorder the levels of a factor,
> while being able to specify the reference level.
> Basically, the first level of the factor is taken as the reference.
Yes, that is how I always used it. But the problem is, in this
particul
Jos,
See ?relevel for information on how to reorder the levels of a factor,
while being able to specify the reference level.
Basically, the first level of the factor is taken as the reference. If
you want to utilize a different ordering, as an alternative to the
above, simply use:
AGE <- facto
Hi Jos,
you can force R to set contrasts for factors the way you like them with
contrasts(). You seem to be thinking of treatment contrasts, which are
most easily interpreted, but there are also others.
However: are you sure you want to bin an age variable into categories?
You will lose powe
G'day Jos,
On Mon, 19 Jan 2009 15:52:00 +
Jos Elkink wrote:
> Thanks for your quick answer. The problem is not so much the LABOUR
> variable, however, but the AGE variable, which consists of about 5
> categories for which I do indeed not create separate dummy variables.
> But R does not beha
Hi Thierry,
Thanks for your quick answer. The problem is not so much the LABOUR
variable, however, but the AGE variable, which consists of about 5
categories for which I do indeed not create separate dummy variables.
But R does not behave as expected when deciding on which dummy to use
as referenc
Dear Jos,
In R you don't need to create you own dummy variables. Just create a
factor variable LABOUR (with two levels) and rerun your model. Then you
should be able to calculate all coefficients.
HTH,
Thierry
ir. Thi
8 matches
Mail list logo