print,powerClass-method {ltable}R Documentation

Method for Function print

Description

Method for function print with
signature(x = "powerClass")

Usage

## S4 method for signature 'powerClass'
print(x, choice, ...)

Arguments

x

the name of powerClass object.

choice

an optional arg containing two choices of print: "power" (by default) prints the results of power analysis, while "model" prints estimated log-linear model parameters and fit statistics.

...

not used

Details

Fit statistic Jacobian reciprocal condition number measures the inverse sensitivity of the solution to small perturbations in the input data. It tends to zero as J tends to singularity indicating solution instability.
The value of ch-squared per degree of freedom chisq/dof approximately 1 indicates a good fit. If chisq/dof >> 1 the error estimates obtained from the covariance matrix will be too small and should be multiplied by square root of chisq/dof.
Poor fit will result from the use of an inappropriate model.
BEWARE: Poor fit jeopardizes the validity of power analysis.

Methods

signature(x = "powerClass")

Method for function print for object of S4 class powerClass.
The second argument choice controls information to print. It's advisable to start printing with arg choice="model". Besides estimated log-linear model parameters, fit statistics printed for input data given arg scale_min=1 in function PowerPoisson. Otherwise, it prints results for augmented scale_min*data counts. Of particular importance is Jacobian reciprocal condition number and chisq/dof. See details.
Arg choice="power" prints results of power analysis in given range of sample size regulated by args scale_min, scale_max in function PowerPoisson. These are multiplyers for observed data counts. Range is divided into 11 even-spaced subsequent sample sizes. Each is described in printed quantiles (Q0.025, Q0.05, Q0.1, Q0.2, Q0.3, Q0.4, Q0.5) of power and z-score distributions. It's suggestive to use Q0.025 in making decision. Given the results one can change sample size range, for example to scrutinize some particular interval to ensure power and p-value.

Examples

require(ltable)
data(tdata, package="ltable")
## For better illustration You should increase draw and burnin pars
pres<-MCPower(Counts~smoker +contraceptive +tromb +
contraceptive*tromb, scale_min = 0.5, scale_max=1.5, 
effect="contraceptive*tromb", data=tdata, draw=1000, burnin=300)
print(pres, "model")
print(pres, "power")


[Package ltable version 2.0.4 Index]