User Tools

Site Tools


ancova

Differences

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

Link to this comparison view

Next revision
Previous revision
ancova [2015/11/10 09:51] – created hkimscilancova [2015/11/18 14:35] (current) hkimscil
Line 51: Line 51:
 F-statistic: 8.713 on 3 and 68 DF,  p-value: 5.719e-05 F-statistic: 8.713 on 3 and 68 DF,  p-value: 5.719e-05
 </code> </code>
 +
 +<code>library(multcomp)
 +dunnett = glht(model, linfct=mcp(Treat="Dunnett"))
 +</code>
 +
 +<code>summary(dunnett)
 +
 + Simultaneous Tests for General Linear Hypotheses
 +
 +Multiple Comparisons of Means: Dunnett Contrasts
 +
 +
 +Fit: lm(formula = Postwt ~ Prewt + Treat, data = anorexia)
 +
 +Linear Hypotheses:
 +                Estimate Std. Error t value Pr(>|t|)    
 +CBT - Cont == 0    4.097      1.893   2.164 0.062939 .  
 +FT - Cont == 0     8.660      2.193   3.949 0.000373 ***
 +---
 +Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
 +(Adjusted p values reported -- single-step method)
 +</code>
 +
  
 ====== ANCOVA (Analysis of Covariance) 2 ====== ====== ANCOVA (Analysis of Covariance) 2 ======
Line 221: Line 244:
      )      )
 </code> </code>
 +
 +====== Eg. ======
 +{{tri.csv}}
 +trt: treatment
 +pat: patient id
 +hgba1c: Hemoglobin A1c 
 +trichg: Triglyceride changes
 +
 +$ trichg = hgba1c + trt + e $
  
  
ancova.txt · Last modified: 2015/11/18 14:35 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki