Description Usage Arguments Details Value Note Author(s) Examples
Create a table of variance component estimates of the data in a
cgPairedDifferenceFit
object.
1 2  ## S4 method for signature 'cgPairedDifferenceFit'
varianceTable(fit, display = "print", ...)

fit 
A 
display 
One of three valid values:

... 
Additional arguments. Currently none are valid. 
The returned table contains variance component estimates for the classical least squares fit. There is no analogous decomposition of variance component estimates calculated for the resistant & robust fit.
Creates an object of class cgPairedDifferenceVarianceTable
, with the
following slots:
contents
The table of variance component
estimates. There are two, the "within experimental unit" variance
and the "between experimental unit" variance. See below for the
data frame structure of the table. The label portion "experimental
unit" will be replaced by the expunitname
component of the
settings
slot of the cgPairedDifferenceFit
fit
object, if previously specified.
efficiency
A table of efficiency estimates, derived from the variance component estimates. The goal is to quantify the reduced number of experimental units needed since a paired difference design was employed, instead of a an unpaired design. See below for the data frame structure of the table.
settings
A list of settings carried from the
cgPairedDifferenceFit
fit
object. These are used
for the print.cgPairedDifferenceVarianceTable
method,
invoked for example when display="print"
.
The data frame structure of the variance components table from the
classical least squares fit is provided in the contents
slot. The data frame consists of row.names
based on the
expunitname
component of the settings
slot in the
cgPairedDifferenceFit
fit
object. The first row
is for the "within" component, and the second is for the "between"
component. The "total" variance is in the third row of the table, the
sum of the between and within variance components. The
first column of the table is the variance components estimates, and
the third column is the square root of the variance components,
labeled Spread(StdDev)
. In the second column is the Percent
calculation of the two variance components relative to the total sum variance.
The data frame structure of the efficiency table
from the classical least squares fit is
provided in the efficiency
slot. There are four rows and one column. All values are derived from
the variance components estimates in the contents
slot described above. The first row of Relative Efficiency
comes from dividing the total variance by the between experimental
unit variance component. The second row expresses the estimated gain in
sensitivity by using a paired difference design and analysis over
using a unpaired design and analysis. This is equal to the within
experimental unit variance component divided by the total variance,
and is expressed here as Percent Reduction
. The third row is
the number of experimental units based on the input data set paired
structure. The last row contains the estimated number of unpaired
design experimental units that would have been needed for the same
sensitivity. The label portion "experimental unit" in these last
two row names will be replaced by the expunitname
component of the
settings
slot of the cgPairedDifferenceFit
fit
object if previously specified.
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  data(anorexiaFT)
anorexiaFT.data < prepareCGPairedDifferenceData(anorexiaFT, format="groupcolumns",
analysisname="Anorexia FT",
endptname="Weight",
endptunits="lbs",
expunitname="Patient",
digits=1, logscale=TRUE)
anorexiaFT.fit < fit(anorexiaFT.data)
varianceTable(anorexiaFT.fit)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.