A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cran.r-project.org/web/packages/sitar/../rmarkdown/../mxmmod/vignettes/mmod_tutorial.html below:

Getting Started with mxmmod

Next, let’s build a two-factor MMOD with one latent factor for negative items (nervous, down, depressed), and the other for positive items (happy, calm):

structure2 <- list(
  F1 = c('nervous', 'down', 'depressed'),
  F2 = c('happy', 'calm')
)
mmod_model2 <- mxMmodModel(data=nlsy97depression,
                          modelName='2 Factor MMOD',
                          idvar='pid', timevar='occasion', structure=structure2)
#> Warning in mxMmodModel(data = nlsy97depression, modelName = "2 Factor MMOD", :
#> Missing values detected; omitting them.
mmod_fit2 <- mxRun(mmod_model2)
#> Running 2 Factor MMOD with 45 parameters
(mmod_summary2 <- summary(mmod_fit2))
#> Summary of 2 Factor MMOD 
#>  
#> free parameters:
#>                      name matrix          row          col    Estimate
#> 1  2 Factor MMOD.A[22,16]      A   dnervous_1         F1_1  0.34208391
#> 2  2 Factor MMOD.A[23,16]      A      ddown_1         F1_1  0.44449759
#> 3  2 Factor MMOD.A[24,16]      A ddepressed_1         F1_1  0.34568966
#> 4  2 Factor MMOD.A[25,17]      A     dhappy_1         F2_1 -0.43364599
#> 5  2 Factor MMOD.A[26,17]      A      dcalm_1         F2_1 -0.40726033
#> 6  2 Factor MMOD.A[27,18]      A   dnervous_2         F1_2 -0.15141710
#> 7  2 Factor MMOD.A[28,18]      A      ddown_2         F1_2 -0.29720493
#> 8  2 Factor MMOD.A[29,18]      A ddepressed_2         F1_2 -0.22737277
#> 9  2 Factor MMOD.A[30,19]      A     dhappy_2         F2_2 -0.31078549
#> 10 2 Factor MMOD.A[31,19]      A      dcalm_2         F2_2 -0.23510537
#> 11 2 Factor MMOD.A[32,20]      A   dnervous_3         F1_3  0.27996036
#> 12 2 Factor MMOD.A[33,20]      A      ddown_3         F1_3  0.45297788
#> 13 2 Factor MMOD.A[34,20]      A ddepressed_3         F1_3  0.35787907
#> 14 2 Factor MMOD.A[35,21]      A     dhappy_3         F2_3  0.46634671
#> 15 2 Factor MMOD.A[36,21]      A      dcalm_3         F2_3  0.38075384
#> 16 2 Factor MMOD.S[16,17]      S         F1_1         F2_1  0.78691979
#> 17 2 Factor MMOD.S[16,18]      S         F1_1         F1_2  0.06014108
#> 18 2 Factor MMOD.S[17,18]      S         F2_1         F1_2  0.03925727
#> 19 2 Factor MMOD.S[16,19]      S         F1_1         F2_2 -0.01587564
#> 20 2 Factor MMOD.S[17,19]      S         F2_1         F2_2 -0.01766206
#> 21 2 Factor MMOD.S[18,19]      S         F1_2         F2_2 -0.69546524
#> 22 2 Factor MMOD.S[16,20]      S         F1_1         F1_3 -0.06789042
#> 23 2 Factor MMOD.S[17,20]      S         F2_1         F1_3 -0.01426543
#> 24 2 Factor MMOD.S[18,20]      S         F1_2         F1_3  0.02309934
#> 25 2 Factor MMOD.S[19,20]      S         F2_2         F1_3 -0.03211301
#> 26 2 Factor MMOD.S[16,21]      S         F1_1         F2_3  0.04478221
#> 27 2 Factor MMOD.S[17,21]      S         F2_1         F2_3  0.03333399
#> 28 2 Factor MMOD.S[18,21]      S         F1_2         F2_3 -0.01278190
#> 29 2 Factor MMOD.S[19,21]      S         F2_2         F2_3  0.03144088
#> 30 2 Factor MMOD.S[20,21]      S         F1_3         F2_3 -0.68798195
#> 31 2 Factor MMOD.S[22,22]      S   dnervous_1   dnervous_1  0.16560711
#> 32 2 Factor MMOD.S[23,23]      S      ddown_1      ddown_1  0.07598566
#> 33 2 Factor MMOD.S[24,24]      S ddepressed_1 ddepressed_1  0.10989724
#> 34 2 Factor MMOD.S[25,25]      S     dhappy_1     dhappy_1  0.07526441
#> 35 2 Factor MMOD.S[26,26]      S      dcalm_1      dcalm_1  0.10844859
#> 36 2 Factor MMOD.S[27,27]      S   dnervous_2   dnervous_2  0.13561792
#> 37 2 Factor MMOD.S[28,28]      S      ddown_2      ddown_2  0.08318044
#> 38 2 Factor MMOD.S[29,29]      S ddepressed_2 ddepressed_2  0.09417501
#> 39 2 Factor MMOD.S[30,30]      S     dhappy_2     dhappy_2  0.06849531
#> 40 2 Factor MMOD.S[31,31]      S      dcalm_2      dcalm_2  0.12280189
#> 41 2 Factor MMOD.S[32,32]      S   dnervous_3   dnervous_3  0.38778330
#> 42 2 Factor MMOD.S[33,33]      S      ddown_3      ddown_3  0.27207224
#> 43 2 Factor MMOD.S[34,34]      S ddepressed_3 ddepressed_3  0.29784132
#> 44 2 Factor MMOD.S[35,35]      S     dhappy_3     dhappy_3  0.23240185
#> 45 2 Factor MMOD.S[36,36]      S      dcalm_3      dcalm_3  0.34041584
#>      Std.Error A
#> 1  0.006429926  
#> 2  0.005817232  
#> 3  0.005541267  
#> 4  0.005941098  
#> 5  0.006126876  
#> 6  0.005821508  
#> 7  0.006181826  
#> 8  0.005478696  
#> 9  0.006940047  
#> 10 0.006347826  
#> 11 0.010462995  
#> 12 0.011082682  
#> 13 0.009959067  
#> 14 0.012211544  
#> 15 0.011298501  
#> 16 0.008525574  
#> 17 0.017062146  
#> 18 0.017225826  
#> 19 0.016978516  
#> 20 0.017103537  
#> 21 0.016313765  
#> 22 0.017904571  
#> 23 0.018094869  
#> 24 0.020276675  
#> 25 0.020086240  
#> 26 0.017996622  
#> 27 0.018150032  
#> 28 0.020313810  
#> 29 0.020158937  
#> 30 0.018799567  
#> 31 0.003424771  
#> 32 0.002732386  
#> 33 0.002450655  
#> 34 0.002980145  
#> 35 0.003024774  
#> 36 0.002579910  
#> 37 0.002959253  
#> 38 0.002264617  
#> 39 0.003628395  
#> 40 0.002904624  
#> 41 0.007729192  
#> 42 0.008747754  
#> 43 0.007042538  
#> 44 0.010048715  
#> 45 0.008535637  
#> 
#> Model Statistics: 
#>                |  Parameters  |  Degrees of Freedom  |  Fit (-2lnL units)
#>        Model:             45                     75             -5917.303
#>    Saturated:            120                      0             -6755.909
#> Independence:             15                    105             25163.633
#> Number of observations/statistics: 6566/120
#> 
#> chi-square:  χ² ( df=75 ) = 838.6063,  p = 2.030077e-129
#> Information Criteria: 
#>       |  df Penalty  |  Parameters Penalty  |  Sample-Size Adjusted
#> AIC:       688.6063               928.6063                 929.2412
#> BIC:       179.3818              1234.1410                1091.1423
#> CFI: 0.9759982 
#> TLI: 0.9663975   (also known as NNFI) 
#> RMSEA:  0.039378  [95% CI (0.03654012, 0.04226008)]
#> Prob(RMSEA <= 0.05): 1
#> timestamp: 2021-05-18 11:24:22 
#> Wall clock time: 0.2585125 secs 
#> optimizer:  SLSQP 
#> OpenMx version number: 2.18.1 
#> Need help?  See help(mxSummary)
# Note: This can take a while to draw...
semPlot::semPaths(mmod_fit2, 'est')

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4