coef: Extract parameter estimates from a simulation result

Description Arguments Value Author(s) See Also Examples

Description

Extract parameter estimates from a simulation result. This function is similar to the inspect method with what = "coef".

Arguments

object

The target SimResult object

improper

Specify whether to include the information from the replications with improper solutions

nonconverged

Specify whether to include the information from the nonconvergent replications

Value

Parameter estimates of each replication

Author(s)

Sunthud Pornprasertmanit (psunthud@gmail.com)

See Also

SimResult for the object input

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
loading <- matrix(0, 6, 2)
loading[1:3, 1] <- NA
loading[4:6, 2] <- NA
LY <- bind(loading, 0.7)

latent.cor <- matrix(NA, 2, 2)
diag(latent.cor) <- 1
RPS <- binds(latent.cor, 0.5)

RTE <- binds(diag(6))

VY <- bind(rep(NA,6),2)

CFA.Model <- model(LY = LY, RPS = RPS, RTE = RTE, modelType = "CFA")

# In reality, more than 5 replications are needed.
Output <- sim(5, CFA.Model, n=200)
coef(Output)
coef(Output, improper = TRUE)

## End(Not run)

Example output

Loading required package: lavaan
This is lavaan 0.6-3
lavaan is BETA software! Please report any bugs.
 
#################################################################
This is simsem 0.5-14
simsem is BETA software! Please report any bugs.
simsem was first developed at the University of Kansas Center for
Research Methods and Data Analysis, under NSF Grant 1053160.
#################################################################

Attaching package: 'simsem'

The following object is masked from 'package:lavaan':

    inspect

Progress: 1 / 5 
Progress: 2 / 5 
Progress: 3 / 5 
Progress: 4 / 5 
Progress: 5 / 5 
     f1=~y1    f1=~y2    f1=~y3    f2=~y4    f2=~y5    f2=~y6    f1~~f2
1 0.6869269 0.5522463 0.7867872 0.7083414 0.8669237 0.7219979 0.6119832
2 0.6374689 0.6636428 0.7688788 0.6281793 0.6313198 0.5073789 0.3025639
3 0.7792940 0.7218981 0.5202385 0.6510874 0.7483450 0.8102973 0.2660017
4 0.6703072 0.7192016 0.7126923 0.6033281 0.6834104 0.6974144 0.5275106
5 0.6544175 0.6672103 0.7591289 0.6847460 0.6399177 0.7678711 0.4993924
     y1~~y1    y2~~y2    y3~~y3    y4~~y4    y5~~y5    y6~~y6        y1~1
1 0.5538442 0.6020807 0.5158231 0.5193008 0.4564344 0.4486433  0.03240554
2 0.5013010 0.5264507 0.5054803 0.5453629 0.4451474 0.5518479 -0.02380286
3 0.4963525 0.2991269 0.4887691 0.6066724 0.4444443 0.4844176  0.02297606
4 0.5227187 0.4560290 0.5103440 0.4509431 0.5057545 0.4026688  0.14071696
5 0.4889866 0.5403351 0.4701131 0.5117912 0.5190299 0.4508643 -0.02396937
          y2~1        y3~1         y4~1        y5~1         y6~1
1  0.081722790  0.19523557  0.001120695 -0.04319188  0.086182252
2 -0.115775768 -0.06713156 -0.172537338 -0.11076329 -0.059543753
3 -0.069945810 -0.07863315 -0.082826991  0.01134825 -0.005862405
4  0.195362753  0.08697737 -0.055023530  0.01585713  0.041398600
5  0.001936017 -0.03083673 -0.016711821 -0.06673157 -0.119233898
     f1=~y1    f1=~y2    f1=~y3    f2=~y4    f2=~y5    f2=~y6    f1~~f2
1 0.6869269 0.5522463 0.7867872 0.7083414 0.8669237 0.7219979 0.6119832
2 0.6374689 0.6636428 0.7688788 0.6281793 0.6313198 0.5073789 0.3025639
3 0.7792940 0.7218981 0.5202385 0.6510874 0.7483450 0.8102973 0.2660017
4 0.6703072 0.7192016 0.7126923 0.6033281 0.6834104 0.6974144 0.5275106
5 0.6544175 0.6672103 0.7591289 0.6847460 0.6399177 0.7678711 0.4993924
     y1~~y1    y2~~y2    y3~~y3    y4~~y4    y5~~y5    y6~~y6        y1~1
1 0.5538442 0.6020807 0.5158231 0.5193008 0.4564344 0.4486433  0.03240554
2 0.5013010 0.5264507 0.5054803 0.5453629 0.4451474 0.5518479 -0.02380286
3 0.4963525 0.2991269 0.4887691 0.6066724 0.4444443 0.4844176  0.02297606
4 0.5227187 0.4560290 0.5103440 0.4509431 0.5057545 0.4026688  0.14071696
5 0.4889866 0.5403351 0.4701131 0.5117912 0.5190299 0.4508643 -0.02396937
          y2~1        y3~1         y4~1        y5~1         y6~1
1  0.081722790  0.19523557  0.001120695 -0.04319188  0.086182252
2 -0.115775768 -0.06713156 -0.172537338 -0.11076329 -0.059543753
3 -0.069945810 -0.07863315 -0.082826991  0.01134825 -0.005862405
4  0.195362753  0.08697737 -0.055023530  0.01585713  0.041398600
5  0.001936017 -0.03083673 -0.016711821 -0.06673157 -0.119233898

simsem documentation built on March 29, 2021, 1:07 a.m.

Related to coef in simsem...