psatGLM: Inference for Generalized Linear Models Selected via an...

Description Usage Arguments Details Value See Also

Description

psatGLM is used to estimate regression models that were selected based on a single aggregate test of the of form

β' K β > c > 0

or

a'β < l or a'β > u

where β is the MLE estimate for the regression coefficients.

Usage

1
2
3
4
5
6
psatGLM(X, y, contrasts = NULL, test = "wald",
  test_direction = c("two-sided", "lower", "upper"), family = "gaussian",
  resid_sd = c("null", "naive"), threshold = NULL, pval_threshold = 0.05,
  estimate_type = c("mle", "naive"), pvalue_type = c("hybrid", "polyhedral",
  "naive"), ci_type = c("switch", "polyhedral", "naive"),
  confidence_level = 0.95, verbose = TRUE, control = psatControl())

Arguments

X

the design matrix of the regression model without an intercept.

y

the observed dependent variable.

contrasts

an optional matrix of contrasts to be tested: must have number of columns identical to ncol(X). If left as NULL, the regression coefficients will be tested by default.

test

For a quadratic test, the string 'wald' or a semi-positive matrix of dimension ncol(X) X ncol{X}. For a linear test a vector of length ncol(X).

test_direction

see mvnLinear for details.

family

see glm for details.

resid_sd

method for estimating the covariance matrix or, optionaly a standard deviation estimate for linear model. Built in estimation methods are Re-fitted least squares if 'naive' or intercept model if 'null'.

threshold

a threshold that the aggregate test must cross in order for the model to be estimated. Should be a positive scalar for quadratic tests and a vector of size 2 for linear aggregate tests.

pval_threshold

if threshold is not specified, then a threshold will be set such that the selection occures iff aggregate_pval < pval_threshold.

estimate_type

see mvnQuadratic for details.

pvalue_type

see mvnQuadratic for details.

ci_type

see mvnQuadratic for details.

confidence_level

see mvnQuadratic for details.

verbose

whether the progress of the inference function should be reported.

control

an object of type psatControl.

Details

psatGLM is used to perform inference in generalized linear models that were selected via a single aggregate test. This function essentially works as a wrapper for mvnQuadratic and mvnLinear. See the documentation of mvnQuadratic for details regrading the available inference methods.

The function works by fitting a regression model using the glm function. If resid_sd is set to "naive" then the covariance matrix is estimated based on the initial model fit. If resid_sd is set to "null" then the covariance matrix will be estimated based on an intercept model. Once a model has been estimated, an aggregate test is performed based on the estimated covariance with the intercept removed and the vector of regression coefficients is passed to mvnQuadratic or mvnLinear without the intercept.

Value

An object of type psatGLM

See Also

mvnQuadratic, mvnLinear, getCI, getPval, plot.psatGLM, summary.psatGLM, coef.pastGLM, predict.psatGLM


ammeir2/PSAT documentation built on May 27, 2019, 7:40 a.m.