Skip to content

Commit 49738c1

Browse files
20250204 - bounded estimation with random starts
1 parent 1c3de81 commit 49738c1

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

sem.Rmd

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,6 +1531,25 @@ ggplot(plot_data, aes(x = Murder, y = predicted_slopes)) +
15311531
theme_classic()
15321532
```
15331533

1534+
# Bounded Estimation with Random Starts {#boundedEstimationRandomStarts}
1535+
1536+
For more info, see De Jonckere and Rosseel (2022, 2025).
1537+
1538+
```{r}
1539+
HS.model <- '
1540+
visual =~ x1 + x2 + x3
1541+
textual =~ x4 + x5 + x6
1542+
speed =~ x7 + x8 + x9
1543+
'
1544+
1545+
fit <- cfa(
1546+
HS.model,
1547+
data = HolzingerSwineford1939,
1548+
bounds = "pos.var", # forces all variances of both observed and latent variables to be strictly nonnegative
1549+
rstarts = 10,
1550+
verbose = TRUE)
1551+
```
1552+
15341553
# Power Analysis {#powerAnalysis}
15351554

15361555
https://isaactpetersen.github.io/Principles-Psychological-Assessment/sem.html#monteCarloPowerAnalysis

0 commit comments

Comments
 (0)