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
r_workshop4 [2018/10/05 18:57]
katherinehebert [2.1 Running a linear model]
r_workshop4 [2021/10/13 20:04] (current)
lsherin
Line 1: Line 1:
 +<WRAP group>
 +<WRAP centeralign>​
 +<WRAP important>​
 +<wrap em> __MAJOR UPDATE__ </​wrap> ​
 +
 +<wrap em> As of Fall 2021, this wiki has been discontinued and is no longer being actively developed. </​wrap> ​
 +
 +<wrap em> All updated materials and announcements for the QCBS R Workshop Series are now housed on the [[https://​r.qcbs.ca/​workshops/​r-workshop-04/​|QCBS R Workshop website]]. Please update your bookmarks accordingly to avoid outdated material and/or broken links. </​wrap>​
 +
 +<wrap em> Thank you for your understanding,​ </​wrap>​
 +
 +<wrap em> Your QCBS R Workshop Coordinators. </​wrap>​
 +
 +</​WRAP>​
 +</​WRAP>​
 +<WRAP clear></​WRAP>​
 +
 ======= QCBS R Workshops ======= ======= QCBS R Workshops =======
  
Line 13: Line 30:
 **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 234:
  
 <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 1040:
 ==== 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 1297:
 ---- ----
  
-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|