calc_summary_stats: Summarise data by block.

View source: R/calc_summary_stats.R

calc_summary_statsR Documentation

Summarise data by block.

Description

Given dataframe or list of variables, return table of stats for each randomization block.

Usage

calc_summary_stats(Yobs, Z, B, data = NULL, siteID = NULL, add.neyman = FALSE)

Arguments

Yobs

Name of outcome variable (assumed to exist in data)

Z

vector that indicates if outcome is under treatment or control

B

block ids

data

Dataframe with defined Yobs, Z, and B variables.

siteID

If not null, name of siteID that has randomization blocks nested inside.

add.neyman

If TRUE, add block-specific SEs using Neyman formula of $s^2_T/n_t + s^2_C/n_c$ as column in output.

Value

dataframe with summary statistics by block

See Also

Other calc_summary_stats: calc_summary_stats_formula()


lmiratrix/blkvar documentation built on Nov. 18, 2024, 1:27 p.m.