Description Usage Arguments Details Value Examples
Groupwise point and variance estimates for binomials, if data are given as numeric vectors of successes x and trials n, with I the number of levels in the one-way layout
1 2 3 4 5 6 7 8 9 10 11 12 13 |
x |
either a numeric vector of the number of successes, then n must be specified, or an object of class "table" as can be obtained by using table on a data.frame with to categorical variables |
n |
a numeric vector of the number of trials, only needed, if x is a numeric vector |
names |
optional character vector of group names (labels for later output), must have the same length as x and n |
formula |
a two-sided formula of the style 'response ~ treatment', where 'response' should be a categorical variable with two levels, while treatment should be a factor specifying the treatment levels |
data |
a data.frame, containing the variables specified in formula |
method |
a character string, specifying the method for variance estimator, with options "Wald","ADD1","ADD2" |
success |
an optional character string, to indicate the level considered as success if data are given as table, or data.frame, or, serving as label for the event considered as success in later functions |
... |
currently not used |
Only for internal use.
Y |
a numeric vector of the groupwise number of successes |
n |
a numeric vector of the groupwise number of trials (observations) |
estimate |
a numeric vector of groupwise point estimates for the probability of success, Y/n |
estp |
a numeric vector of groupwise interval midpoints |
varp |
a numeric vector of groupwise variance estimators, to be used for CI construction |
varcor |
a numeric vector of groupwise variance estimators, to be used for correlation structures and test these values are adjusted to be larger than zero also in cases where Y=0 or Y=n |
names |
a character vector of the level names of f |
success |
a character string naming the category which has been defined as success |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # if data are available as counts:
nsuccess<-c(1,2,6,8)
ntrials<-c(20,20,20,20)
binomest(x=nsuccess, n=ntrials)
binomest(x=nsuccess, n=ntrials,
names=c("Control", "A", "B", "C"))
# if data are available as data.frame
# with categorical response variable
# and factor as grouping variable
data(liarozole)
binomest(Improved ~ Treatment, data=liarozole)
binomest(Improved ~ Treatment, data=liarozole, success="y")
# if data are available as table
# and factor as grouping variable
data(liarozole)
tab<-table(liarozole)
binomest(tab)
binomest(tab, success="y")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.