Description Usage Arguments Value Note Author(s) Examples
Create a table of comparisons based on the cgPairedDifferenceFit object. A cgPairedDifferenceComparisonsTable class object is created.
1 2 3 | ## S4 method for signature 'cgPairedDifferenceFit'
comparisonsTable(fit, type="pairwisereflect",
alpha=0.05, addpct=FALSE, display="print", ...)
|
fit |
An object of class |
type |
Can be one of two values:
|
alpha |
Significance level, by default set to |
addpct |
Only relevant if |
display |
One of three valid values:
|
... |
Additional arguments. Only one is currently valid:
|
Creates an object of class cgPairedDifferenceComparisonsTable, with the
following slots:
ols.comprsThe table of comparisons based on the
olsfit component of the cgPairedDifferenceFit,
unless model="rronly" is specified. In that case the slot
value is NULL. See below for the data frame structure
of the table.
rr.comprsThe table of comparisons based on the
rrfit component of the cgPairedDifferenceFit
object, if a valid resistant & robust fit object is present.
If rrfit is a simple character value of
"No fit was selected.", or model="olsonly" was
specified, then the value is NULL. See below for the data frame structure
of the table.
settingsA list of settings carried from the
cgPairedDifferenceFit fit object, and the addition
of some specified arguments in the method call above:
alpha,
type, and addpct. These are used
for the print.cgPairedDifferenceComparisonsTable method,
invoked for example when
display="print".
The data frame structure of the comparisons table in a *.comprs
slot consists of row.names that specify the comparison of the
form A vs. B, and these columns:
estimateThe difference in group means in the
comparison: A vs. B. If settings$endptscale=="log" in the
fit object, this will be back-transformed to a percent
difference scale.
seThe estimated standard error of the difference
estimate. If settings$endptscale=="log" in the
fit object, this estimate will be based on the Delta
method, and will particularly 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
difference estimate. With the default alpha=0.05,
this is 95%. If settings$endptscale=="log" in the
fit object, the confidence limit is first computed in the
logarithmic scale of analysis, and then back-transformed to a percent
difference scale.
upperciThe upper 100 * (1-alpha) % confidence limit of the
difference estimate. With the default alpha=0.05,
this is 95%. If settings$endptscale=="log" in the
fit object, the confidence limit is first computed in the
logarithmic scale of analysis, and then back-transformed to a percent
difference scale.
pvalThe computed p-value from the test of the difference estimate.
meanA or geomeanAThe estimated mean for the
left hand side "A" of the A vs. B comparison.
If settings$endptscale=="log" in the
fit object, this is a back-transform to the original scale,
and therefore is a geometric mean, and will be labelled
geomeanA.
Otherwise it is the arithmetic mean and labelled meanA.
seAThe estimated standard error of the meanA
estimate. If settings$endptscale=="log" in the
fit object, this estimate will be based on the Delta
method, and will particularly begin to be a poor approximation when the
standard error in the logscale exceeds 0.50.
meanB or geomeanBThe estimated mean for the
right hand side "B" of the A vs. B comparison.
If settings$endptscale=="log" in the
fit object, this is a back-transform to the original scale,
and therefore is a geometric mean, and will be labelled
geomeanB.
Otherwise it is the arithmetic mean and labelled meanB.
seBThe estimated standard error of the meanB
estimate. If settings$endptscale=="log" in the
fit object, this estimate will be based on the Delta
method, and will particularly begin to be a poor approximation when the
standard error in the logscale exceeds 0.50.
An additional column addpct of percent differences is added if
endptscale=="original" and addpct=TRUE,
as a descriptive supplement to the original scale
differences that are formally estimated. This is only possible for
the model=="ols" case, since the original arithmetic means
are not estimated in the Resistant & Robust model=="rr" case.
Contact cg@billpikounis.net for bug reports, questions, concerns, and comments.
Bill Pikounis [aut, cre, cph], John Oleynick [aut], Eva Ye [ctb]
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 26 27 28 29 30 31 32 33 | data(anorexiaFT)
## log scale
anorexiaFT.data <- prepareCGPairedDifferenceData(anorexiaFT, format="groupcolumns",
analysisname="Anorexia FT",
endptname="Weight",
endptunits="lbs",
expunitname="Patient",
digits=1,
logscale=TRUE)
anorexiaFT.fit <- fit(anorexiaFT.data)
anorexiaFT.comps <- comparisonsTable(anorexiaFT.fit, display="none")
print(anorexiaFT.comps)
comparisonsTable(anorexiaFT.fit, model="olsonly")
comparisonsTable(anorexiaFT.fit, model="rronly")
## original scale evaluation
anorexiaFT.orig.data <- prepareCGPairedDifferenceData(anorexiaFT, format="groupcolumns",
analysisname="Anorexia FT",
endptname="Weight",
endptunits="lbs",
expunitname="Patient",
digits=1,
logscale=FALSE)
anorexiaFT.orig.fit <- fit(anorexiaFT.orig.data)
comparisonsTable(anorexiaFT.orig.fit)
comparisonsTable(anorexiaFT.orig.fit, addpct=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.