logo

Correlation and Regression

   

Added on  2023-06-03

17 Pages4164 Words104 Views
Running head: CORRELATION AND REGRESSION 1
Correlation and Regression
[Name of Student]
[Institutional Affiliation]
[Date of Submission]

CORRELATION AND REGRESSION 2
Question 1
The US Environmental Protection Agency collected magnesium uptake data, which is
included in the file “magnes.xls” available on the unit webpage. Moreover, this data set
contains the amount of magnesium uptake measured at different times with two different
treatments. It is anticipated that the two treatments used may result in different regression
equations.
1. (a) A model is suggested in which magnesium uptake is regressed against the time in
a quadratic model:
E(y)0 1 x2 x2 3 z
where z is an indicator variable representing the treatments. Fit this regression model.
2. (b) A researcher wants to determine if the simple indicator variable is really
appropriate. Basically the question is equivalent to whether the two separate models
for treatments
E(y)0 1x2x2 (treatment1) 0 1 x2 x2 (treatment2) satisfy the hypothesis
H0: 1 = 1 and 2 = 2.
One way of testing this hypothesis is by the following steps
(1) Combine the two models into one E(y) = X with appropriate design matrix X
and coefficient vector. In this question, is 61.
(2) Identify a C matrix such that the above hypothesis can be expressed as H0: C= 0.
Clearly specify the matrices X, and C.
3. (c) Hence test the above hypothesis using the T2 test.
4. (d) Also perform the above test using Full and Reduced models.
SOLUTION
Question-1:
A)
E(y)= β0 + β1 x + β2 x2
The X matrix
X= ¿
> magnes=read.xls(file="C:/Users/dell/Documents/Multivariate analysis/magnes.xls")
> magnes

CORRELATION AND REGRESSION 3
Magnesium Time Time2 Treatment

CORRELATION AND REGRESSION 4
2.08 0 0 1
2.07 0 0 1
2.09 0 0 1
2.06 0 0 1
2.17 1 1 1
2.15 1 1 1
2.16 1 1 1
2.15 1 1 1
2.08 2 4 1
2.02 2 4 1
2.06 2 4 1
2.04 2 4 1
1.97 3 9 1
1.96 3 9 1
1.98 3 9 1
1.96 3 9 1
1.89 4 16 1
1.87 4 16 1
1.88 4 16 1
1.89 4 16 1
1.81 5 25 1
1.72 5 25 1
1.81 5 25 1
1.75 5 25 1
1.66 6 36 1
1.64 6 36 1
1.61 6 36 1
1.59 6 36 1
2.08 0 0 2
2.09 0 0 2
2.07 0 0 2
2.04 0 0 2
2.03 1 1 2
2.04 1 1 2
2.01 1 1 2
2.08 1 1 2
1.88 2 4 2
1.86 2 4 2
1.96 2 4 2
1.91 2 4 2
1.77 3 9 2
1.6 3 9 2
1.78 3 9 2
1.8 3 9 2
1.57 4 16 2
1.47 4 16 2

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Trend Analysis of Australian Pharmaceutical (API) Shares
|6
|1242
|143