Description Usage Format Source References Examples
The babies
data frame has 36 rows and 4 columns.
Matched pairs of binary observations concerning the crying of babies. The babies were observed on 18 days and on each day one child was lulled. Interest focuses on the treatment effect “lulling”.
1 |
This data frame contains the following columns:
r1
number of children not crying on one day;
r2
number of children crying on one day;
lull
indicator variable for the treatment;
day
factor variable for the days.
The data were obtained from
Cox, D. R. (1970) Analysis of Binary Data (page 61). London: Chapman \& Hall.
Davison, A. C. (1988) Approximate conditional inference in generalized linear models. J. R. Statist. Soc. B, 50, 445–461.
1 2 3 4 5 6 7 8 9 10 11 12 | data(babies)
coplot(r2/(r1+r2) ~ day | lull, data = babies)
##
babies.glm <- glm(formula = cbind(r1, r2) ~ day + lull - 1,
family = binomial, data = babies)
babies.cond <- cond(object = babies.glm, offset = lullyes)
babies.cond
##
## If one wishes to avoid the generalized linear model fit:
babies.cond <- cond.glm(formula = cbind(r1, r2) ~ day + lull - 1,
family = binomial, data = babies, offset = lullyes)
babies.cond
|
Loading required package: statmod
Loading required package: survival
Package "cond" 1.2-3 (2014-06-27)
Copyright (C) 2000-2014 A. R. Brazzale
This is free software, and you are welcome to redistribute
it and/or modify it under the terms of the GNU General
Public License published by the Free Software Foundation.
Package "cond" comes with ABSOLUTELY NO WARRANTY.
type `help(package="cond")' for summary information
Call:
cond.glm(object = babies.glm, offset = lullyes)
Formula: cbind(r1, r2) ~ day + lull - 1
Family: binomial
Offset: lullyes
Estimate Std. Error
uncond. 1.432 0.7341
cond. 1.270 0.6888
Diagnostics:
INF NP
0.07596 0.28882
Approximation based on 20 points
Call:
cond.glm(offset = lullyes, formula = cbind(r1, r2) ~ day + lull -
1, family = binomial, data = babies)
Formula: cbind(r1, r2) ~ day + lull - 1
Family: binomial
Offset: lullyes
Estimate Std. Error
uncond. 1.432 0.7341
cond. 1.270 0.6888
Diagnostics:
INF NP
0.07596 0.28882
Approximation based on 20 points
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.