Larousse24 / Larousse24-ag-problems-semester

Summer 2020/Data Carpentry for Agroecologists
0 stars 0 forks source link

Week #9 #8

Closed Larousse24 closed 4 years ago

Larousse24 commented 4 years ago

One of the analyses that I will be performed for my project is how cover crop treatments affect carbon and nitrogen content in the soil. Since I did not have any data at the beginning, I used a dataset to look at how crop treatments affect height and chlorophyll content, which I think could match my analysis plan nicely. I've uploaded all the descriptions of what I did from the beginning until now in the list of codes as week #9. I slightly change my analysis overtime; If you go back to week #3 description, you will notice the difference.

@brymz, Could you check my linear regression code for me? I don't if there is something I miss, but it does not work.

brymz commented 4 years ago

I think could match my analysis plan nicely

Sounds great!

I've uploaded all the descriptions

Looks good.

check my linear regression code

What is the error message that you get?? I think you've got the formula (Y~X) for the linear model in the ANOVA function and vice versa. The linear model should only include continuous variables (height, chlorophyll), while the ANOVA should include the categorical variable (crop treatment).

Larousse24 commented 4 years ago

@brymz , The Anova is still not working. Below are the code and the error messages.

fit <- aov(X ~ Z, data = datad) Warning messages: 1: In model.response(mf, "numeric") : using type = "numeric" with a factor response will be ignored 2: In Ops.factor(y, z$residuals) : ‘-’ not meaningful for factors

brymz commented 4 years ago

You might try switching the order so that it is Z~X. Aslo, it looks like there might be an extra dash (-) in the data somewhere.