In: Math
[Using SAS]
1. The data (TET) relates to a study by Reiter and others (1981) concerning the effects of injecting triethyl-tin (TET) into rats once at age 5 days. The animals were injected with 0, 3 or 6 mg per kilogram of body weight (three levels). The response was the log of the activity count for 1 hour, recorded as 21 days of age. The rat was left to move about freely in a figure 8 maze. In this question, we will choose LOGACT21 as our response, the factor DOSAGE will be considered. (You will choose significance level at .05).
a. One wants to investigate whether Dosage level will have any impact on LOGACT21. Please write out the appropriate linear model.
b. Test the hypothesis that Dosage level will have impact on LOGACT21. Set up the null and alternative hypotheses; Report the P-value and make your conclusion from SAS result.
2. Still on data TET. In this question, we will choose LOGACT21 as our response, the two factors DOSAGE and SEX will be considered. (You will choose significance level at .05).
a. Set up appropriate model for this data (including the possible interaction terms).
b. (Interaction effect) Test the hypothesis that the gender effect is the same for all three levels of DOSAGE. Set up appropriate model, hypotheses and report your results.
c. Considering the model without the interactions, does SEX have any significant impact on the mean value of LOGACT21? Set up appropriate model, hypotheses and report your results.
d. Considering the model without the interactions, does DOSAGE have any significant impact on the mean value of LOGACT21? Set up appropriate model, hypotheses and report your results.
----------------------------------
Data file contents:
ID LOGACT21 Dosage Sex
1 2.636 0 Male
2 2.736 0 Male
3 2.775 0 Male
4 2.672 0 Male
5 2.653 0 Male
6 2.569 0 Male
7 2.737 0 Male
8 2.588 0 Male
9 2.735 0 Male
10 2.444 3 Male
11 2.744 3 Male
12 2.207 3 Male
13 2.851 3 Male
14 2.533 3 Male
15 2.63 3 Male
16 2.688 3 Male
17 2.665 3 Male
18 2.517 3 Male
19 2.769 3 Male
20 2.694 6 Male
21 2.845 6 Male
22 2.865 6 Male
23 3.001 6 Male
24 3.043 6 Male
25 3.066 6 Male
26 2.747 6 Male
27 2.894 6 Male
28 1.851 6 Male
29 2.489 6 Male
30 2.494 0 Female
31 2.723 0 Female
32 2.841 0 Female
33 2.62 0 Female
34 2.682 0 Female
35 2.644 0 Female
36 2.684 0 Female
37 2.607 0 Female
38 2.591 0 Female
39 2.737 0 Female
40 2.22 3 Female
41 2.371 3 Female
42 2.679 3 Female
43 2.591 3 Female
44 2.942 3 Female
45 2.473 3 Female
46 2.814 3 Female
47 2.622 3 Female
48 2.73 3 Female
49 2.955 3 Female
50 2.54 6 Female
51 3.113 6 Female
52 2.468 6 Female
53 2.606 6 Female
54 2.764 6 Female
55 2.859 6 Female
56 2.763 6 Female
57 3 6 Female
58 3.111 6 Female
59 2.858 6 Female
------------------------------------------------
Can someone walk me through how to do this on SAS? The documentation doesn't have any examples that break things down simply (I've never used SAS before this class) and the professor has snippets of code without context of what part is doing what. This is what I have so far:
data file;
infile 'pathhere'
getnames=yes
delimiter='09'x;
proc print;
run;
I know he wants a multiple linear regression model but I really don't understand what is supposed to go where code wise for SAS.
Solution-1:
SAS CODE":
data TET;
infile cards;
input ID LOGACT21 Dosage Sex $;
CARDS;
1 2.636 0 Male
2 2.736 0 Male
3 2.775 0 Male
4 2.672 0 Male
5 2.653 0 Male
6 2.569 0 Male
7 2.737 0 Male
8 2.588 0 Male
9 2.735 0 Male
10 2.444 3 Male
11 2.744 3 Male
12 2.207 3 Male
13 2.851 3 Male
14 2.533 3 Male
15 2.63 3 Male
16 2.688 3 Male
17 2.665 3 Male
18 2.517 3 Male
19 2.769 3 Male
20 2.694 6 Male
21 2.845 6 Male
22 2.865 6 Male
23 3.001 6 Male
24 3.043 6 Male
25 3.066 6 Male
26 2.747 6 Male
27 2.894 6 Male
28 1.851 6 Male
29 2.489 6 Male
30 2.494 0 Female
31 2.723 0 Female
32 2.841 0 Female
33 2.62 0 Female
34 2.682 0 Female
35 2.644 0 Female
36 2.684 0 Female
37 2.607 0 Female
38 2.591 0 Female
39 2.737 0 Female
40 2.22 3 Female
41 2.371 3 Female
42 2.679 3 Female
43 2.591 3 Female
44 2.942 3 Female
45 2.473 3 Female
46 2.814 3 Female
47 2.622 3 Female
48 2.73 3 Female
49 2.955 3 Female
50 2.54 6 Female
51 3.113 6 Female
52 2.468 6 Female
53 2.606 6 Female
54 2.764 6 Female
55 2.859 6 Female
56 2.763 6 Female
57 3 6 Female
58 3.111 6 Female
59 2.858 6 Female
;
run;
proc reg data=TET;
model LOGACT21=Dosage;
run;
Output:
The REG Procedure
Model: MODEL1
Dependent Variable: LOGACT21
Number of Observations Read | 59 |
---|---|
Number of Observations Used | 59 |
Analysis of Variance | |||||
---|---|---|---|---|---|
Source | DF | Sum of Squares |
Mean Square |
F Value | Pr > F |
Model | 1 | 0.11995 | 0.11995 | 2.50 | 0.1197 |
Error | 57 | 2.73953 | 0.04806 | ||
Corrected Total | 58 | 2.85948 |
Root MSE | 0.21923 | R-Square | 0.0419 |
---|---|---|---|
Dependent Mean | 2.69061 | Adj R-Sq | 0.0251 |
Coeff Var | 8.14798 |
Parameter Estimates | |||||
---|---|---|---|---|---|
Variable | DF | Parameter Estimate |
Standard Error |
t Value | Pr > |t| |
Intercept | 1 | 2.63420 | 0.04571 | 57.63 | <.0001 |
Dosage | 1 | 0.01849 | 0.01170 | 1.58 | 0.1197 |
Dosage level do not have any impact on LOGACT21.
linear model is
LOGACT21=2.63420+0.01849*Dosage
the null and alternative hypotheses are:
Null hypothesis:
Ho:
alternative hypothesis:
Ha:
t=1.58
p=0.1197
p>0.05
Fail to reject null hypothesis.
Accept null hypothesis
There is no relationship between dosage and
LOGACT21