Guilherme Ludwig, gvludwig@stat.wisc.edu
STAT-849 Homework # 4, exercise 5
1
Exercise 5
The following routine initializes the parameters for the simulation
# S i m u l a t i o n I n i t i a l Parameters
#
n < c ( 5 , 1 0 , 2 5 , 5 0 , 1 0 0 , 2 5 0 , 5 0
1
Question #2
We have 5 datasets. Since I am writing this on October 5th, Ill pick k = 5.
>
>
>
>
>
k <- 5
dset <- read.table("HWK2_Ext2.txt")[(k-1)*90 + 1:90,]
dset.1 <- dset[1:30,]
dset.2 <- dset[31:60,]
dset.3 <- dset[61:90,]
Guideline:
(a) There are n
Stat 849- Homework 3 Question 1 (a) Plot:
0
50000
150000
VL
250000
5 GSS
10
15
Since there is at least one sample faraway from the rest, it is worth to test the presence of outliers.
> > > > > hm3q1 <- read.table("hmw3q1_data.txt", header=T) plot(hm3q1) l
Problem 2
One version of R-code for simulation. n = 100 S = 10000 library(MASS) beta0 beta1 beta2 beta3 = = = = 2 1.2 1.4 -0.5 # sample size # number of simulations # to use function mvrnorm()
OLS = matrix(0,4,0) WLS = matrix(0,4,0) for (simno in 1:S) cfw
Stat 849 Homework 6 Due 12/12/2012
1. This is a continuation of Problem 3 in Homework 5. Suppose that after appropriate variable transformations, you are going to
(a) Develop a valid ridge regression model containing all seven potential predictor variable
Homework 5
Due Tuesday Sept 28
1. Problem 8.8
2. Get the data for this problem from my web site click on data from Sleuth, get the le
called CASE1202.ASC. The variables are Beginning salary, 1977 salary, Sex (Female = 1),
s = Seniority (months since time
Stat 849 Homework 4 Due 11/5/2012
1. Consider the following two models where E () = 0 and V ar() = 2 I :
Model A: Y = X1 1 + ,
Model B: Y = X1 1 + X2 2 + .
2
2
Show that RA RB , where R2 is dened as the multiple R-squared correlation
coecient in the linea