score_stats_only: score_stats_only.R

Description Usage Arguments Value Examples

View source: R/score_stats_only.R

Description

Starting with individual-level data on p factors, generate score test statistics for each factor for input into GBJ/GHC/HC/BJ/minP. DOES NOT get the correlations (assumed known).

Usage

1
score_stats_only(null_model, factor_matrix, link_function, P_mat = NULL)

Arguments

null_model

An R regression model fitted using glm(). Do not use lm(), even for linear regression!

factor_matrix

An n*d matrix with each factor as one column. There should be no missing data.

link_function

Either "linear" or "logit" or "log".

P_mat

The projection matrix used in calculation may be passed in to speed up the calculation. See paper for details. Default is null.

Value

The d score test statistics.

Examples

1
2
3
4
Y <- rbinom(n=100, size=1, prob=0.5)
null_mod <- glm(Y~1, family=binomial(link="logit"))
factor_matrix <- matrix(data=rnorm(n=100*5), nrow=100)
score_stats_only(null_mod, factor_matrix, "logit")

GBJ documentation built on May 2, 2019, 2:39 a.m.