stepwisefit {SparseMSE} | R Documentation |
Stepwise fit using Poisson p-values.
Description
Starting with a model with main effects only, two-list parameters are added one by one.
At each stage the parameter with the lowest p-value is added, provided that p-value is lower than pthresh
, and provided that the resulting
model does not fail either of the tests in checkident
.
Usage
stepwisefit(zdat, pthresh = 0.02)
Arguments
zdat |
Data matrix with |
pthresh |
this is the threshold below which the p-value of the newly added parameter needs to be in order to be included in the model.
If |
Details
For each candidate two-list parameter for possible addition to the model, the p-value is calculated as follows. The total of cases occurring on both lists indexed by the parameter (regardless of whether or not they are on any other lists) is calculated. On the null hypothesis that the effect is not included in the model, this statistic has a Poisson distribution whose mean depends on the parameters within the model. The one-sided Poisson p-value of the observed statistic is calculated.
Value
A list with components as below
fit
Details of the fit of the specified model as output by glm
. The Akaike information criterion is adjusted to take account
of the number of parameters corresponding to non-overlapping pairs.
emptyoverlaps
Matrix with two rows, giving the list pairs within the model for which no cases are observed in common.
Each column gives the indices of a pair of lists, with the names of the lists in the column name.
poisspempty
the Poisson p-values of the parameters corresponding to non-overlapping pairs.
Examples
data(NewOrl)
stepwisefit(NewOrl, pthresh=0.02)