stat545a-2013-hw01_khosravi-mah

Mahdiar — Sep 15, 2013, 1:35 PM

n <- 80
a <- 1.5
b <- 5
sigSq <- .4
x <- runif(n)
y <- a + b * x + rnorm(n, sd=sqrt(sigSq))
plot(x,y)
abline(a,b,col="brown")

plot of chunk unnamed-chunk-1

#  I tried to use stitch function in the script but I could not figure out how to do it!:
# stitch(script, template=system.file("stat545a-2013-hw01_khosravi-mah.R","knitr-template.Rnw")
# and also by s = system.file("misc", "stat545a-2013-hw01_khosravi-mah.R", package = "knitr") ...