Skip to contents

Extract information stored within a powRICLPM object (internally used by print.powRICLPM and summary.powRICLPM). See "Details" for which pieces of information can be extracted. The information is presented by condition (i.e., sample size, number of time points, and ICC).

Usage

give(from, what, parameter = NULL)

Arguments

from

A powRICLPM object

what

A character string, denoting the information to extract, either "conditions", "estimation_problems", "results", or "names".

parameter

(optional) When what = "results", a character string denoting the parameter to extract the results for.

Value

A data.frame.

Details

The following information can be extracted from the powRICLPM object:

  • conditions: A data.frame with the different experimental conditions per row, where each condition is defined by a unique combination of sample size, number of time points and ICC.

  • estimation_problems: The proportion of fatal errors, inadmissible values, or non-converged estimations (columns) per experimental conditions (row).

  • results: The average estimate (average), minimum estimate (minimum), standard deviation of parameter estimates (SD), the average standard error (SEavg), the mean square error (MSE), the average width of the confidence interval (accuracy), the coverage rate (coverage), and the proportion of times the p-value was lower than the significance criterion (power). It requires setting the parameter = "..." argument.

  • names: The parameter names in the condition with the least parameters (i.e., parameter names that apply to each experimental condition).

Examples

# \dontshow{
load(system.file("extdata", "out_preliminary.RData", package = "powRICLPM"))
# }
# Return data frame with number of estimation problems per experimental condition
give(out_preliminary, "estimation_problems")
#>    sample_size time_points ICC errors not_converged inadmissible
#> 1          500           3 0.4      0             0            1
#> 2          600           3 0.4      0             0            0
#> 3          700           3 0.4      0             0            0
#> 4          800           3 0.4      0             0            1
#> 5          500           4 0.4      0             0            0
#> 6          600           4 0.4      0             0            0
#> 7          700           4 0.4      0             0            0
#> 8          800           4 0.4      0             0            0
#> 9          500           3 0.6      0             0            0
#> 10         600           3 0.6      0             0            0
#> 11         700           3 0.6      0             0            0
#> 12         800           3 0.6      0             0            0
#> 13         500           4 0.6      0             0            0
#> 14         600           4 0.6      0             0            0
#> 15         700           4 0.6      0             0            0
#> 16         800           4 0.6      0             0            0

# Return data frame with performance measures for "wB2~wA1" per experimental condition
give(out_preliminary, "results", parameter = "wB2~wA1")
#>    sample_size time_points ICC population_value average minimum    SD SEAvg
#> 1          500           3 0.4              0.2   0.208   0.026 0.076 0.079
#> 2          600           3 0.4              0.2   0.205   0.004 0.071 0.073
#> 3          700           3 0.4              0.2   0.193  -0.005 0.063 0.069
#> 4          800           3 0.4              0.2   0.201   0.060 0.063 0.063
#> 5          500           4 0.4              0.2   0.191   0.078 0.055 0.062
#> 6          600           4 0.4              0.2   0.202   0.079 0.050 0.057
#> 7          700           4 0.4              0.2   0.206   0.072 0.061 0.053
#> 8          800           4 0.4              0.2   0.205   0.042 0.055 0.049
#> 9          500           3 0.6              0.2   0.195  -0.016 0.087 0.097
#> 10         600           3 0.6              0.2   0.188  -0.009 0.095 0.090
#> 11         700           3 0.6              0.2   0.201   0.007 0.088 0.083
#> 12         800           3 0.6              0.2   0.192   0.029 0.074 0.077
#> 13         500           4 0.6              0.2   0.203   0.036 0.068 0.071
#> 14         600           4 0.6              0.2   0.190   0.015 0.072 0.066
#> 15         700           4 0.6              0.2   0.201   0.019 0.065 0.060
#> 16         800           4 0.6              0.2   0.199   0.068 0.048 0.056
#>      MSE accuracy coverage power
#> 1  0.006    0.307     0.96  0.74
#> 2  0.005    0.286     0.96  0.82
#> 3  0.004    0.271     0.96  0.85
#> 4  0.004    0.246     0.94  0.82
#> 5  0.003    0.242     0.98  0.87
#> 6  0.002    0.222     1.00  0.95
#> 7  0.004    0.206     0.91  0.96
#> 8  0.003    0.193     0.90  0.99
#> 9  0.008    0.380     0.96  0.53
#> 10 0.009    0.352     0.92  0.52
#> 11 0.008    0.325     0.94  0.68
#> 12 0.005    0.300     0.99  0.64
#> 13 0.005    0.278     0.95  0.77
#> 14 0.005    0.260     0.90  0.81
#> 15 0.004    0.236     0.96  0.92
#> 16 0.002    0.220     0.97  0.96

# Return character vector with parameter names
give(out_preliminary, "names")
#>  [1] "RI_A~~RI_A" "RI_B~~RI_B" "RI_A~~RI_B" "wA2~wA1"    "wA2~wB1"   
#>  [6] "wB2~wA1"    "wB2~wB1"    "wA3~wA2"    "wA3~wB2"    "wB3~wA2"   
#> [11] "wB3~wB2"    "wA1~~wA1"   "wB1~~wB1"   "wA1~~wB1"   "wA2~~wA2"  
#> [16] "wA3~~wA3"   "wB2~~wB2"   "wB3~~wB3"   "wA2~~wB2"   "wA3~~wB3"