test.logis_fe: Conduct hypothesis testing for provider effects from a fitted...

View source: R/test.logis_fe.R

test.logis_feR Documentation

Conduct hypothesis testing for provider effects from a fitted logis_fe object

Description

Conduct hypothesis tests on provider effects and identify outlying providers for a fixed effect logistic model.

Usage

## S3 method for class 'logis_fe'
test(
  fit,
  parm,
  level = 0.95,
  test = "exact.poisbinom",
  score_modified = TRUE,
  null = "median",
  n = 10000,
  threads = 1,
  alternative = "two.sided",
  ...
)

Arguments

fit

a model fitted from logis_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.

level

the confidence level during the hypothesis test, meaning a significance level of 1 - \text{level}. The default value is 0.95.

test

a character string specifying the type of testing method to be conducted. The default is "exact.poisbinom".

  • "exact.poisbinom": exact test based on Poisson-binomial distribution of O_i|Z_i.

  • "exact.bootstrap": exact test based on bootstrap procedure.

  • "wald": wald test.

  • "score": score test.

score_modified

a logical indicating whether to use the modified score test ignoring the randomness of covariate coefficient for score teat ("test = score"). The default value is TRUE.

null

a character string or a number specifying null hypotheses of fixed provider effects. The default is "median".

n

resample size for bootstrapping when ("test = exact.bootstrap"). The default value is 10,000.

threads

an integer specifying the number of threads to use. The default value is 1.

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater", or "less".

...

additional arguments that can be passed to the function.

Details

By default, the function uses the "exact.poisbinom" method. The wald test is invalid for extreme providers (i.e. when provider effect goes to infinity). For the score test, consider that when the number of tested providers is large, refitting the models to get the restricted MLEs will take a long time. Therefore, we use unrestricted MLEs to replace the restricted MLEs during the testing procedure by default. However, the user can specify score_modified = FALSE to perform a standard score test.

Value

A data frame containing the results of the hypothesis test, with the following columns:

flag

a flagging indicator where 1 means statistically higher than expected and -1 means statistically lower than expected.

p-value

the p-value of the hypothesis test.

stat

the test statistic.

Std.Error

The standard error of the provider effect estimate, included only when test = "wald".

References

Wu, W, Yang, Y, Kang, J, He, K. (2022) Improving large-scale estimation and inference for profiling health care providers. Statistics in Medicine, 41(15): 2840-2853.

Examples

data(ExampleDataBinary)
outcome = ExampleDataBinary$Y
covar = ExampleDataBinary$Z
ID = ExampleDataBinary$ID
fit_fe <- logis_fe(Y = outcome, Z = covar, ID = ID, message = FALSE)
test(fit_fe, test = "score")


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