1
$\begingroup$

I need to test the hypothesis that the amount of rainfall doesn't affect the yield of a crop. Other predictor variables in the model I have to use are the variety of crop and the soil that the crop is planted in. I have found the ANOVA table with the residuals and regression, and also got one where there are residuals and all of the variables listed separately.

I have set $H_0$ to be that the coefficient of the rainfall in the model is equal to $0$, with $H_1$ being that it doesn't equal to $0$.

To find the p-statistic, do I need to find the F-value of just the rainfall and the residuals, or of all of the predictor variables together and the residuals. Are my hypothesis the right way around or do I need to switch them?

EDIT: I am now checking if the soil has made a difference to the crop yield. The soil has a value of 1 if it was grown in clay, and 0 otherwise. When using t.test(yield~ soil), I get a different value to the p value in the ANOVA? Is this an issue?

$\endgroup$

1 Answer 1

0
$\begingroup$

Your hypothesis seems to be the correct way around. I would suggest that you calculate the p-values of all the different variables in your model. This will help you to see how significant the variables are relative to one another. Since you didn't specify, I am not sure if you are calculating this by hand of if you are using a program.

If you are doing it by hand, I suggest that you also try and do it in R using the anova() or summary() function. In this way you can check whether you calculations were correct. Remember if you at testing at 5% significance level, the p-values need to be smaller than 0.05 for you to reject the null hypothesis.

To answer our other question, if you are calculating by hand, you can use the F-test for testing the overall adequacy of the model. For each beta coefficient you will have to use a t-test. From those you can calculate the corresponding p-values.

When modelling the response with only one predictor (simple linear regression), the predictor might be statistically significant. However when you use it together with other predictors in the model (multiple regression) that predictor might not be significant at all. This is often due to multicollinearity.

Hope this answers your question!

$\endgroup$
6
  • $\begingroup$ I am using R. The rainfall is categorised in 3 levels of "None", "Light" and "Heavy" but when I use the t.test it says I need to only have 2 levels of rainfall. Would it suffice to compare each of the means of a specific variety to the rest, or do I need to do it another way like using ANOVA tables? How would I do that? $\endgroup$ Commented May 16, 2020 at 17:56
  • $\begingroup$ Firstly, are you using dummy variables for the rainfall? It also depends on how R sees the rainfall variable - is it a factor according to R? You can use just the means and compare them, but I would suggest that you use an ANOVA table since you can set up the hypothesis test then. It would be a more "formal" way of testing for the significance of the rainfall. If you are able to provide some data, I might be able to help more $\endgroup$
    – Stochastic
    Commented May 16, 2020 at 19:20
  • $\begingroup$ Don't worry, I have solved this part using ANOVA tables I believe. I have updated my question to include another issue I have encountered. $\endgroup$ Commented May 17, 2020 at 14:23
  • $\begingroup$ Remember it will be different when you model your response (yield) with only one predictor variable. Maybe I was not clear earlier, but for the each variable by itself you will use a t-test while I all are included, you will use a f-test. Sometimes you might find that using a predictor alone to model a response could be significant, but then when fitting it together with other predictors it is not significant at all. $\endgroup$
    – Stochastic
    Commented May 17, 2020 at 16:14
  • $\begingroup$ I have been told to keep using the multivariate model when testing the Hypothesis "The soil being clay or not does not make a difference". When I do this, i still get different answers from the p-value in the ANOVA of the soil column and from using t.test(yield~ soil), but using the t.test function only considers those 2 and not the whole model, so I should use the ANOVA in this case? $\endgroup$ Commented May 17, 2020 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.