User Tools

Site Tools


r:graphics

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
r:graphics [2016/12/02 09:59] – [E.G.] hkimscilr:graphics [2017/11/27 09:57] (current) – [Adding Confidence Intervals to a Bar Chart] hkimscil
Line 230: Line 230:
 F-statistic: 5.756 on 4 and 45 DF,  p-value: 0.0007904 F-statistic: 5.756 on 4 and 45 DF,  p-value: 0.0007904
  
 +> plot(LifeCycleSavings)
 > plot(lm.SR) > plot(lm.SR)
 </code> </code>
 +
 +{{:r:LifeCycleSavings.jpeg}}
 {{:R:regression_model.png}} {{:R:regression_model.png}}
  
Line 418: Line 421:
 +         names.arg=c("May", "Jun", "Jul", "Aug", "Sep"), +         names.arg=c("May", "Jun", "Jul", "Aug", "Sep"),
 +         ylab="Temp (deg. F)")</code> +         ylab="Temp (deg. F)")</code>
-{{:R:barplot_heights.png}}+{{:R:barplot_heights.2.png}}
  
 ====== Adding Confidence Intervals to a Bar Chart ====== ====== Adding Confidence Intervals to a Bar Chart ======
Line 429: Line 432:
 </code> </code>
  
-<code>tmean <- tapply(Temp, list(as.factor(Month)), mean)  # mean for each month +<code>tmean <- tapply(Temp, list(as.factor(Month)), mean)   
-tsd <- tapply(Temp, list(as.factor(Month)),sd)  # sd for each month +# mean for each month 
-tse <- tsd/sqrt(length(Temp))  # se for each month+tsd <- tapply(Temp, list(as.factor(Month)),sd)   
 +# sd for each month 
 +tse <- tsd/sqrt(length(Temp))   
 +# se for each month
  
 lower <- tmean - 1.96*tse lower <- tmean - 1.96*tse
r/graphics.1480642171.txt.gz · Last modified: 2016/12/02 09:59 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki