Description Usage Arguments Value Author(s) See Also Examples
View source: R/findPowerCoverage.R
Find a value of independent variable that provides a given value of coverage rate. If there are more than one varying parameters, this function will find the value of the target varying parameters given the values of the other varying parameters.
1  findCoverage(coverTable, iv, target)

coverTable 
A 
iv 
The target varying parameter that users would like to find the value providing a given power from. This argument can be specified as the index of the target column or the name of target column (i.e., 
target 
The target coverage rate 
There are five possible types of values provided:
Value The varying parameter value that provides the coverage rate just under the specified coverage rate (the adjacent value of varying parameter provides over power than the specified power value).
Minimum value The minimum value has already provided the low coverage rate (way under the specified coverage rate). The value of varying parameters that provides exact coverage rate may be lower than the minimum value. The example of varying parameter that can provides the minimum value is sample size.
Maximum value The maximum value has already provided the low coverage rate (way under the specified coverage rate). The value of varying parameters that provides exact desired power may be higher than the maximum value. The example of varying parameter that can provides the maximum value is percent missing.
NA
There is no value in the domain of varying parameters that provides the coverage rate lower than the desired coverage rate.
Inf
The coverage rate of all values in the varying parameters is 0 (specifically more than 0.0001) and any values of the varying parameters can be picked and still provide enough power.
Sunthud Pornprasertmanit (psunthud@gmail.com)
getCoverage
to find the coverage rate of parameter estimates
continuousCoverage
to find the coverage rate of parameter estimates for the result object (linkS4class{SimResult}
) with varying parameters.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  ## Not run:
# Specify Sample Size by n
loading < matrix(0, 6, 1)
loading[1:6, 1] < NA
LY < bind(loading, 0.4)
RPS < binds(diag(1))
RTE < binds(diag(6))
CFA.Model < model(LY = LY, RPS = RPS, RTE = RTE, modelType="CFA")
# Specify both sample size and percent missing completely at random. Note that more finegrained
# values of n and pmMCAR is needed, e.g., n=seq(50, 500, 1) and pmMCAR=seq(0, 0.2, 0.01)
Output < sim(NULL, model=CFA.Model, n=seq(100, 200, 20), pmMCAR=c(0, 0.1, 0.2))
# Find the power of all possible combination of N and pmMCAR
cover < getCoverage(Output, coverValue = 0)
# Find the sample size that provides the power of 0.8
findCoverage(cover, "N", 0.20)
## End(Not run)

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