| grpSummaryTable.cgOneFactorFit {cg} | R Documentation |
Create a table of estimated group means and variability with a cgOneFactorFit object.
Description
Create a table of estimated group means based on the cgOneFactorFit object. Standard errors and confidence intervals are added. A cgOneFactorGrpSummaryTable class object is created.
Usage
## S4 method for signature 'cgOneFactorFit'
grpSummaryTable(fit, mcadjust=FALSE, alpha=0.05, display="print", ...)
Arguments
fit |
A fit object of class |
mcadjust |
Do a multiple comparisons adjustment, based on the simultaneous
inference capabilities of the multcomp package. See Details
below. The default value is |
alpha |
Significance level, by default set to |
display |
One of three valid values:
|
... |
Additional arguments. Only one is currently valid:
For other possible |
Details
When mcadjust=TRUE, a status message of
"Some time may be needed as the critical point"
"from the multcomp::summary.glht function call is calculated"
is displayed at the console. This computed critical point
is used for all subsequent p-value and confidence interval
calculations.
The multcomp package provides a unified way to calculate critical points based on the comparisons of interest in a "family". Thus a user does not need to worry about choosing amongst the myriad names of multiple comparison procedures.
Value
Creates an object of class cgOneFactorGrpSummaryTable, with the
following slots:
ols.grpsThe table of group estimates based on the
olsfitcomponent of thecgOneFactorFit, unlessmodel="rronly"is specified. In that case the slot value isNULL. Will not be appropriate in the case where a validaftfitcomponent is present in thecgOneFactorFitobject. See below for the data frame structure of the table.rr.grpsThe table of group estimates based on the
rrfitcomponent of thecgOneFactorFitobject, if a valid resistant & robust fit object is present. Ifrrfitis a simple character value of"No fit was selected.", ormodel="olsonly"was specified, then the value isNULL. See below for the data frame structure of the table.aft.grpsThe table of group estimates based on the
aftfitcomponent of thecgOneFactorFitobject if a valid accelerated failure time fit object is present. Ifaftfitis a simple character value of"No fit was selected.", then the value isNULL. See below for the data frame structure of the table.uv.grpsThe table of group estimates based on the
uvfitcomponent of thecgOneFactorFitobject if a valid unequal variances fit object is present. Ifuvfitis a simple character value of"No fit was selected.", then the value isNULL. See below for the data frame structure of the table.settingsA list of settings carried from the
cgOneFactorFitfitobject, and the addition of some specified arguments in the method call above:alphaandmcadjust. These are used for theprint.cgOneFactorGrpSummaryTablemethod, invoked for example whendisplay="print".
The data frame structure of the comparisons table in a *.comprs
slot consists of row.names that specify group name (factor
level), and these columns:
estimateThe estimated group mean. If
settings$endptscale=="log"in thefitobject, this will be back-transformed to a geometric mean.seThe estimated standard error of the group mean
estimate. Ifsettings$endptscale=="log"in thefitobject, this estimate will be based on the Delta method, and will begin to be a poor approximation when the standard error in the logscale exceeds 0.50.lowerciThe lower 100 * (1-
alpha) % confidence limit of the group meanestimate. With the defaultalpha=0.05, this is 95%. Ifsettings$endptscale=="log"in thefitobject, the confidence limit is first computed in the logarithmic scale of analysis, and then back-transformed to the original scale.upperciThe upper 100 * (1-
alpha) % confidence limit of the differenceestimate. With the defaultalpha=0.05, this is 95%. Ifsettings$endptscale=="log"in thefitobject, the confidence limit is first computed in the logarithmic scale of analysis, and then back-transformed to the original scale.
Note
Contact cg@billpikounis.net for bug reports, questions, concerns, and comments.
Author(s)
Bill Pikounis [aut, cre, cph], John Oleynick [aut], Eva Ye [ctb]
References
Hothorn, T., Bretz, F., Westfall, P., Heiberger, R.M., and
Schuetzenmeister, A. (2010). The multcomp package.
Hothorn, T., Bretz, F., and Westfall, P. (2008). "Simultaneous Inference in General Parametric Models", Biometrical Journal, 50, 3, 346-363.
Examples
data(canine)
canine.data <- prepareCGOneFactorData(canine, format="groupcolumns",
analysisname="Canine",
endptname="Prostate Volume",
endptunits=expression(plain(cm)^3),
digits=1, logscale=TRUE, refgrp="CC")
canine.fit <- fit(canine.data)
grpSummaryTable(canine.fit)
grpSummaryTable(canine.fit, mcadjust=TRUE, model="olsonly")
data(gmcsfcens)
gmcsfcens.data <- prepareCGOneFactorData(gmcsfcens, format="groupcolumns",
analysisname="cytokine",
endptname="GM-CSF (pg/ml)",
logscale=TRUE)
gmcsfcens.fit <- fit(gmcsfcens.data, type="aft")
grpSummaryTable(gmcsfcens.fit)