stat_out_score_null: stat_out_score_null

View source: R/MARGE_package.R

stat_out_score_nullR Documentation

stat_out_score_null

Description

A function that calculates parts for the score statistic for GEEs (it is used for the full path for forward selection).

Usage

stat_out_score_null(
  Y,
  N,
  n,
  id,
  family = "gaussian",
  corstr = "independence",
  B_null,
  nb = FALSE,
  is.gee = FALSE,
  ...
)

Arguments

Y

: the response variable.

N

: the number of clusters.

n

: the maximum cluster size.

id

: the ID for each individual in the cluster.

family

: the specified "exponential" family for GLMs. The default is family = "gaussian".

corstr

: the specified "working correlation" structure. The default is corstr = "independence".

B_null

: model matrix under the null model.

nb

: a logical argument, is the model a negative binomial model? The default is FALSE.

is.gee

: a logical argument, is this a GEE model? The default is FALSE.

...

: further arguments passed to or from other methods.

Details

The null model used here is by definition the current parent model. We compare the alternative model (a new basis function combined with the parent) with the null model. In the code used, only the null model is fit (the dispersion parameter is also estimated for GEE) and then the score statistic is obtained.

Value

stat_out_score_null returns a list of values (mainly products of matrices) that make up the final score statistic calculation (required for another function).

Author(s)

Jakub Stoklosa and David I. Warton.

References

Stoklosa, J., Gibb, H. and Warton, D.I. (2014). Fast forward selection for generalized estimating equations with a large number of predictor variables. Biometrics, 70, 110–120.

Stoklosa, J. and Warton, D.I. (2018). A generalized estimating equation approach to multivariate adaptive regression splines. Journal of Computational and Graphical Statistics, 27, 245–253.

See Also

stat_out and stat_out_score_glm_null


JakubStats/marge documentation built on Feb. 25, 2024, 9:38 p.m.