#Lab 4 R code STAT 3022
#Generating the data we will be working with
set.seed(8051)
x <- runif(19,0,10)
y <- 1 + 2*x + rnorm(19,sd = 2)
plot(x,y,pch = 20) #postive coefficient
#There are many types of
#STAT 3022 Lab 6
#Create a 10x10 matrix of 100 random numbers from a t distribution with 12
degrees of freedom. Write your code
#underneath the set.seed(34) command. Assign it to variable name tMat
se
#First lets look at an example of how looking for a fit where there is not one
can lead to erroneous conclusions
set.seed(37) # y does not hava relation with x
y <- rnorm(10)
x <- 1:10
plot(x,y, xlim
#STAT 3022 Lab 7
#Load in libraries
require(cfcdae)
#Without using the Bonferonni adjustment we see that when dong multiple
comparisons our errors are actually quite higher than
#0.05 which is what we
#Stat 3022 Lab 9 R code
#We will be looking at a dataset for O Ring failures before the Challenger
disaster of 1984. Please install the faraway package before beginning
library(faraway)
data(orings)
a
#STAT 3022 Lab 5 R code
require(MASS)
#Review of how to get help with R
#What if I wanted to draw a random sample from a set of numbers?
#First I need to decide whether to find a built in function
#or
#R code for Lab 13 Stat 3022
#Examples from these websites#
#http:/www.ats.ucla.edu/stat/r/library/bootstrap.htm
#http:/www.r-bloggers.com/bootstrap-example/
#examples of using the function sample, ra