knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Summarize the Results

Once the simulations are completed, we can use the summary.simpm() function to summarize the results. The function will print out the important information contained in the simPM() object.

Examples

setwd("C:/Users/yifeng94/Desktop/simPM/simPM-git/examples")
load("wave.ex1_r1.rda")
library(simPM)

In this hypothetical example, the summary.simpm() function prints out the following:

summary(wave.ex1)
[1] "=================results summary================"
  convergence.rate weakest.param.name weakest.para.power cost.design miss.waves
1             0.92               s~~s              0.999        4530          2
[1] "=================Optimal design================="
  convergence.rate weakest.param.name weakest.para.power cost.design miss.waves
1             0.92               s~~s              0.999        4530          2
[1] "=================Optimal design for focal parameters================="
     Estimate Average Estimate SD  Average SE Power (Not equal 0)   Std Est   Std Est SD
i~1        2.98293751 0.031715239 0.031616120               1.000 5.8125191 3.214384e-01
s~1        0.08626832 0.012315538 0.011890850               1.000 0.5821286 1.071983e-01
i~~i       0.26565608 0.028395191 0.027694967               1.000 1.0000000 1.479881e-16
s~~s       0.02275121 0.004702874 0.004540174               0.999 1.0000000 1.476542e-16
     Std Ave SE Average Param  Average Bias Coverage Average FMI1    SD FMI1
i~1   0.3109336         2.983 -6.248508e-05    0.945   0.06909154 0.02634767
s~1   0.1017555         0.086  2.683187e-04    0.939   0.33360543 0.03811522
i~~i  0.0000000         0.268 -2.343916e-03    0.935   0.25362176 0.04437375
s~~s  0.0000000         0.023 -2.487868e-04    0.939   0.62234904 0.04767489
[1] "=================Optimal patterns==============="
           se1 se2 se3 se4
             0   1   1   0
             0   1   0   1
             0   0   1   1
completers   0   0   0   0
[1] "=================Optimal probs=================="
[1] 0.266667 0.266667 0.266667 0.200000
[1] "=================Optimal ns===================="
[1] 86 86 86 65

To view more details of the simulation results for the optimal PHPM design, we can extract the simsem output and use the summary() function as follows. It will output the model fit and parameter estimates over replications for the selected design.

summary(wave.ex1$opt.output)


YiFengEDMS/simPM documentation built on Dec. 31, 2019, 8:54 a.m.