[R] ANOVA from imported data has only 1 degree of freedom
David Winsemius
dwinsemius at comcast.net
Sun Oct 9 21:17:33 CEST 2011
On Oct 9, 2011, at 2:08 PM, shardman wrote:
> Hi David,
>
> Thanks for your message.
>
> I can assure you this is not homework. I'm working on an ecology
> project and
> am trying to analyse the results from the fieldwork. I don't want
> other
> people to do the work for me I was just hoping someone might be able
> to spot
> where I have made a mistake, I'm still teaching myself to use R
> after having
> used SPSS for a long time.
>
> I did read the posting guidelines but couldn't see any reason not to
> ask for
> help, I'm sorry if I've got it wrong,
Please read the Posting Guide again. Nabble is not the standard venue
where people read this list and you seem to have missed the part where
the PG asked you to include relevant context in replies. It also also
asks you to describe your scientific domain (which you have now done)
and academic position (at least in part so the list can remain non-
homework oriented).
My memory from your initial posting was that you had numeric
identifiers for you groups and did not wrap the group variable name in
factor(), so it was treated as a continuous variable. Doesn't SPSS
have some mechanism to flag a variable as discrete?
Perhaps(from memory) something along these lines:
aov(outcome ~ factor(group), data=dat)
(Further comments from memory of earlier posting.)
You also were asking why there were not 14 df in the output but there
were since 1+13 = 14. Surely you were not expecting 14 df to be
associated with the grouping variable when there were only 3 groups?
> Yours,
> Sam
>
> --
> View this message in context: http://r.789695.n4.nabble.com/ANOVA-from-imported-data-has-only-1-degree-of-freedom-tp3887528p3887979.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list