logis_fe
objectConduct hypothesis tests on provider effects and identify outlying providers for a fixed effect logistic model.
# S3 method for logis_fe
test(
fit,
parm,
level = 0.95,
test = "exact.poisbinom",
score_modified = TRUE,
null = "median",
n = 10000,
threads = 1,
alternative = "two.sided",
...
)
A data frame containing the results of the hypothesis test, with the following columns:
a flagging indicator where 1
means statistically higher than expected
and -1
means statistically lower than expected.
the p-value of the hypothesis test.
the test statistic.
The standard error of the provider effect estimate, included only when test = "wald"
.
a model fitted from logis_fe
.
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.
the confidence level during the hypothesis test, meaning a significance level of \(1 - \text{level}\). The default value is 0.95.
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.
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.
a character string or a number specifying null hypotheses of fixed provider effects. The default is "median"
.
resample size for bootstrapping when ("test = exact.bootstrap"
). The default value is 10,000.
an integer specifying the number of threads to use. The default value is 1.
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.
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.
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.
data(ExampleDataBinary)
outcome = ExampleDataBinary$Y
covar = ExampleDataBinary$Z
ProvID = ExampleDataBinary$ProvID
fit_fe <- logis_fe(Y = outcome, Z = covar, ProvID = ProvID, message = FALSE)
test(fit_fe, test = "score")
Run the code above in your browser using DataLab