5.1 Some common statistical models
There are many types of statistical models. Variables may be nominal (categorical) or interval/ratio data. You may be interested in predicting a continuous interval/ratio variable from other continuous variables, or predicting the probability of an occurrence (e.g. of a species), or maybe the count of something (also maybe a species). You may be needing to classify your phenomena based on continuous variables. Here are some examples:
lm(y ~ x)
linear regression model with one explanatory variablelm(y ~ x1 + x2 + x3)
multiple regression, a linear model with multiple explanatory variablesglm(y ~ x, family = poisson)
generalized linear model, poisson distribution; see ?family to see those supported, including binomial, gaussian, poisson, etc.glm(y ~ x + y, family = binomial)
glm for logistic regressionaov(y ~ x)
analysis of variance (same aslm()
except in the summary)gam(y ~ x)
generalized additive modelstree(y ~ x)
orrpart(y ~ x)
regression/classification trees