View source: R/multcomp2table.R
multcomp2table | R Documentation |
Gather p-values and confidence intervals in a table.
multcomp2table(
object,
link,
transform = function(x) {
x
},
seed = NULL,
method.glht = "glht",
conf.level = 0.95,
method.multcomp = NULL,
digits = 3,
digits.p.value = 3,
...
)
object |
a fitted model. |
link |
[character vector] null hypotheses or coefficients to be tested. |
transform |
[function] function to backtransform the estimates and the associated confidence intervals. |
seed |
[integer] if not |
method.glht |
[character or function] function used to extract the coefficients and variance-covariance matrix from the object.
Recommanded: |
conf.level |
[numeric, 0-1] Confidence level of the interval. |
method.multcomp |
[character] the method used to adjust the p-value and confidence intervals (CIs) for multiplicity.
Note that simultaneous CIs are available only for |
digits |
[integer] if not |
digits.p.value |
[integer] if not |
... |
arguments passed to |
if(require(multcomp)){
m <- lvm(Y~X1+X2)
d <- sim(m, n = 100)
## lm object
e.lm <- lm(Y~X1+X2, data = d)
multcomp2table(e.lm, link = c("X1=0","X2=1"))
multcomp2table(e.lm, link = c("X1=0"))
## gls object
if(require(nlme)){
e.gls <- gls(Y~X1+X2, data = d)
multcomp2table(e.gls, link = c("X1=0","X2=1"))
multcomp2table(e.gls, link = c("X1=0"))
}
## lvm object
if(require(lava) & require(lavaSearch2)){
e.lvm <- estimate(m, data = d)
multcomp2table(e.lvm, method.glht = "glht2", link = c("Y~X1"))
multcomp2table(e.lvm, method.glht = "glht2", link = c("Y~X1","Y~X2"))
multcomp2table(e.lvm, method.glht = "glht2", link = c("Y~X1","Y~X2"), rhs = c(1,1))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.