Learn R Programming

WeightIt (version 0.3.0)

summary.weightit: Print and Summarize Output

Description

summary() generates a summary of the weightit or weightitMSM object to evaluate the properties of the estimated weights.

Usage

# S3 method for weightit
summary(object, top = 5,
        ignore.s.weights = FALSE, ...)

# S3 method for summary.weightit print(x, ...)

# S3 method for weightitMSM summary(object, top = 5, ignore.s.weights = FALSE, ...)

# S3 method for summary.weightitMSM print(x, ...)

Arguments

object

a weightit or weightitMSM object; the output of a call to weightit() or weightitMSM().

top

how many of the largest and smallest weights to display. Default is 5.

ignore.s.weights

whether or not to ignore sampling weights when computing the weight summary. If FALSE, the default, the estimated weights will be multiplied by the sampling weights (if any) before values are computed.

x

a summary.weightit or summary.weightitMSM object; the output of a call to summary.weightit() or summary.weightitMSM().

...

arguments passed to print.

Value

For point treatments (i.e., weightit objects), a summary.weightit object with the following elements:

weight.range

The range (minimum and maximum) weight for each treatment group.

weight.top

The units with the greatest weights in each treatment group; how many are included is determined by top.

weight.ratio

The ratio of the largest weight to the smallest weight in each treatment group and overall.

coef.of.var

The coefficient of variation (standard deviation divided by mean) of the weights in each treatment group and overall.

effective.sample.size

The effective sample size for each treatment group before and after weighting.

For longitudinal treatments (i.e., weightitMSM objects), a list of the above elements for each treatment period.

See Also

weightit, weightitMSM, summary

Examples

Run this code
# NOT RUN {
# See example at ?weightit or ?weightitMSM
# }

Run the code above in your browser using DataLab