Description Usage Arguments Details Value Methods (by class) See Also Examples
This generic function is used by p_value_contrast.default
to
get the number of degrees of freedom of the t distribution that
approximates the point estimate of the contrast divided by its standard error.
1 2 3 4 5 6 7 | df_for_wald(object, ...)
## S3 method for class 'glm'
df_for_wald(object, ...)
## Default S3 method:
df_for_wald(object, ...)
|
object |
statistical model; |
... |
Unused by |
This function is quite similar to df.residual
but it should return Inf when the Student's t
distribution is less appropriate than the normal distribution.
A finite value or Inf for normal distribution approximation.
glm
: Returns df.residual
for linear gaussian models and Inf
for all other models in order to make Wald's tests consistent with the behavior of stats::summary.glm(object)
default
: Simple proxy to df.residual
but replaces NAs with Inf
Other Wald-related functions:
fixcoef()
,
p_value_contrast()
,
vcov_fixcoef()
1 2 3 4 5 6 7 | # 10 observations, one coefficient, 9 degrees of freedom
df_for_wald(glm(I(1:10) ~ 1))
# returns Inf (non-gaussian-identity model)
df_for_wald(glm(family="poisson", c(10,20,30) ~ 1))
data(mtcars)
# returns Inf (non-gaussian-identity model)
df_for_wald(glm(family="binomial", data=mtcars, I(hp > median(hp)) ~ cyl))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.