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
1 2  ## 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 pvalue 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.grps
The table of group estimates based on the
olsfit
component of thecgOneFactorFit
, unlessmodel="rronly"
is specified. In that case the slot value isNULL
. Will not be appropriate in the case where a validaftfit
component is present in thecgOneFactorFit
object. See below for the data frame structure of the table.rr.grps
The table of group estimates based on the
rrfit
component of thecgOneFactorFit
object, if a valid resistant & robust fit object is present. Ifrrfit
is 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.grps
The table of group estimates based on the
aftfit
component of thecgOneFactorFit
object if a valid accelerated failure time fit object is present. Ifaftfit
is a simple character value of"No fit was selected."
, then the value isNULL
. See below for the data frame structure of the table.uv.grps
The table of group estimates based on the
uvfit
component of thecgOneFactorFit
object if a valid unequal variances fit object is present. Ifuvfit
is a simple character value of"No fit was selected."
, then the value isNULL
. See below for the data frame structure of the table.settings
A list of settings carried from the
cgOneFactorFit
fit
object, and the addition of some specified arguments in the method call above:alpha
andmcadjust
. These are used for theprint.cgOneFactorGrpSummaryTable
method, 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:
estimate
The estimated group mean. If
settings$endptscale=="log"
in thefit
object, this will be backtransformed to a geometric mean.se
The estimated standard error of the group mean
estimate
. Ifsettings$endptscale=="log"
in thefit
object, 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.lowerci
The lower 100 * (1
alpha
) % confidence limit of the group meanestimate
. With the defaultalpha=0.05
, this is 95%. Ifsettings$endptscale=="log"
in thefit
object, the confidence limit is first computed in the logarithmic scale of analysis, and then backtransformed to the original scale.upperci
The upper 100 * (1
alpha
) % confidence limit of the differenceestimate
. With the defaultalpha=0.05
, this is 95%. Ifsettings$endptscale=="log"
in thefit
object, the confidence limit is first computed in the logarithmic scale of analysis, and then backtransformed 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, 346363.
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  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="GMCSF (pg/ml)",
logscale=TRUE)
gmcsfcens.fit < fit(gmcsfcens.data, type="aft")
grpSummaryTable(gmcsfcens.fit)
