Skip to content

Commit

Permalink
I forgot to render last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
phdpablo committed Jun 16, 2024
1 parent 8aacd94 commit deb670b
Show file tree
Hide file tree
Showing 23 changed files with 427 additions and 181 deletions.
2 changes: 1 addition & 1 deletion 01-intro.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ Practically, this includes an R tutorial utilizing the lavaan package [@rosseel2

Tutorial articles, following the FAIR principles (Findable, Accessible, Interoperable, and Reusable) [@wilkinson2016], play a vital role in promoting open science [@martins2021; @mendes-da-silva2023], by detailing significant methods or application areas in an accessible yet comprehensive manner. This encourages adherence to best practices among researchers, minimizing the impact of positive publication bias.

This tutorial is structured into three sections, beyond the introductory discussion. It includes a thorough review of CFA recommended practices, an example of real-world research application in the R ecosystem, and final considerations, following @Martins2021 format for tutorial articles. This approach, combined with workflow recommendations for reproducibility, aims to support the applied social sciences community in effectively utilizing CFA [@martins2021; @mendes-da-silva2023].
This tutorial is structured into three sections, beyond the introductory discussion. It includes a thorough review of CFA recommended practices, an example of real-world research application in the R ecosystem, and final considerations, following @martins2021 format for tutorial articles. This approach, combined with workflow recommendations for reproducibility, aims to support the applied social sciences community in effectively utilizing CFA [@martins2021; @mendes-da-silva2023].
44 changes: 32 additions & 12 deletions Smart-Choices-for-Measurement-Models.tex
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,28 @@
\setlength{\emergencystretch}{3em} % prevent overfull lines
\setcounter{secnumdepth}{5}
% Make \paragraph and \subparagraph free-standing
\makeatletter
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\renewcommand{\paragraph}{
\@ifstar
\xxxParagraphStar
\xxxParagraphNoStar
}
\newcommand{\xxxParagraphStar}[1]{\oldparagraph*{#1}\mbox{}}
\newcommand{\xxxParagraphNoStar}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\renewcommand{\subparagraph}{
\@ifstar
\xxxSubParagraphStar
\xxxSubParagraphNoStar
}
\newcommand{\xxxSubParagraphStar}[1]{\oldsubparagraph*{#1}\mbox{}}
\newcommand{\xxxSubParagraphNoStar}[1]{\oldsubparagraph{#1}\mbox{}}
\fi
\makeatother


\providecommand{\tightlist}{%
Expand Down Expand Up @@ -206,15 +220,22 @@ \section*{Abstract}\label{abstract}
framework. This framework enables readers to access the article's source
code, utilized data, analytical execution codes, and various reading
media. We anticipate that by employing this pedagogical approach,
developed entirely within an open environment (utilizing
Git/Github/RStudio/Quarto/R packages + lavaan/Docker), researchers
proficient in specific statistical techniques relevant to their domains
will adopt and disseminate this proposal, thereby benefiting their
colleagues.
developed entirely within an open environment
(\href{https://github.com/phdpablo/smart-cfa/}{https://phdpablo.github.io/smart-cfa/}),
researchers proficient in specific statistical techniques relevant to
their domains will adopt and disseminate this proposal, thereby
benefiting their colleagues.

\textbf{Keywords:} Confirmatory Factor Analysis, Structural Equation
Modeling, Internal Structure Validity, Open Science, \emph{lavaan}.

\emph{How to cite this article:}

Rogers, P. (2024, June 10). Smart Choices for Measurement Models:
Executable Manuscript Tutorial for your Confirmatory Factor Analysis in
R Environment. \emph{PsyArXiv Preprints.}
\url{https://doi.org/10.31234/osf.io/2dy3z}

\bookmarksetup{startatroot}

\section{Introduction}\label{introduction}
Expand Down Expand Up @@ -411,11 +432,10 @@ \section{Introduction}\label{introduction}
This tutorial is structured into three sections, beyond the introductory
discussion. It includes a thorough review of CFA recommended practices,
an example of real-world research application in the R ecosystem, and
final considerations, following (\textbf{Martins2021?}) format for
tutorial articles. This approach, combined with workflow recommendations
for reproducibility, aims to support the applied social sciences
community in effectively utilizing CFA (Martins 2021; Mendes-Da-Silva
2023).
final considerations, following Martins (2021) format for tutorial
articles. This approach, combined with workflow recommendations for
reproducibility, aims to support the applied social sciences community
in effectively utilizing CFA (Martins 2021; Mendes-Da-Silva 2023).

\bookmarksetup{startatroot}

Expand Down
70 changes: 45 additions & 25 deletions docs/01-intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.550">
<meta name="generator" content="quarto-1.5.45">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">


<title>Smart Choices for Measurement Models - 1&nbsp; Introduction</title>
<title>1&nbsp; Introduction – Smart Choices for Measurement Models</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
Expand Down Expand Up @@ -103,13 +103,13 @@
<header id="quarto-header" class="headroom fixed-top">
<nav class="quarto-secondary-nav">
<div class="container-fluid d-flex">
<button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" role="button" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<i class="bi bi-layout-text-sidebar-reverse"></i>
</button>
<nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./01-intro.html"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Introduction</span></a></li></ol></nav>
<a class="flex-grow-1" role="button" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<a class="flex-grow-1" role="navigation" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
</a>
<button type="button" class="btn quarto-search-button" aria-label="" onclick="window.quartoOpenSearch();">
<button type="button" class="btn quarto-search-button" aria-label="Search" onclick="window.quartoOpenSearch();">
<i class="bi bi-search"></i>
</button>
</div>
Expand All @@ -126,23 +126,23 @@
<a href="https://github.com/phdpablo/smart-cfa/" title="Source Code" class="quarto-navigation-tool px-1" aria-label="Source Code"><i class="bi bi-github"></i></a>
<a href="./Smart-Choices-for-Measurement-Models.pdf" title="Download PDF" class="quarto-navigation-tool px-1" aria-label="Download PDF"><i class="bi bi-file-pdf"></i></a>
<div class="dropdown">
<a href="" title="Share" id="quarto-navigation-tool-dropdown-0" class="quarto-navigation-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Share"><i class="bi bi-share"></i></a>
<a href="" title="Share" id="quarto-navigation-tool-dropdown-0" class="quarto-navigation-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false" role="link" aria-label="Share"><i class="bi bi-share"></i></a>
<ul class="dropdown-menu" aria-labelledby="quarto-navigation-tool-dropdown-0">
<li>
<a class="dropdown-item sidebar-tools-main-item" href="https://twitter.com/intent/tweet?url=|url|">
<i class="bi bi-bi-twitter pe-1"></i>
<i class="bi bi-twitter pe-1"></i>
Twitter
</a>
</li>
<li>
<a class="dropdown-item sidebar-tools-main-item" href="https://www.facebook.com/sharer/sharer.php?u=|url|">
<i class="bi bi-bi-facebook pe-1"></i>
<i class="bi bi-facebook pe-1"></i>
Facebook
</a>
</li>
<li>
<a class="dropdown-item sidebar-tools-main-item" href="https://www.linkedin.com/sharing/share-offsite/?url=|url|">
<i class="bi bi-bi-linkedin pe-1"></i>
<i class="bi bi-linkedin pe-1"></i>
LinkedIn
</a>
</li>
Expand Down Expand Up @@ -205,7 +205,7 @@
</nav>
<div id="quarto-sidebar-glass" class="quarto-sidebar-collapse-item" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item"></div>
<!-- margin-sidebar -->
<div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
<div id="quarto-margin-sidebar" class="sidebar margin-sidebar zindex-bottom">

</div>
<!-- main -->
Expand Down Expand Up @@ -238,7 +238,7 @@ <h1 class="title display-7"><span class="chapter-number">1</span>&nbsp; <span cl
<p>The aim is to guide researchers through CFA to access the underlying structure of measurement models without falling into common traps at any stage of the validation process. Early-stage decisions can preempt later limitations, while missteps may necessitate exploratory research or additional efforts in subsequent phases.</p>
<p>Practically, this includes an R tutorial utilizing the lavaan package <span class="citation" data-cites="rosseel2012">(<a href="references.html#ref-rosseel2012" role="doc-biblioref">Rosseel 2012</a>)</span>, adhering to reproducibility, replicability, and transparency standards of the Open Science movement <span class="citation" data-cites="gilroy2019 kathawalla2021 klein2018">(<a href="references.html#ref-gilroy2019" role="doc-biblioref">Gilroy and Kaplan 2019</a>; <a href="references.html#ref-kathawalla2021" role="doc-biblioref">Kathawalla, Silverstein, and Syed 2021</a>; <a href="references.html#ref-klein2018" role="doc-biblioref">Klein et al. 2018</a>)</span>.</p>
<p>Tutorial articles, following the FAIR principles (Findable, Accessible, Interoperable, and Reusable) <span class="citation" data-cites="wilkinson2016">(<a href="references.html#ref-wilkinson2016" role="doc-biblioref">Wilkinson et al. 2016</a>)</span>, play a vital role in promoting open science <span class="citation" data-cites="martins2021 mendes-da-silva2023">(<a href="references.html#ref-martins2021" role="doc-biblioref">Martins 2021</a>; <a href="references.html#ref-mendes-da-silva2023" role="doc-biblioref">Mendes-Da-Silva 2023</a>)</span>, by detailing significant methods or application areas in an accessible yet comprehensive manner. This encourages adherence to best practices among researchers, minimizing the impact of positive publication bias.</p>
<p>This tutorial is structured into three sections, beyond the introductory discussion. It includes a thorough review of CFA recommended practices, an example of real-world research application in the R ecosystem, and final considerations, following <span class="citation" data-cites="Martins2021">(<a href="references.html#ref-Martins2021" role="doc-biblioref"><strong>Martins2021?</strong></a>)</span> format for tutorial articles. This approach, combined with workflow recommendations for reproducibility, aims to support the applied social sciences community in effectively utilizing CFA <span class="citation" data-cites="martins2021 mendes-da-silva2023">(<a href="references.html#ref-martins2021" role="doc-biblioref">Martins 2021</a>; <a href="references.html#ref-mendes-da-silva2023" role="doc-biblioref">Mendes-Da-Silva 2023</a>)</span>.</p>
<p>This tutorial is structured into three sections, beyond the introductory discussion. It includes a thorough review of CFA recommended practices, an example of real-world research application in the R ecosystem, and final considerations, following <span class="citation" data-cites="martins2021">Martins (<a href="references.html#ref-martins2021" role="doc-biblioref">2021</a>)</span> format for tutorial articles. This approach, combined with workflow recommendations for reproducibility, aims to support the applied social sciences community in effectively utilizing CFA <span class="citation" data-cites="martins2021 mendes-da-silva2023">(<a href="references.html#ref-martins2021" role="doc-biblioref">Martins 2021</a>; <a href="references.html#ref-mendes-da-silva2023" role="doc-biblioref">Mendes-Da-Silva 2023</a>)</span>.</p>


<div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0" role="list" style="display: none">
Expand Down Expand Up @@ -556,18 +556,7 @@ <h1 class="title display-7"><span class="chapter-number">1</span>&nbsp; <span cl
}
return false;
}
const clipboard = new window.ClipboardJS('.code-copy-button', {
text: function(trigger) {
const codeEl = trigger.previousElementSibling.cloneNode(true);
for (const childEl of codeEl.children) {
if (isCodeAnnotation(childEl)) {
childEl.remove();
}
}
return codeEl.innerText;
}
});
clipboard.on('success', function(e) {
const onCopySuccess = function(e) {
// button target
const button = e.trigger;
// don't keep focus
Expand Down Expand Up @@ -599,18 +588,45 @@ <h1 class="title display-7"><span class="chapter-number">1</span>&nbsp; <span cl
}, 1000);
// clear code selection
e.clearSelection();
}
const getTextToCopy = function(trigger) {
const codeEl = trigger.previousElementSibling.cloneNode(true);
for (const childEl of codeEl.children) {
if (isCodeAnnotation(childEl)) {
childEl.remove();
}
}
return codeEl.innerText;
}
const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', {
text: getTextToCopy
});
clipboard.on('success', onCopySuccess);
if (window.document.getElementById('quarto-embedded-source-code-modal')) {
// For code content inside modals, clipBoardJS needs to be initialized with a container option
// TODO: Check when it could be a function (https://github.com/zenorocha/clipboard.js/issues/860)
const clipboardModal = new window.ClipboardJS('.code-copy-button[data-in-quarto-modal]', {
text: getTextToCopy,
container: window.document.getElementById('quarto-embedded-source-code-modal')
});
clipboardModal.on('success', onCopySuccess);
}
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
var mailtoRegex = new RegExp(/^mailto:/);
var filterRegex = new RegExp("https:\/\/phdpablo\.github\.io\/smart-cfa\/");
var isInternal = (href) => {
return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
}
// Inspect non-navigation links and adorn them if external
var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool):not(.about-link)');
for (var i=0; i<links.length; i++) {
const link = links[i];
if (!isInternal(link.href)) {
// undo the damage that might have been done by quarto-nav.js in the case of
// links that we want to consider external
if (link.dataset.originalHref !== undefined) {
link.href = link.dataset.originalHref;
}
// target, if specified
link.setAttribute("target", "_blank");
if (link.getAttribute("rel") === null) {
Expand Down Expand Up @@ -652,7 +668,11 @@ <h1 class="title display-7"><span class="chapter-number">1</span>&nbsp; <span cl
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
return note.innerHTML;
if (note) {
return note.innerHTML;
} else {
return "";
}
});
}
const xrefs = window.document.querySelectorAll('a.quarto-xref');
Expand Down
Loading

0 comments on commit deb670b

Please sign in to comment.