Effect of water depth on weed

Presumably your data would look a bit like this.

depth weed
1 0.40 84.00
2 0.60 76.00
3 0.90 73.00
4 1.40 52.00
5 0.30 94.00
6 1.30 57.00

You can plot a scatter plot.

plot of chunk unnamed-chunk-3

Regression analysis

If the data look like this then they are suitable for regression analysis.

plot of chunk unnamed-chunk-4

mod <- lm(weed ~ depth, data = d)
summary(mod)
## 
## Call:
## lm(formula = weed ~ depth, data = d)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -20.592  -3.003  -0.411   6.328  13.498 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   100.18       2.91    34.5  < 2e-16 ***
## depth         -39.55       3.28   -12.0  1.4e-12 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 7.84 on 28 degrees of freedom
## Multiple R-squared:  0.838,  Adjusted R-squared:  0.832 
## F-statistic:  145 on 1 and 28 DF,  p-value: 1.37e-12

Read the notes on correlation and regression and try the examples again in SPSS.

Look at the data carefully

A regression analysis (and correlation) is based on the assumption of a linear relationship. There are a lot of more advanced methods that go beyond this, but you don't know about them. So plot your data and watch out for effects like the one below. You would need to interpret it yourself.

plot of chunk unnamed-chunk-7