SM_output.linear_fe: Calculate direct/indirect standardized differences from a...

View source: R/SM_output.linear_fe.R

SM_output.linear_feR Documentation

Calculate direct/indirect standardized differences from a fitted linear_fe object

Description

Provide direct/indirect standardized differences for a fixed effect linear model.

Usage

## S3 method for class 'linear_fe'
SM_output(fit, parm, stdz = "indirect", null = "median", ...)

Arguments

fit

a model fitted from linear_fe.

parm

specifies a subset of providers for which confidence intervals are to be given. By default, all providers are included. The class of parm should match the class of the provider IDs.

stdz

a character string or a vector specifying the standardization method(s). The possible values are:

  • "indirect" (default) indirect standardization method.

  • "direct" direct standardization method.

  • c("indirect", "direct") outputs both direct and indirect standardized measures.

null

a character string or a number defining the population norm. The default value is "median". The possible values are:

  • "median" the median of the provider effect estimates (\hat{\gamma}_i).

  • "mean" the weighted average of the provider effect estimates (\hat{\gamma}_i), where the weights correspond to the sample size of each provider.

  • numeric a user-defined numeric value representing the population norm.

...

additional arguments that can be passed to the function.

Details

This function computes standardized differences for a fixed effect linear model using either direct or indirect methods, or both when specified. For each method, the population norm is determined by the null argument. The population norm can be the median of the estimates, their weighted mean (with weights corresponding to provider sizes), or a user-defined numeric value.

Value

A list containing the standardized differences based on the method(s) specified in stdz, as well as the observed and expected outcomes used to calculate the standardized measures:

indirect.difference

indirect standardized differences, if stdz includes "indirect".

direct.difference

direct standardized differences, if stdz includes "direct".

OE

a list of data frames containing the observed and expected outcomes used for calculating standardized measures.

Examples

data(ExampleDataLinear)
outcome <- ExampleDataLinear$Y
covar <- ExampleDataLinear$Z
ID <- ExampleDataLinear$ID
fit_linear <- linear_fe(Y = outcome, Z = covar, ID = ID)
SM_output(fit_linear)
SM_output(fit_linear, stdz = "direct", null = "mean")


pprof documentation built on April 12, 2025, 1:33 a.m.