Sampling Plan | Design-based inference | Model-based inference |
---|---|---|
Probability sample |
A |
C |
Model-dependent sample |
B |
D |
Quota sampling |
E |
F |
Convenience sampling |
G |
H |
Snowball sampling |
I |
J |
Peer nomination |
K |
L |
\[ D^2(\hat{\theta}) = \frac{SE(\hat{\theta})^2_{complex}}{SE(\hat{\theta})^2_{srs}} = \frac{var(\hat{\theta})_{complex}}{var(\hat{\theta})_{srs}} \]
\[ n_{eff} = \frac{n_{complex}}{d^2(\hat{\theta})} \]
discwt
field for national estimatessummary(lm(los~age, data=cdiff))
##
## Call:
## lm(formula = los ~ age, data = cdiff)
##
## Residuals:
## Min 1Q Median 3Q Max
## -14.19 -7.12 -3.98 2.27 349.01
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 14.190744 0.187955 75.50 <2e-16 ***
## age -0.043275 0.002687 -16.11 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.94 on 73264 degrees of freedom
## Multiple R-squared: 0.003528, Adjusted R-squared: 0.003514
## F-statistic: 259.4 on 1 and 73264 DF, p-value: < 2.2e-16
library('survey')
cdiff.design <- svydesign(ids = ~hospid, data = cdiff, weights = ~discwt, strata = ~nis_stratum, nest=TRUE)
summary(svyglm(los~age, design=cdiff.design))
##
## Call:
## svyglm(formula = los ~ age, design = cdiff.design)
##
## Survey design:
## svydesign(ids = ~hospid, data = cdiff, weights = ~discwt, strata = ~nis_stratum,
## nest = TRUE)
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 13.95231 0.55033 25.353 < 2e-16 ***
## age -0.04657 0.00637 -7.311 6.27e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for gaussian family taken to be 180.579)
##
## Number of Fisher Scoring iterations: 2
Khera and Krumholz, 2017
Khera and Krumholz, 2017
Khera and Krumholz, 2017