Data to the project exam in STK4040/9040 fall semester 2011

 

# Below are given commands for reading the data sets used in the project exam into R.

 

 

# PROBLEM 1

 

skulls=read.table("http://www.uio.no/studier/emner/matnat/math/STK4040/h11/skulls.txt",header=T)

 

 

# PROBLEM 2

 

weather=read.table("http://www.uio.no/studier/emner/matnat/math/STK4040/h11/weather.txt",header=T)

 

 

# PROBLEM 3

 

# As described in the text, you should use data on all non-carriers and a random sample of 30 of the 45 carriers.

# In order to get your data set you should do the following.

# First you give the command "seed=ddmmyy", where ddmmyy is your day, month and year of birth (e.g. if you are born 3 July 1987, you give the command "seed=030787").

# Then you give the commands:

 

temp=read.table("http://www.uio.no/studier/emner/matnat/math/STK4040/h11/hemophilia.txt",header=T)

set.seed(seed)

hemophilia=temp[c(1:30,sample(31:75,30)), ]

 

 

# PROBLEM 4

 

# As described in the text, you should use a random sample of 30 of the 62 measurements on pulp-fiber and paper properties.

# In order to get your data set you should do the following.

# First you give the command "seed=ddmmyy", where ddmmyy is your day, month and year of birth (e.g. if you are born 3 July 1987, you give the command "seed=030787").

# Then you give the commands:

 

temp=read.table("http://www.uio.no/studier/emner/matnat/math/STK4040/h11/pulp-paper.txt",header=T)

set.seed(seed)

pulp.paper=temp[sample(1:62,30), ]