Skip to content

Commit

Permalink
added auto.th and auto.delta options
Browse files Browse the repository at this point in the history
  • Loading branch information
karchjd committed Oct 7, 2024
1 parent f781f4f commit c50cace
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 52 deletions.
20 changes: 14 additions & 6 deletions frontend/src/MenuTop/AddMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
name: "Treat Exogenous Observed Variables as Fixed Variables",
modelProperty: "fixed_x",
},
{
name: "Include Freely Estimated Thresholds for Ordered Variables in the Model",
modelProperty: "auto.th",
},
{
name: "Include Freely Estimated Response Scaling Parameters for Ordered Variables in the Model",
modelProperty: "auto.delta",
},
];
const name = "Automatically..";
Expand All @@ -42,12 +50,6 @@
</script>

<Dropdown {name}>
{#each menuItems as item}
<CheckItem
bind:name={item.name}
bind:checked={$modelOptions[item.modelProperty]}
/>
{/each}
<li class="dropdown-submenu">
<a tabindex="-1" href={"#"}>Add Means?</a>
<ul class="dropdown-menu">
Expand All @@ -70,6 +72,12 @@
bind:checked={$modelOptions.intLvFree}
bind:disable={disabledInts}
/>
{#each menuItems as item}
<CheckItem
bind:name={item.name}
bind:checked={$modelOptions[item.modelProperty]}
/>
{/each}
</Dropdown>

<style>
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/Shiny/toR.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ function produceLavaanOptions(ordered_labels) {
\t\t auto.cov.lv.x = ${boolToString(
modelOpt.auto_cov_lv_x
)}, auto.cov.y = ${boolToString(modelOpt.auto_cov_y)},
\t\t fixed.x = ${boolToString(modelOpt.fixed_x)}`;
\t\t fixed.x = ${boolToString(modelOpt.fixed_x)}, auto.th = ${boolToString(modelOpt["auto.th"])},
\t\t auto.delta = ${boolToString(modelOpt["auto.delta"])}`;
if (modelOpt.se == "boot") {
const additional = `, bootstrap = ${modelOpt.n_boot})`;
options = options + additional;
Expand All @@ -368,7 +369,8 @@ function produceLavaanOptions(ordered_labels) {

if (ordered_labels.length > 0) {
const ordered_arg = 'c("' + ordered_labels.join('", "') + '")'
options = `ordered = ${ordered_arg}, ${options}`
options = `ordered = ${ordered_arg},
\t\t ${options}`
}
return options;
}
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/stores.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export let modelOptions = writable({
auto_cov_y: true,
fixed_x: true,
mode: "user model",
"auto.th": true,
"auto.delta": true,
});

export let gridViewOptions = writable({
Expand Down
45 changes: 45 additions & 0 deletions inst/www/assets/index-53e5964a.js

Large diffs are not rendered by default.

43 changes: 0 additions & 43 deletions inst/www/assets/index-c381e0bd.js

This file was deleted.

2 changes: 1 addition & 1 deletion inst/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</style>

</script>
<script type="module" crossorigin src="./assets/index-c381e0bd.js"></script>
<script type="module" crossorigin src="./assets/index-53e5964a.js"></script>
<link rel="modulepreload" crossorigin href="./assets/svelte-fdfc2579.js">
<link rel="modulepreload" crossorigin href="./assets/core-js-bbf708ea.js">
<link rel="modulepreload" crossorigin href="./assets/lodash-6eb5ace2.js">
Expand Down

0 comments on commit c50cace

Please sign in to comment.