
202 Data Analysis and Statistics for Geography, Environmental Science, and Engineering
[1] 30 62 86 99 101 117 121
An important thing to note is that a linear regression may not be the best choice. We will proceed
with a linear model for now and later see how to do nonlinear.
6.4.2 siMple linear reGression
Simple linear regression is done using function lm(y ~ x), where y is the dependent variable and
xis the independent variable. Recall we use symbol ∼ to denote a functional relationship. A nonin-
tercept regression, or regression through the origin, is done by adding character 0 in the expression,
that is, using lm(y ~ 0 + x).
Now we will use ...