Skip to content
Open

Mcmc #60

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
a8b507f
Testing for implementing a Markow-Chain Monte-Carlo estimator
Kss2k Jul 29, 2025
33e2843
Looks like it may work, but quite slow
Kss2k Jul 29, 2025
87261db
Clean up post-estimation analysis
Kss2k Jul 29, 2025
f7458f9
Test bayesian approach for three-way interactions
Kss2k Jul 30, 2025
8685b98
Added `modsem_stan` function
Kss2k Jul 30, 2025
747729b
delete unused files
Kss2k Jul 30, 2025
4473b14
Create generics for `modsem_stan`
Kss2k Jul 30, 2025
5446ba9
Get better results
Kss2k Jul 31, 2025
e26500d
Finialize initial implementation
Kss2k Jul 31, 2025
ab44421
Add `rstan` to dependencies
Kss2k Jul 31, 2025
e6564aa
Square residual standard deviations for etas, not just indicators
Kss2k Aug 2, 2025
e9029c3
Exclude nuisance parameters in `rstan::sampling`
Kss2k Aug 2, 2025
aeca366
Fix typos in `tests/testthta/test_modsem_stan.R`
Kss2k Aug 2, 2025
3297764
More error handling in quasi-adaptive quadrature
Kss2k Aug 1, 2025
14bc6db
Don't count new-line character in `getWidthPrintedParTable()`
Kss2k Aug 3, 2025
55e1226
Better summary for `modsem_stan`
Kss2k Aug 3, 2025
bab5b7d
Add Stan syntax for a generalized SEM model. For later use
Kss2k Aug 6, 2025
5f64b84
Clean of style and formatting in C++ code
Kss2k Aug 3, 2025
6c23c6d
Print absolute differences per eval in QML
Kss2k Aug 4, 2025
0573404
Don't overwrite `parameter_estimates()` in `/R/modsem_stan.R`
Kss2k Aug 7, 2025
b34acfa
Don't implicitly assume residual covariance structure of single-inds QML
Kss2k Aug 8, 2025
77534d3
Merge branch 'main' into mcmc
Kss2k Aug 8, 2025
500b491
Merge branch 'main' into mcmc
Kss2k Aug 17, 2025
f308e25
Fix bug from merge
Kss2k Aug 17, 2025
7534e7d
Add handling of ordered variables in `modsem_stan()`
Kss2k Aug 20, 2025
8f5ba0f
Merge branch 'main' into mcmc-ordered
Kss2k Aug 20, 2025
26cd55a
Fix Merge-conflict in DESCRIPTION
Kss2k Aug 20, 2025
3c4f077
Add constraints to ordinal solution
Kss2k Aug 20, 2025
f3595dc
Working ordered MCMC
Kss2k Aug 21, 2025
f3702af
Add handling of some basic model constraints
Kss2k Aug 21, 2025
ccc1a2f
Better handling of residual variances
Kss2k Aug 21, 2025
d51f5f7
Ordered OVs in `modsem_stan` (#71)
Kss2k Aug 21, 2025
1cd8b1f
Add handling of ordered variables in `modsem_stan()`
Kss2k Aug 20, 2025
c9c32e5
Add some additional arguments
Kss2k Aug 22, 2025
a571ad0
Add RCS to `modsem_stan`
Kss2k Aug 23, 2025
ef965e2
Rename `R/create_stan_model.R` -> `R/model_stan.R`
Kss2k Aug 23, 2025
bde7994
Re-factor some test-code
Kss2k Aug 23, 2025
c011ccd
Merge branch 'mcmc-ordered' into mcmc
Kss2k Aug 23, 2025
23f97f8
Fix typo (`ord_set`->`ordSet`)
Kss2k Aug 23, 2025
fa8cb63
Merge branch 'main' into mcmc
Kss2k Aug 29, 2025
f42faa1
Merge branch 'main' into mcmc
Kss2k Sep 14, 2025
161ad7b
Add `isStan` variable
Kss2k Sep 16, 2025
3ef2385
Merge branch 'main' into mcmc
Kss2k Sep 16, 2025
4420fce
Update README.md
Kss2k Sep 17, 2025
dc807b6
`format(scientifc=FALSE)` not `as.character()` in `twostep.modsem_da()`
Kss2k Sep 23, 2025
5aedad9
Update `test_sam.R` after changes in last `lavaan` release
Kss2k Sep 23, 2025
1097019
Set `immediate. = FALSE` in `warnif` call
Kss2k Sep 24, 2025
79c6d7f
Correctly center interactions for quad-terms in `centerInteractions`
Kss2k Sep 25, 2025
285c675
Better optimization of starting parameters of latent mean structures …
Kss2k Sep 25, 2025
2c1d5b3
Better calculation of centered estimates for SAM models
Kss2k Sep 28, 2025
1398255
Always add variances to Mplus/LMS/QML when standardizing
Kss2k Sep 28, 2025
0911de1
Add test for non-centered solutions using `lavaan::sam()`
Kss2k Sep 28, 2025
ef171b6
Cleaner calculation of Binv in `src/equations_lms.cpp` (#88)
Kss2k Sep 28, 2025
e527a59
Merge branch 'main' into mcmc
Kss2k Oct 11, 2025
c525058
Merge branch 'main' into mcmc
Kss2k Oct 27, 2025
2de94c8
Make rstan an optional dependency
Kss2k Oct 27, 2025
cd9f68e
Add handling of residual covariances in modsem_stan
Kss2k Oct 27, 2025
0eada9a
Add full handling of residual covariances
Kss2k Oct 28, 2025
6ed91bc
Add standardized estimates in summary, and non-symmetric ci/p-values
Kss2k Oct 28, 2025
5a366f3
Fix ordering of interaction terms, and ask to install rstan
Kss2k Oct 28, 2025
3a01dd1
Merge branch 'main' into mcmc
Kss2k Feb 17, 2026
f7ed7c5
Merge branch 'main' into mcmc
Kss2k Feb 23, 2026
1adda73
Merge branch 'main' into mcmc
Kss2k Mar 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ Imports: Rcpp, purrr, stringr, lavaan, rlang, MplusAutomation, nlme, dplyr,
Depends:
R (>= 4.1.0)
URL: https://modsem.org
Suggests: knitr, rmarkdown, ggpubr, RColorBrewer
Suggests: knitr, rmarkdown, ggpubr, RColorBrewer, rstan
VignetteBuilder: knitr
8 changes: 8 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ S3method(centered_estimates,modsem_da)
S3method(coef,modsem_da)
S3method(coef,modsem_mplus)
S3method(coef,modsem_pi)
S3method(coef,modsem_stan)
S3method(coefficients,modsem_da)
S3method(coefficients,modsem_pi)
S3method(compare_fit,modsem_da)
Expand Down Expand Up @@ -59,6 +60,7 @@ S3method(parameter_estimates,lavaan)
S3method(parameter_estimates,modsem_da)
S3method(parameter_estimates,modsem_mplus)
S3method(parameter_estimates,modsem_pi)
S3method(parameter_estimates,modsem_stan)
S3method(print,ModsemMatrix)
S3method(print,ModsemParTable)
S3method(print,ModsemRelcorr)
Expand All @@ -68,6 +70,7 @@ S3method(print,modsem_da)
S3method(print,modsem_mplus)
S3method(print,modsem_partable_summary)
S3method(print,modsem_pi)
S3method(print,modsem_stan)
S3method(print,simple_slopes)
S3method(print,summary_da)
S3method(print,summary_modsem_pi)
Expand All @@ -77,19 +80,23 @@ S3method(standardized_estimates,lavaan)
S3method(standardized_estimates,modsem_da)
S3method(standardized_estimates,modsem_mplus)
S3method(standardized_estimates,modsem_pi)
S3method(standardized_estimates,modsem_stan)
S3method(summary,modsem_da)
S3method(summary,modsem_mplus)
S3method(summary,modsem_pi)
S3method(summary,modsem_stan)
S3method(var_interactions,data.frame)
S3method(var_interactions,modsem_da)
S3method(var_interactions,modsem_mplus)
S3method(vcov,modsem_da)
S3method(vcov,modsem_mplus)
S3method(vcov,modsem_pi)
S3method(vcov,modsem_stan)
export(bootstrap_modsem)
export(centered_estimates)
export(colorize_output)
export(compare_fit)
export(compile_stan_model)
export(default_settings_da)
export(default_settings_pi)
export(estimate_h0)
Expand All @@ -107,6 +114,7 @@ export(modsem_mplus)
export(modsem_nobs)
export(modsem_pi)
export(modsem_predict)
export(modsem_stan)
export(modsem_vcov)
export(modsemify)
export(parameter_estimates)
Expand Down
1 change: 0 additions & 1 deletion R/construct_matrices_da.R
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ constructGamma <- function(DVs, IVs, parTable, auto.fix.first = TRUE) {

exprsGamma <- rbind(exprsGamma1, exprsGamma3)


numDVs <- length(DVs)
numIVs <- length(IVs)
gamma <- matrix(0, nrow = numDVs, ncol = numIVs, dimnames = list(DVs, IVs))
Expand Down
3 changes: 2 additions & 1 deletion R/generics_modsem_da.R
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,8 @@ centered_estimates.modsem_da <- function(object,



#' @describeIn modsem_predict
#' @describeIn modsem_predict Predict From \code{modsem} Models
#'
#' Computes (optionally standardised) factor scores via the
#' regression method using the baseline model unless \code{H0 = FALSE}.
#'
Expand Down
Loading
Loading