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

View source: R/test.linear_re.R

test.linear_reR Documentation

Conduct hypothesis testing for provider effects from a fitted linear_re object

Description

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

Usage

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

Arguments

fit

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

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.

Examples

data(ExampleDataLinear)
outcome <- ExampleDataLinear$Y
ID <- ExampleDataLinear$ID
covar <- ExampleDataLinear$Z
fit_re <- linear_re(Y = outcome, Z = covar, ID = ID)
test(fit_re)


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