Learn R Programming

causalOT (version 1.0.2)

ESS: Effective Sample Size

Description

Effective Sample Size

Usage

ESS(x)

# S4 method for numeric ESS(x)

# S4 method for causalWeights ESS(x)

Value

Either a number denoting the effective sample size or if x is of class causalWeights, then returns a list of both values in the treatment and control groups.

Arguments

x

Either a vector of weights summing to 1 or an object of class causalWeights

Methods (by class)

  • ESS(numeric): default ESS method for numeric vectors

  • ESS(causalWeights): ESS method for objects of class causalWeights

Details

Calculates the effective sample size as described by Kish (1965). However, this calculation has some problems and the PSIS() function should be used instead.

See Also

PSIS()

Examples

Run this code
x <- rep(1/100,100)
ESS(x)

Run the code above in your browser using DataLab