Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
r_workshop4 [2018/10/05 14:57]
katherinehebert [2.1 Running a linear model]
r_workshop4 [2019/08/08 17:52]
mariehbrice [Workshop 4: Linear models]
Line 13: Line 13:
 **Summary:​** In this workshop, you will learn how to implement basic linear models commonly used in ecology in R such as simple regression, analysis of variance (ANOVA), analysis of covariance (ANCOVA), and multiple regression. After verifying visually and statistically the assumptions of these models and transforming your data when necessary, the interpretation of model outputs and the plotting of your final model will no longer keep secrets from you! **Summary:​** In this workshop, you will learn how to implement basic linear models commonly used in ecology in R such as simple regression, analysis of variance (ANOVA), analysis of covariance (ANCOVA), and multiple regression. After verifying visually and statistically the assumptions of these models and transforming your data when necessary, the interpretation of model outputs and the plotting of your final model will no longer keep secrets from you!
  
-Link to associated Prezi: [[https://​prezi.com/​qk2xegtlj44b/​|Prezi]]+**Link to new [[https://​qcbsrworkshops.github.io/​workshop04/​workshop04-en/​workshop04-en.html|Rmarkdown presentation]]** 
 + 
 +Link to old [[https://​prezi.com/​qk2xegtlj44b/​|Prezi ​presentation]]
  
 Download the R script and data for this lesson: Download the R script and data for this lesson:
Line 215: Line 217:
  
 <code rsplus | Testing Normality: hist() function>​ <code rsplus | Testing Normality: hist() function>​
-# Plot Y ~ X and the regression line 
 # Plot Y ~ X and the regression line # Plot Y ~ X and the regression line
 plot(bird$MaxAbund ~ bird$Mass, pch=19, col="​coral",​ ylab="​Maximum Abundance", ​ plot(bird$MaxAbund ~ bird$Mass, pch=19, col="​coral",​ ylab="​Maximum Abundance", ​
Line 1022: Line 1023:
 ==== 6.1 Assumptions ==== ==== 6.1 Assumptions ====
  
-As with models seen above, to be valid ANCOVA models must meet the statistical assumptions of linear models that can be verified using diagnostic plots. In addition, ​ANOVA models must have:+As with models seen above, to be valid ANCOVA models must meet the statistical assumptions of linear models that can be verified using diagnostic plots. In addition, ​ANCOVA ​models must have:
   - The same value range for all covariates   - The same value range for all covariates
   - Variables that are //fixed//   - Variables that are //fixed//
Line 1279: Line 1280:
 ---- ----
  
-CHALLENGE 7+**CHALLENGE 7** 
 + 
 +Compare the different polynomial models in the previous example, and determine which model is the most appropriate. Extract the adjusted R squared, the regression coefficients,​ and the p-values of this chosen model.
  
 ++++ Challenge 7: Solution| ++++ Challenge 7: Solution|