You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.Rmd
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,7 @@ summaryfile = NULL,
74
74
feedbackfile = NULL,
75
75
max.run = 50, verbose = FALSE)
76
76
abilityShortForm[[1]] # print the results of the final short form
77
+
antcolony_plot(abilityShortForm) # the plots available
77
78
```
78
79
79
80
A similar example can be found in the `antcolony.mplus` function, but requires you to have a valid Mplus installation on the computer. It took a total of `r round(as.difftime(Sys.time() - start.time.ACO, units = "mins"),2)` minutes to run this example.
plot(SA_example$allFit, type = "b") # plot showing how the fit value changes at each step
144
+
SA_example$bestSyntax # the model syntax that had the best fit found by the algorithm
143
145
```
144
146
145
147
It took a total of `r round(as.difftime(Sys.time() - start.time.SA, units = "mins"),2)` minutes to run the SA example, and a total of `r round(as.difftime(Sys.time() - start.time.ACO, units = "mins"),2)` minutes to run all three together.
Automatic Short Form Creation for scales. Currently, the Ant Colony Optimization (ACO) Algorithm and the Tabu search are implemented. The original R implementation for the ACO algorithm is from [Leite, Huang, & Marcoulides (2008)](doi:10.1080/00273170802285743), while the Tabu search function was taken from [Marcoulides & Falk (2018)](doi:10.1080/10705511.2017.1409074). There does not yet seem to be an application of Simulated Annealing (SA) within psychometrics, but Drezner & Marcoulides, 1999 (in *Multiple Linear Regression Viewpoints*, Volume 25(2); not available online) used SA for multiple regression model selection; this package appears to be the first to implement SA for psychometric models.
12
+
Automatic Short Form Creation for scales. Currently, the Ant Colony
13
+
Optimization (ACO) Algorithm and the Tabu search are implemented. The
14
+
original R implementation for the ACO algorithm is from [Leite, Huang, &
15
+
Marcoulides (2008)](doi:10.1080/00273170802285743), while the Tabu
16
+
search function was taken from [Marcoulides & Falk
17
+
(2018)](doi:10.1080/10705511.2017.1409074). There does not yet seem to
18
+
be an application of Simulated Annealing (SA) within psychometrics, but
19
+
Drezner & Marcoulides, 1999 (in *Multiple Linear Regression Viewpoints*,
20
+
Volume 25(2); not available online) used SA for multiple regression
21
+
model selection; this package appears to be the first to implement SA
22
+
for psychometric models.
8
23
9
-
Installation
10
-
------------
24
+
## Installation
11
25
12
26
```r
13
27
# install.packages("devtools")
14
28
devtools::install_github("AnthonyRaborn/ShortForm") # the developmental version
15
29
install.packages("ShortForm") # the CRAN-approved version
16
30
```
17
31
18
-
Usage
19
-
-----
32
+
## Usage
20
33
21
-
Here are some (slightly modified) examples from the help documentation using lavaan. Be warned, the algorithms may take some time to converge, particularly with large forms, multiple dimensions, and different settings. The time for these examples to converge on a low-end laptop is printed at the bottom.
34
+
Here are some (slightly modified) examples from the help documentation
35
+
using lavaan. Be warned, the algorithms may take some time to converge,
36
+
particularly with large forms, multiple dimensions, and different
37
+
settings. The time for these examples to converge on a low-end laptop is
38
+
printed at the bottom.
22
39
23
40
### ACO Algorithm
24
41
@@ -92,13 +109,31 @@ abilityShortForm[[1]] # print the results of the final short form
92
109
## [1,] 1 0 0 0 0 0 0 1 0 0
93
110
## Item29 Item30
94
111
## [1,] 1 1
112
+
antcolony_plot(abilityShortForm) # the plots available
113
+
## [[1]]
95
114
```
96
115
97
-
A similar example can be found in the `antcolony.mplus` function, but requires you to have a valid Mplus installation on the computer. It took a total of 5.76 minutes to run this example.
116
+
<!---->
117
+
118
+
##
119
+
## [[2]]
120
+
121
+
<!---->
122
+
123
+
##
124
+
## [[3]]
125
+
126
+
<!---->
127
+
128
+
A similar example can be found in the `antcolony.mplus` function, but
129
+
requires you to have a valid Mplus installation on the computer. It took
130
+
a total of 5.6 minutes to run this example.
98
131
99
132
### Tabu Search Algorithm
100
133
101
-
This example demonstrates how to use the Tabu search for model specification searches when the original model may be misspecified in some way.
134
+
This example demonstrates how to use the Tabu search for model
135
+
specification searches when the original model may be misspecified in
0 commit comments