Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

STATS 240: Design of Surveys And Experiments

Assignment 2, 2022

1.    (5 MARKS)

An auditor sampled 2 Departments from each of the Faculties that made up a University, and then for each selected Department, randomly selected 2 months from the year and collected data about compliance with university policies of the financial transactions of the Department in that month.

a.    Was stratified sampling used? If so what were the strata? (2 MARKS)

b.   Was cluster sampling used? If so what were the clusters. (If cluster sampling was used more than once then describe for each stage.) (2 MARKS)

c.    What are the PSUs (primary sampling units) in this survey? (1 MARK)

The following questions relate to the data from New Zealand Quality in Healthcare Study. This study assessed the occurrence, impact and preventability of adverse events recorded in New Zealand public hospitals. The study            sampled 6,579 admissions in 1998 from those occurring in NZ tertiary and secondary public hospitals with over 100

beds.  Documentation can be found in New Zealand Quality of Healthcare Study.pdf

Read the data set in NZqhs.240.csv into iNZight Lite.

2.   (9 MARKS)

a.    How many strata do we have? (1 MARK)

b.    How many clustering codes are being used? (1 MARK)

c.    Show a table for the number of admissions per cluster (note, each cluster is a different hospital). Think about what you have to do before producing this table. (1 MARK)

d.   What is the highest number of admissions sampled from a hospital? (1 MARK)

e.   What is the most common admission type? (1 MARK)

f.    What is the range of weights? (1 MARK)

g.    Using descriptive information about the weights, calculate the minimum, median and maximum sampling fractions to 4 decimal places. (3 MARKS)

3.    (8 MARKS)

a.    List the variables that are currently stored as categorical. (1 MARKS)

b.    For each the variables: depgp, acute, mdcgrp, and aey:

i.   Create categorical variables.

ii.   Rename the levels according to the levels listed in New Zealand Quality of Healthcare Study.pdf.

iii.    Name your final variables (that are categorised with levels named as above):

depgp_cat

acute_cat

mdcgrp_cat

aey_cat

iv.    Show summaries for:

depgp_cat

acute_cat

mdcgrp_cat

aey_cat                                                                                                                                                          (4 MARKS)

c.    Construct a class-interval” variable using the age variable with 6 intervals and break points at 5, 20, 40, 60, 75, using [closed left, open right).

Rename the levels: “0-4”, “5- 19”, “20-39”, “40-59”, “60-74”, “75+” .

Call the final variable (with the renamed levels) ageband.

Produce a summary of ageband.                                                                                                                          (3 MARKS)

4.    (8 MARKS)

a.    Specify the survey design for NZqhs using stratum_id as the strata variable, cluster_id as the 1st stage     clustering variable, and wt as the weighting variable.  What is the estimated population size?   (1 MARK)

b.    Now produce a table of summaries in the population for : depgp_cat

acute_cat

mdcgrp_cat

aey_cat

ageband                                                                                                                                                                         (5 MARKS)

c.    Compare the population summaries in 4b with the sample summaries in 3b and 3c.  How many of the       five variables have group proportions in the population that differ from group proportions in the sample by more than 1 percentage point?  Based on your answer, do you think the unweighted (sample)

summaries represent the population well?                                                                                                 (2 MARKS)