Learn R Programming

pprof (version 1.0.2)

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

Description

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

Usage

# S3 method for logis_re
test(fit, parm, level = 0.95, null = 0, alternative = "two.sided", ...)

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.

Arguments

fit

a model fitted from logis_re.

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.

null

a number defining the null hypothesis for the provider effects. The default value is 0.

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

The function identifies outlying providers based on hypothesis test results. For two-sided tests, 1 indicates performance significantly higher than expected, -1 indicates lower, For one-sided tests, 1 (right-tailed) or -1 (left-tailed) flags are used. Providers whose performance falls within the central range are flagged as 0. Outlying providers are determined by the test statistic falling beyond the threshold based on the significance level \(1 - \text{level}\).

Examples

Run this code
data(ExampleDataBinary)
outcome <- ExampleDataBinary$Y
ProvID <- ExampleDataBinary$ProvID
covar <- ExampleDataBinary$Z
fit_re <- logis_re(Y = outcome, Z = covar, ProvID = ProvID)
test(fit_re)

Run the code above in your browser using DataLab