代做STATS 763 - 2020 - Final assessment帮做Python语言

STATS 763 - 2020 - Final assessment

Due by 4 July 2020 at 12:59 PM

Question 1. [15 marks total]


All cases of non-pregnancy-related listeriosis (a contaminated food-borne disease) occurring in Germany in 2012-2013 were identified. Controls were randomly sampled throughout the country using stratified sampling by age group. Basic information about the sample and population is given in the table below:

We are interested in the effect of consuming cold sausage on listeriosis occur-rence. The data are described as follows:

The first few records in the data are as follows:

> lis %>% head

# A tibble: 6 x 6

Listeriosis ‘Age group‘ ‘Education level‘ Sex Residence ‘Cold sausage‘

<dbl> <fct> <fct> <fct> <fct> <dbl>

1 0 66-75 years Medium Female Town 0

2 0 <66 years High Female Town 0

3 0 <66 years Medium Male Town 0

4 0 >75 years Medium Male City 0

5 0 <66 years Medium Male Town 0

6 0 >75 years Medium Female Town 0

We estimate the effect of eating cold sausage for each Residence type and Age

group, adjusting for Residence, Age group, Education level and Sex:

> mod <- glm(Listeriosis~Residence*‘Cold sausage‘+‘Age group‘*‘Cold sausage‘+

+ ‘Education level‘+Sex,family=quasibinomial,data=lis)

> summary(mod)

Coefficients:

Estimate Std. Error t value Pr(>|t|)

(Intercept) -2.68228 0.61584 -4.355 1.4e-05 ***

ResidenceTown 0.47075 0.50280 0.936 0.349264

ResidenceCity 0.33780 0.53923 0.626 0.531105

‘Age group‘66-75 years 0.14661 0.35010 0.419 0.675433

‘Age group‘>75 years -0.27777 0.38667 -0.718 0.472621

‘Cold sausage‘ 1.88051 0.66232 2.839 0.004571 **

‘Education level‘Medium -0.90318 0.35747 -2.527 0.011602 *

‘Education level‘High -1.50549 0.42215 -3.566 0.000371 ***

SexFemale 0.06277 0.23756 0.264 0.791629

ResidenceTown:‘Cold sausage‘ -1.29123 0.69861 -1.848 0.064722 .

ResidenceCity:‘Cold sausage‘ -0.12498 0.71799 -0.174 0.861827

‘Age group‘66-75 years:‘Cold sausage‘ -0.83537 0.55918 -1.494 0.135369

‘Age group‘>75 years:‘Cold sausage‘ -0.41770 0.58412 -0.715 0.474645

---

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for quasibinomial family taken to be 1.038695)

Null deviance: 702.15 on 1853 degrees of freedom

Residual deviance: 663.69 on 1841 degrees of freedom

AIC: NA

Number of Fisher Scoring iterations: 6

a) [2 marks]

Explain briefly why it is necessary to include the Age group in this model to correctly estimate the effect of eating cold sausage on non-pregnancy-related (NPR) listeriosis.

b) [2 marks]

Explain briefly why the coefficient estimates for cold sausage above are ap-proximately those of log-relative risks.

c) [3 marks]

What is the estimated relative risk of NPR listeriosis from eating vs not eating cold sausage amongst Village residents older than 75 years?

d) [3 marks]

Is there any combination of factor levels for which the estimated relative risk of NPR listeriosis from eating vs not eating cold sausage is smaller than 1? If so, describe any such combination.

e) [2 marks]

Consider the log-odds ratio of NPR listeriosis amongst Village residents younger than 66 years. What would its standard error be under a binomial regression model with logit link?

f) [3 marks]

An alternative way to analyse these data is design-weighted estimation, using for instance the svyglm function from the survey package. What weights would you use on each observation to estimate similar relative risks as above?

Question 2. [15 marks total]

In economics and sociology there are competing theories to explain the higher in-come of people with university degrees. Here are three examples:

• The Human Capital theory says that university education improves both specific knowledge about certain topics and some general reasoning and com-munication skills, so that people who gain university degrees become more valuable employees than they would otherwise have been. Some degrees are more valuable than others because you learn more employment-relevant skills doing them.

• The Signalling theory says that university education is difficult, and gaining a university degree shows employers that you are more able than other poten-tial employees, even though the education you receive is not valuable to the employer. Some degrees are more valuable than others because they are more difficult and so people who get those degrees have higher average ability.

• The Social Stratification theory says that university education functions to show that you come from a relatively affluent or otherwise high-status family, and so you are not the sort of person that the employer likes to discriminate against. Some degrees are more valuable than others because they discrimi-nate more effectively against low-status people.

Here is a causal directed graph for relationships between these variables, where the lack of an arrow indicates you may assume there is no effect.

a) [6 marks]

For each of the three theories, remove as few edges as possible from the graph to give the graph if that theory were the only explanation operating. (you may either draw the graphs or list the edges to be removed)

b) [3 marks]

Under the Signalling hypothesis, what are the confounding paths from degree to income?

c) Suppose that ability was measured on a random sample of people by testing at high school, and status by an interview of individuals and families

i [2 marks]

If (unrealistically) the measurements were perfectly accurate, give a model that would estimate the (total) effect of learning on income

ii [2 marks]

Which theory or theories would be supported by a large value of this effect?

iii [2 marks]

If, instead, the measurements were made with substantial error or un-certainty, what would be the impact on the effect estimate?

Question 3. [20 marks total]

A company is marketing an expensive new drug to lower cholesterol. In order to justify the price, they want to find a subset of potential users where the effect of the drug is particularly large.

They have data on 3,500 people who took the drug in a randomised trial, with two cholesterol measurements before the start of treatment and six measurements after the start of treatment, all at three-month intervals (Yi1...Yi8), with

Di = 6/1 (Yi3 + Yi4 + Yi5 + Yi6 + Yi7 + Yi8) − 2/1 (Yi1 + Yi2),

the average change, being the preferred summary of the effect.

They also have 10,000 binary predictor variables G1, . . . , G10000, with each one measuring whether the person has (1) or does not have (0) a particular genetic variant. Scientists expect that most of the genetic variants will have no effect on cholesterol, but that some will have quite large effects on cholesterol regardless of whether the person is taking the drug (they affect both the pre-treatment and on-treatment values) and others will have quite large effects on the reduction in cholesterol due to taking the drug (they affect only the on-treatment values).

a) i [4 marks]

What is one technique covered in the course that would be appropriate for finding a model to predict D from the Gs?

ii [4 marks]

In this context, what are the the advantages and disadvantages of cross-validation in estimating prediction error compared to a training set/validation set split of the data?

b) Data is also available on the proportion Xit of their prescribed pills that person i took in the time period leading up to measurement Yit (for t > 2). The researchers are willing to assume that the genetic variables do not affect the proportion of pills that someone takes.

i [4 marks]

If you simply regress the observations (Yit) t>2 on Xit using lm(), what parts of the output will be correct and what parts will be misleading?

ii [4 marks]

What is one technique for getting valid inference about the association between X and Y ?

iii [4 marks]

The researchers are interested in how much the relationship between X and Y varies from person to person. How could you estimate this?





热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图