Skip to contents

Estimate a mean using a declared survey design

Usage

estimate_mean(x, outcome, weight, domain = FALSE, missing = c("fail", "omit"))

Arguments

x

A studyframe.

outcome

Stable numeric outcome identifier.

weight

Explicit weight declaration identifier.

domain

Interpret a restricted view as a population domain.

missing

fail or omit. Omission is recorded and does not justify nonresponse assumptions.

Value

A studyframe_result; uses the same requirements as check_analysis. Its receipt specifies 95 percent Student t intervals using the design degrees of freedom, which must be positive and finite. Obtain those intervals with stats::confint(result$fit, df = result$analysis$design_df); survey's default confint uses normal intervals.