Yes, I think that’s right – if I follow @nfultz’s advice, I get the same point estimate, but the variance estimates aren’t the same, in part because of the Robust SEs that are being estimated, but also because lm_robust doesn’t know about the strata directly.

```
library(DeclareDesign)
library(survey)
set.seed(343)
design <-
declare_population(
N = 1000,
X = rbinom(N, 1, 0.3),
Y = rnorm(N, mean = 3 + 0.5 * X, sd = 1 + 0.2 *
X)
) +
declare_sampling(strata = X, strata_prob = c(0.2, 0.4))
dat <- draw_data(design)
survey_design <-
svydesign(
id = ~ ID,
strata = ~ X,
probs = ~ S_inclusion_prob,
data = dat
)
svy_fit <- svyglm(Y ~ 1, design = survey_design)
tidy(svy_fit, conf.int = TRUE)
lm_robust_fit <- lm_robust(Y ~ 1, weights = 1/S_inclusion_prob, data = dat)
tidy(lm_robust_fit)
```