[R-sig-eco] Factors in partialRDA
Jari Oksanen
jari.oksanen at oulu.fi
Tue Feb 7 09:55:24 CET 2017
Andy,
That’s correct: if you have coded your variable as a single factor, R (and hence vegan) will automatically create dummy variables. If you have originally coded your variable as a set of dummy variables, and you have done that correctly, you will get the same result. If you do not drop one of the dummy variables, R will do it for you and tell that some of your original variables were aliased. This will not influence the results, though.
In conclusion: everything goes, but it is best to use the R way and define your factor as a single factor.
Cheers, Jari Oksanen
> On 7 Feb 2017, at 10:48 am, Andrew Halford <andrew.halford at gmail.com> wrote:
>
> Hi Listers,
>
> I am running a partial RDA analysis and I have an environmental dataset
> which includes a non-ordered factor representing reef type.
>
> I want to test for a significant linear trend in the environmental dataset
> as part of the process of testing for spatial autocorrelation.
>
> e.g. lineartest <- anova(rda(env,latlong))
>
> I have coded this Factor variable up as a group of dummy variables equal to
> the number of different reef types to run the test but I am unsure if I
> need to drop one of the dummy variables before running the linear test?
>
> I will revert back to a single Factor variable when I run the RDA as told
> in the vegan documentation?
>
> My reading tells me that the call to RDA in Vegan will automatically deal
> with creating dummy variables from a Factor variable presented in the model
> but this is not the case
>
> cheers
>
> Andy
>
>
> Andrew Halford Ph.D
> Research Scientist (Kimberley Marine Parks)
> Dept. Parks and Wildlife
> Western Australia
>
> Ph: +61 8 9219 9795
> Mobile: +61 (0) 468 419 473
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
More information about the R-sig-ecology
mailing list