Statistics and Statistical Programming (Winter 2017)/R lecture outline: Week 8: Difference between revisions

From CommunityData
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
* log() DV, log() IV
* log() DV, log() IV
* polynomial terms and interaction terms both with: I()
* polynomial terms and interaction terms both with: I()
* logistic regression
** create a dummy variable: mpg > mean(mpg)
** glm(formula, family=binomial("logit"))
two things worth returning to:
* graphing residuals against fitted values (not just against different values of x)
* graphing residuals against fitted values (not just against different values of x)
* discussing anova() better. The key thing I didn't talk about is about different types of "sum of squares" which are discussed in depth on [https://afni.nimh.nih.gov/sscc/gangc/SS.html this page hosted by the NIH]. By default, SPSS produces Type III standard errors although these [https://myowelt.blogspot.com/2008/05/obtaining-same-anova-results-in-r-as-in.html very frequently not what you want].
* discussing anova() better. The key thing I didn't talk about is about different types of "sum of squares" which are discussed in depth on [https://afni.nimh.nih.gov/sscc/gangc/SS.html this page hosted by the NIH]. By default, SPSS produces Type III standard errors although these [https://myowelt.blogspot.com/2008/05/obtaining-same-anova-results-in-r-as-in.html very frequently not what you want].
** Getting the same results in R is easy enough though: library(car); Anova(fit, type="III")
** Getting the same results in R is easy enough though: library(car); Anova(fit, type="III")
* logistic regression
** create a dummy variable: mpg > mean(mpg)
** glm(formula, family=binomial("logit"))

Latest revision as of 01:24, 20 February 2017

  • log() DV, log() IV
  • polynomial terms and interaction terms both with: I()
  • logistic regression
    • create a dummy variable: mpg > mean(mpg)
    • glm(formula, family=binomial("logit"))

two things worth returning to:

  • graphing residuals against fitted values (not just against different values of x)
  • discussing anova() better. The key thing I didn't talk about is about different types of "sum of squares" which are discussed in depth on this page hosted by the NIH. By default, SPSS produces Type III standard errors although these very frequently not what you want.
    • Getting the same results in R is easy enough though: library(car); Anova(fit, type="III")