Description Usage Arguments Details Value Author(s)
A function to extract a test statistic or summary from different test and fitted model objects, and return in a standard format.
1 2 3 4 5 6 7 8 9 10 | ## S3 method for class 'htest'
test.extract(object, partial = NULL)
## S3 method for class 'survdiff'
test.extract(object, partial = NULL)
## S3 method for class 'lm'
test.extract(object, partial = NULL)
## S3 method for class 'glm'
test.extract(object, partial = NULL)
## S3 method for class 'coxph'
test.extract(object, partial = NULL)
|
object |
a fitted model object. |
partial |
character name of coefficient for partial test. |
The partial
argument only works for numeric terms, not
factors. Two level factors should be recoded as 0/1. Factors with
more than two levels could in principle be detected and handled
appropriately, but this is not currently implemented.
test.extract is implemented as a generic function, but handling of different tests of class htest requires if-else-if
The returned effect might be an effect size, but its main purpose is to indicate effect direction.
The df returned is always the df in the LRT sense, i.e. the number of additional free parameters. Hence not the same as the df reported by some htest, e.g. not the same as the df for a t-test.
A named real vector with three elements, named “pval”, “effect” and “df”.
Toby Johnson Toby.x.Johnson@gsk.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.