R代写-141XP
时间:2022-03-12
Stats141XP
Assessment of Statistical Literacy
W2022
Esfandiari & Zes
March 6, 2022
This assessment will be posted Friday March 11th at 11:00am. Due Sunday March 13th at 11:00pm.
Late submission is not accepted.
Last Name:
First Name:
Student ID:
Question Possible points Actual points
One 25
Two 25
Three 15
Four 20
Five 15
Total points 100
This exam is open book, open notes and open internet. YOU ARE REQUIRED TO DO THIS
ON YOUR OWN AND GIVE YOUR WORD OF HONOR THAT YOU WILL NOT ASK FOR
OR RECEIVE ANY HELP FROM ANOTHER. ANY MISCONDUCT WILL BE REPORTED
TO THE DEAN’S OFFICE AND IT WILL BE DEALT WITH BASED ON UNIVERSITY REG-
ULATIONS.
I give my word of honor to complete this exam on my own and not contact any of my classmates
or anybody else for help.
Signature
1
1 Question 1
See article “Lonliness, social isolation, and pain following the COVID-19 outbreak” and answer the
following prompts. Figures 3 and 4 from the article are presented below.
Suppose you are the TA for Stats141XP, and you need to explain the application of multinomial
regression. Using figures 3 and 4, answer the following questions.
1. What is the outcome?
2. What are the predictors?
3. Interpret the intervals for headache within context.
4. Can you explain how many logistic models results from figure four? Explain what they are?
5. State the research question underlying figures three and four within context.
6. Comparing figures three and four, interpret the confidence intervals of always having headache
prior to and during covid-19 pandemic within context.
7. If you wanted to summarize the association between social isolation, and pain following the
COVID-19 outbreak in Japan, in five lines, what would you say.
ͷͶ
Vol:.(1234567890)
Ƥ
| (2021) 11:18643 | ǣȀȀǤȀͷͶǤͷͶ;ȀͺͷͻͿ;ǦͶͷǦͿͽͷͼǦ
www.nature.com/scientificreports/
Ȁ
Ǥ Table 2, Figs. 1, 2, 3, and 4 indicate that both loneliness and the perception
of increased social isolation during the pandemic were positively associated with the prevalence and incidence of
all types of pain (i.e., headache, neck or shoulder pain, upper limb pain, low back pain, and leg pain).
Ǥ Table 3 and Fig. 5 indicate the di"erences in reported pain intensity according to the
UCLA-LS3-SF3 scoring groups and the frequency with which participants reported an increase in feelings of
social isolation. Compared to participants who did not experience loneliness or increased social isolation, those
Figure 3. Frequency of feelings of social isolation and pain symptoms since before the COVID-19 outbreak.
Odds ratios of each pain symptom in model 2 according to the frequency of feelings of social isolation
compared to never felt feelings of social isolation were indicated. X-axis indicated odds ratio. Bars indicated 95%
con#dence intervals. Abbreviation: OR odds ratio.
Figure 4. Frequency of feelings of social isolation and pain symptoms developed during the COVID-19
pandemic. Odds ratios of each pain symptom in model 2 according to the frequency of feelings of social
isolation compared to never felt feelings of social isolation were indicated. X-axis indicated odds ratio. Bars
indicated 95% con#dence intervals. Abbreviation: OR odds ratio.
2
ͷͶ
Vol:.(1234567890)
Ƥ
| (2021) 11:18643 | ǣȀȀǤȀͷͶǤͷͶ;ȀͺͷͻͿ;ǦͶͷǦͿͽͷͼǦ
www.nature.com/scientificreports/
Ȁ
Ǥ Table 2, Figs. 1, 2, 3, and 4 indicate that both loneliness and the perception
of increased social isolation during the pandemic were positively associated with the prevalence and incidence of
all types of pain (i.e., headache, neck or shoulder pain, upper limb pain, low back pain, and leg pain).
Ǥ Table 3 and Fig. 5 indicate the di"erences in reported pain intensity according to the
UCLA-LS3-SF3 scoring groups and the frequency with which participants reported an increase in feelings of
social isolation. Compared to participants who did not experience loneliness or increased social isolation, those
Figure 3. Frequency of feelings of social isolation and pain symptoms since before the COVID-19 outbreak.
Odds ratios of each pain symptom in model 2 according to the frequency of feelings of social isolation
compared to never felt feelings of social isolation were indicated. X-axis indicated odds ratio. Bars indicated 95%
con#dence intervals. Abbreviation: OR odds ratio.
Figure 4. Frequency of feelings of social isolation and pain symptoms developed during the COVID-19
pandemic. Odds ratios of each pain symptom in model 2 according to the frequency of feelings of social
isolation compared to never felt feelings of social isolation were indicated. X-axis indicated odds ratio. Bars
indicated 95% con#dence intervals. Abbreviation: OR odds ratio.
2 Question 2
The objective of a study is to examine the effect of three diet programs on men and women while
controlling for the pre-weight. Given the data set called diet.csv, answer the following questions:
1. Conduct the appropriate analysis.
2. Check the relevant assumptions.
3. If need be conduct and interpret the relevant post-hocs.
4. Write the linear model for the study.
5. Interpret the results within context.
6. Does the study have practical significance. Back up your conclusion by doing the relevant
calculations and interpretations.
7. Suppose that in addition to controlling for pre-weight, you also control for gender, age, and
height. Would the practical significance of the diet program improve? Yes or no and explain
why.
3
3 Question 3
Suppose that you were the TA for this class, how would you explain/summarize the following ROC
curve and table for your students? Elaborate what AUC, accuracy MSE, RMSE, MAE indicate.
5HVXOWV LQ 3K\VLFV
! 6
(
!9
#
$'
#
!,
,
!
#
G0
!
!
6
(
C
!
$'
,
$'
5
#
!
$'+
,6
5
#
5
!
$'+
,6
(
#
!
5
$<
;64+@
5
#0
5
$<
;643>6
(
!
#
,
#
! 6
$
!,
#
#,
$'
#
#
#
!,
,6
(
!,
0
!
$'+
,
#
,0
!
$'
,6
$
#
5
,9
#
!!
!,
0
6
*
)+
(
0
,
5
!
9
!
!
,
!!
O
5
!
!!6
A3B ,
'*
) :
(
D
'"
'
6
,
!
0!6
+;3;K>F@
-=+==.J88–4+6
A+B !
1
#
*#
6
#
0
,! 6
$
0
+;3@K3@3->.J4E4–=36
!JHH6
H3;63;3FHG6G6+;3@6;36;>F6
A@B
)
L
2
L
(
P
D
L
6
$
#,
!,
0
#
,
5
,
6
)
3+-4.K
+;3FJ
3;;E88@6
"$ '
,
* #6
"&
7
")6
"% '
,
")6
"' !
'
,6
!
$'+
,
6
"
$<
0
-?.
"*
'"*
"$*
"
;6FE+
=@6=>+E
;6+F+F
;6E3+>
;6+F+F
1
;68E4
836;34E
;63848
;6>@E=
;63848
,0
;6F+=
=+68;@E
;6+=34
;6E+3E
;6+=34
'
&
;643>
8=6;++3
;63++;
;6@>4>
;63++;
"
;68=@
8+63E4F
;63=8>
;6>++>
;63=8>
)
;6FE>
=@6>>;F
;6+FEF
;6E3@E
;6+FEF
$
;68==
8@6@@@@
;63FF=
;6>;8+
;63FF=
2
;688;
836+8==
;638=3
;6>@+F
;638=3
* #
;64+@
8=6=4@>
;63+48
;6@F;+
;63+48
")
;683;
=463>3+
;6+;8F
;6>EF=
;6+;8F
&
6 &
5HVXOWV LQ 3K\VLFV
! 6
(
!9
#
$'
#
!,
,
!
#
G0
!
!
6
(
C
!
$'
,
$'
5
#
!
$'+
,6
5
#
5
!
$'+
,6
(
#
!
5
$<
;64+@
5
#0
5
$<
;643>6
(
!
#
,
#
! 6
$
!,
#
#,
$'
#
#
!,
,6
(
!,
0
!
$'+
,
#
,0
!
$'
,6
$
#
5
,9
#
!!
!,
0
6
*
)+
(
0
,
5
!
9
!
!
,
!!
O
5
!
!!6
A3B ,
'*
) :
(
D
'"
'
6
,
!
0!6
+;3;K>F@
-=+==.J88–4+6
A+B !
1
#
*#
6
#
0
,! 6
$
0
+;3@K3@3->.J4E4–=36
!JHH6
H3;63;3FHG6G6+;3@6;36;>F6
A@B
)
L
2
L
(
P
D
L
6
$
#,
!,
0
#
,
5
,
6
)
3+-4.K
+;3FJ
3;;E88@6
"$ '
,
* #6
"&
7
")6
"% '
,
")6
"' !
'
,6
!
$'+
,
6
"
$<
.
"*
'"*
"$*
"
;6FE+
=@6=>+E
;6+F+F
;6E3+>
;6+F+F
1
;68E4
836;34E
;63848
;6>@E=
;63848
,0
;6F+=
=+68;@E
;6+=34
;6E+3E
;6+=34
'
&
;643>
8=6;++3
;63++;
;6@>4>
;63++;
"
;68=@
8+63E4
;63=8>
;6>++>
;63=8>
)
;6FE>
=@6>>;F ;6+FEF
6E3@E
;6+FEF
$
;68==
8@6@@@@
;63FF=
;6>;8+
;63FF=
2
;688;
836+8==
;638=3
;6>@+F
;638=3
* #
;64+@
8=6=4@>
;63+48
;6@F;+
;63+48
")
;683;
=463>3+
;6+;8F
;6>EF=
;6+;8F
&
6 &
4
Figure 1: G-Theory table for Question 4
4 Question 4
The purpose of a study was to examine the reliability of symptom assessments in 32 advanced
cancer patients. The raters (patient, primary nurse, and primary family care giver) independently
completed the symptom assessment under different occasions (24 hours apart). The patients were
rated on nine symptoms listed in Table/Figure 1.
1. Identify the sources of variation and explain each of them briefly; drawing a Venn Diagram
might help you.
2. Interpret the percent of variance explained for for shortness of breath (SOB) within context.
3. Which of the sources of variation contribute the most to the consistency of ratings? Are these
favorable or unfavorable for high consistency? Explain.
4. Which of the three interaction effects (pr, po, or ro) contribute the least to the consistency
of ratings? Are these favorable or unfavorable for high consistency? Explain.
5. Suppose you were the TA for this class, how would you explain Graph 2 to your students?
Be brief and write your answer within context.
5
Figure 2: G-Theory graph for Question 4
5 Question 5
Imagine you are working with a consulting firm. You are looking to hire a new statistician to your
team. The following data question was given to two candidates, Candidate 1 and Candidate 2, and
each respectively submitted the following Analyses.
For each analysis, i.e., each candidate’s submission, answer the following.
1. The appropriateness of the chosen model.
2. Provide an answer to the research question within the context of the research question.
3. Use the analysis results to illustrate a prediction, if possible.
Then, finally, which candidate would you hire?
5.1 Interview Data problem
An online store is testing a new checkout web page design layout. Layout A is the old layout, layout
B is the new layout (this is x1). The outcome is dichotmous, 0 if visitor did not complete their
6
purchase, 1 if they did. Accounting for log minutes spent on site (x2), and its possible moderating
effect on the relationship between layout and conversion, a hypothetical client wishes to know the
increased odds of conversion using the new layout.
5.1.1 Analysis 1 (from Candidate 1)
> summary(xlm)
Call:
lm(formula = y ~ x1 + x2 + x1:x2 - 1)
Residuals:
Min 1Q Median 3Q Max
-0.61030 -0.41917 -0.05464 0.46746 0.99302
Coefficients:
Estimate Std. Error t value Pr(>|t|)
x1A 0.055693 0.006643 8.384 <2e-16 ***
x1B 0.483746 0.006536 74.016 <2e-16 ***
x2 0.018764 0.006552 2.864 0.0042 **
x1B:x2 0.016902 0.009199 1.837 0.0662 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.3898 on 6996 degrees of freedom
Multiple R-squared: 0.4436, Adjusted R-squared: 0.4433
F-statistic: 1394 on 4 and 6996 DF, p-value: < 2.2e-16
7
Figure 3: Diagnostics from Analysis 1.
5.1.2 Analysis 2 (from Candidate 2)
> summary(xglm)
Call:
glm(formula = y ~ x1 + x2 + x1:x2 - 1, family = binomial(link = "logit"))
Deviance Residuals:
Min 1Q Median 3Q Max
-1.3709 -1.0427 -0.3257 1.1223 2.7756
Coefficients:
Estimate Std. Error z value Pr(>|z|)
x1A -2.88992 0.07828 -36.918 < 2e-16 ***
x1B -0.06538 0.03364 -1.943 0.05198 .
8
x2 0.36229 0.07457 4.858 1.19e-06 ***
x1B:x2 -0.21871 0.08172 -2.676 0.00744 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 9704.1 on 7000 degrees of freedom
Residual deviance: 6360.4 on 6996 degrees of freedom
AIC: 6368.4
Number of Fisher Scoring iterations: 5
Figure 4: Diagnostics from Analysis 2.
9