as.data.frame.pairwiseMEP {pairwiseCI} | R Documentation |
Coerce output of pairwiseMEP to a data.frame
Description
Coerces the output of the function pairwiseMEP to a data.frame.
Usage
## S3 method for class 'pairwiseMEP':
as.data.frame(x, row.names = NULL, optional = FALSE, whichep = NULL, ...)
Arguments
x |
an object of class 'pairwiseMEP' as can be obtained by calling pairwiseMEP |
row.names |
as in as.data.frame |
optional |
as in as.data.frame |
whichep |
a vector of integers or character strings, indexing which endpoints (which response variables)
from the x shall be coerced to a data.frame; if omitted (default), all endpoints are coerced to a data.frame |
... |
Further arguments to be passed to as.data.frame |
Value
A data.frame with columns
estimate |
numeric, the point estimates |
lower |
numeric, the lower confidence limits |
upper |
numeric, the upper confidence limits |
comparison |
character, the name of the groupwise comparison |
by |
optional, character, the name of subset of the original data.frame |
response |
character, the name of the response variable |
method |
character, the name of the method used for calculation of the lower and upper limits, see pairwiseMEP |
Examples
x1<-rnorm(120,20,2)
x2<-rnorm(120,100,8)
x3<-rpois(120,10)
x4<-rnbinom(120,mu=10, size=10)
A<-rep(c("a1","a2","a3"), c(40,40,40))
B<-rep(rep(c("b1","b2","b3","b4"), c(10,10,10,10)), times=3)
dat<-data.frame(x1=x1, x2=x2, x3=x3, x4=x4, A=A, B=B)
test<-pairwiseMEP(x=dat,
ep=c("x1","x2","x3", "x4"),
f="A", by="B",
method=c("Param.ratio","Param.ratio","Negbin.ratio","Negbin.ratio"))
test
as.data.frame(test)
as.data.frame(test, whichep=c(1,2))
as.data.frame(test, whichep=c(3,4))
as.data.frame(test, whichep=c("x1","x2"))
[Package
pairwiseCI version 0.1-15
Index]