Difference between revisions of "R1"

From SourceWiki
Jump to navigation Jump to search
Line 2: Line 2:
 
'''Open Source Statistics with R'''
 
'''Open Source Statistics with R'''
  
=Why Bother with R?=
+
=Introduction=
  
 +
R is a mature, open-source (i.e. free!) statistics package, with an intuitive interface, excellent graphics and a vibrant community constantly adding new methods for the statistical investigation of your data to the library of packages available.
  
=Linear Regression=
+
=Examples of Common Tasks=
 +
 
 +
==Linear Regression==
  
 
<source>
 
<source>
Line 13: Line 16:
 
</source>
 
</source>
  
=Significance Testing=
+
---
 +
 
 +
'''Exercise'''
 +
* Weighted least squares.
 +
 
 +
==Significance Testing==
  
 
<source>
 
<source>

Revision as of 09:20, 20 June 2013

Open Source Statistics with R

Introduction

R is a mature, open-source (i.e. free!) statistics package, with an intuitive interface, excellent graphics and a vibrant community constantly adding new methods for the statistical investigation of your data to the library of packages available.

Examples of Common Tasks

Linear Regression

> plot(cars)
> res=lm(dist ~ speed, data=cars)
> abline(res)

---

Exercise

  • Weighted least squares.

Significance Testing

> boys_2=c(90.2, 91.4, 86.4, 87.6, 86.7, 88.1, 82.2, 83.8, 91, 87.4)
> girls_2=c(83.8, 86.2, 85.1, 88.6, 83, 88.9, 89.7, 81.3, 88.7, 88.4)
> res=var.test(boys_2,girls_2)
> res=t.test(boys_2, girls_2, var.equal=TRUE, paired=FALSE)