首页 > > 详细

调试R、SATGPA 设计辅导留学生、讲解Score Age Math Score Age

AMS394 Take-home Project Winter 2018
This personal project contains two parts. The first part (Q1-Q2) is for R, and the second (Q3-Q4) is for
SAS. Please save your code in doc or txt document. You should submit your project via the blackboard
by 11:59pm, Jan 20th (No late project will be accepted !!!). Please provide complete codes, necessary
assumptions checking, results and conclusions for full credit. Good luck!
Question 1:
Using the SATGPA data set in Stat2Data package. Test by using α= .05.
1) Create the following three variables and then print out all the six variables.
a. Create a new variable “SAT”, which is the sum of MathSAT and VerbalSAT.
b. Create second new variable “SATLevel”, and assign the value of “SATLevel” as 1 when
SAT1300.
c. Create third new variable “GPALevel” and assign the value of “GPALevel” as 1 when
GPA3.5
d. Print out all the data in the descending order of their GPALevel and the ascending order of
their SAT when GPALevel is the same.
2) Use the Chi-Square test to conclude if the SATLevel and GPALevel are independent.
3) Compute the mean and variance of “GPA” for each level of “GPALevel”, and compute the
correlation matrices for the four variables: MathSAT, VerbalSAT, GPA and SAT.
4) Do the data provide sufficient evidence to indicate that the mean of MathSAT is significantly greater
than the mean of VerbalSAT.
5) Test if the proportion of MathSAT greater than VerbalSAT is 0.6.
Question 2:
Analyze and interpret the effect of explanatory variables on the milk intake (dl.milk) in the kfm data set
(ISwR) using a multiple regression model. Test by using α= .05.
1) Run regression for dl.milk on all other variables. Do you find any significance that milk intake
can be explained by other variables?
2) Find regression models in which fewer explanation variables should be used. i.e., select a subset
of variables so that a better fit can be achieved.
Question 3:
Write a SAS DATA step to read the following data. The data is separated by the commas. The list of
variables is ID, GENDER, SCORE, DATE (mmddyyyy), AMOUNT and PROFIT(dollar). (Note that the
variable AMOUNT is a four-digit integer with a comma format. e.g: 1,000=1000). (hint: column input is
not proper.)
001,M,98,10/11/1981,1,000,$7.81
002,F,100,03/23/1984,9,999,$17.91
003,M,89,04/11/1979,1,200,$1.42
004,M,77,02/23/1985,5,300,$9.26
Write a SAS PROC step to print out the observations on condition that the AMOUNT is greater than 1100
and the PROFIT is greater than $2. Please keep the format for DATE, AMOUNT and PROFIT.

Question 4:

1) Using the following sample data, compare the Math scores among three groups without considering
age ranges. Test by using α= .01.
a. Perform. a one-way ANOVA comparing the math scores among three groups.
b. If the means are not equal, perform. a multiple comparison.
c. Create a contrast to compare group B against the mean of group A and group C.

2) You want to determine if the mean score on a standardized math test is different among three groups
of schoolchildren ranging in age from 12 to 18. Perform. the analysis with an adjustment based on
age. Test by using α= .01.
a. Using a two-way analysis of covariance, compare the math scores among the three groups
and two age ranges (12-14 and 15-18).
b. Make a two-way interaction plot.
c. Create a new variable named ‘cond’ with the six values A_12-14, A_15-18, B_12-14,
B_15-18, C_12-14, C_15-18. Perform. one-way design with the single factor (cond) having
6 levels.
Math Scores and Age range for groups A, B, and C
Group A Group B Group C
Math Score Age Math Score Age Math Score Age
90 15-18 92 15-18 97 15-18
88 15-18 88 12-14 92 12-14
72 12-14 76 12-14 88 12-14
82 15-18 76 15-18 94 15-18
65 12-14 90 15-18 99 15-18
74 12-14 68 12-14 82 12-14

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!