-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more estimators and change the optioning for estimators, test, and SEs #248
Conversation
3ac30ca
to
ee04e94
Compare
05509fa
to
69d8d0e
Compare
69d8d0e
to
a640959
Compare
holly molly, I don't wanna be reviewing this! |
ebf3858
to
98d26be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly snake_case to camelCase changes needed, still gonna check the issues in JASP
R/common.R
Outdated
return(lavaan::coef(lav_object)) | ||
} | ||
|
||
coef_with_callback_std <- function(lav_object, typeStd) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coefWithCallbackStd
?
R/common.R
Outdated
|
||
# Add the bootstrap samples to the fit object | ||
fit@boot <- list(coef = bootres) | ||
fit@Options$se <- "bootstrap" | ||
|
||
# exclude error bootstrap runs | ||
err_id <- attr(fit@boot$coef, "error.idx") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
errId
?
R/sem.R
Outdated
} else { | ||
lav_args[["sample.cov"]] <- .semDataCovariance(dataset, options[["models"]][[i]][["syntax"]]) | ||
cov_mat <- .semDataCovariance(dataset, options[["models"]][[i]][["syntax"]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
covMat
?
R/sem.R
Outdated
if (options[["standardizedVariable"]]) { | ||
dataset <- scale(dataset) | ||
} | ||
lav_args[["data"]] <- dataset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lavaanArgs
?
98d26be
to
870d95c
Compare
c8f6e73
to
3530648
Compare
I am patiently waiting for your review |
9ed3e3d
to
fde589a
Compare
Ready :) |
So, I dinally managed to get this running on 19.0 release --- you were right about that. |
…additional fits table
fde589a
to
82ab069
Compare
Approve? |
So essentially what happens through this PR:
all four options (estimator, test, information, standard error) have a default setting which can change in the background depending on the scale of the variables involved or the mimic option or the estimator option
add estimators from lavaan: see here https://rdrr.io/cran/lavaan/man/lavOptions.html
add a tooltip explaining the estimators
add more model test options https://rdrr.io/cran/lavaan/man/lavTest.html
add a few more footnotes under the model fit table showing the background options used when the setting is initially default
add a footnote under the model fit table if there are warnings encountered
add a checkbox to show those warnings as html text in the output window
there is not really a lot of conditioning going on what test, se, information, estimator goes together or not (although I left the contains in place that were already there). When options do not match lavaan gives an error which means JASP will give an error and ideally that error is informative (I hope). Sometimes lavaan changes options in the background but gives a warning, we display that warning now in the html.
adds thresholds table and intercepts for some special cases, that is, missing=fiml, or some but not all ordinal variables
restructure the additional fits tables
adds standardized CIs, all standardization now goes through
standardizedSolution
. The qml now offers to choose the standardization, and the tables will present show only one estimate, either unstd, std.all, std.lv, or std.noxthere was an error in the bootstrapping, where the SEs in the parameter tables were still the SEs based on the initial model fit, that is, usually based on a single ML estimation. Those are now replaced with the bootstrapped estimated SEs
the standardization for the bootstrapped option is a bit tricky, this doesnt just work through
standardizedSolution
. For now we haveparameterEstimates
is called on the resulting object with the CI and theboot.ci.type
work just like for the unstandardized solutionfixes [Bug]: WLSMV corrected statistics are not reported in the output jasp-issues#2644
fixes JASP results DWLS - Discrepancies with Lavaan jasp-issues#1259
fixes robust ML and Satorra Bentler Chi square jasp-issues#959
fixes [Feature Request]: MLR Estimator for CFA/SEM jasp-issues#1484
fixes [Bug]: computation of standardized estimates (mediation analysis) jasp-issues#2740
fixes CIs for std(all) in SEM jasp-issues#1102
fixes https://github.com/jasp-stats/INTERNAL-jasp/issues/2182
fixes [Bug]: SEM Analysis Terminated Unexpectedly jasp-issues#2879
fixes [Bug]: SEM model jasp-issues#2905
fixes [Bug]: SEM: Error is Node Stack Overflow jasp-issues#2908
What is a bit difficult is that some of the estimators change not only the estimation method, but also the model test and the standard error calculation. What is interesting is, if model test and standard errors are actually specified, beyond the default, their specification overwrites the estimator specification.
@Kucharssim maybe you have some feedback :)
toDo: