R Tip: Linear RegressionAnonymousOctober 05, 2016Linear Regression is a common statistical tool used to determine relationships between data This RTip is modified from: http://www.apsnet.org/edcenter/advanced/topics/EcologyAndEpidemiologyInR/DiseaseProgress/Pages/LinearRegression.aspx
For example, let’s look at the relationship between girth and height of black cherry trees First, look at the data
Next, run the linear model
And view the stats
The linear fit line has an intercept of 62.0313, an slope of 1.0544, and an R2 value of 0.2697
1 Comment
Species Distribution Model: Generalized Linear ModelsAndrew DennhardtWednesday, December 2, 2015Model Category: Regression. Model Description: This model can be applied in univariate and multivariate applications, and it is used to estimate an ecological response as a linear combination of independent predictor variables. Model Assumptions: This model assumes that the response data are drawn from some statistical distribution other than that of the continuous Gaussian (Normal). Model errors require a specific statistical distribution that is paired with a link function that relates the linear function of predictors to some function of the response variable. For instance, the Poisson distribution requires a log link function to model discretely-distributed response variables (e.g., counts). Model Response Data: Presence-absences and other binary data as well as counts, proportions, and ordinal data. Model Explanatory Data: Discrete, categorical, and continuous predictor variables are each feasible to apply in these models. Model Links and Use with R: To fit these models, you can use one of the following functions-
Furthermore, an introductory lecture about generalized linear models is also available at http://statmath.wu.ac.at/courses/heather_turner/glmCourse_001.pdf. Example Papers: To learn more about how these models can be used to estimate species’ distributions, you can consult the following examples from the literature-
Example with R:
Automated Model SelectionSteven GrayNovember 10, 2015The dredge() function in the Multi-Model Inference(MuMIn) package is an automated process for building and selecting models. This is particularly useful when you have a large candidate set of models that you need to build and assess. I will use the “mtcars” data and generalized linear models as an arbitrary example.
|
Spatial Ecology @ MSUClick on "Category" below to search for R code compiled by the Zarnetske Spatial & Community Ecology Lab and students in MSU's Spatial Ecology graduate course (FOR870/FW870) Category
All
Archive
October 2016
|