{"found":49878,"hits":[{"document":{"abstract":null,"archive_url":null,"authors":[],"blog":{"archive_collection":null,"archive_host":null,"archive_prefix":null,"archive_timestamps":null,"authors":null,"canonical_url":null,"category":"socialScience","community_id":"6db161d5-9161-49cf-ab79-f33ad128ed24","created_at":1734126057,"current_feed_url":null,"description":"r-dcm blog","doi_as_guid":false,"favicon":null,"feed_format":"application/rss+xml","feed_url":"https://r-dcm.org/rss.xml","filter":null,"funding":null,"generator":"Quarto","generator_raw":"Quarto 1.6.39","home_page_url":"https://r-dcm.org","id":"5822f383-190a-4c32-9937-86ee8fc75254","indexed":true,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":0,"relative_url":null,"ror":null,"secure":true,"slug":"r_dcm","status":"active","subfield":"1803","subfield_validated":null,"title":"r-dcm blog","updated_at":1775375532.831312,"use_api":null,"use_mastodon":false,"user_id":"943e7faa-bd06-4044-80a5-9fef5df8ccdb"},"blog_name":"r-dcm blog","blog_slug":"r_dcm","content_html":"<section class=\"level2\" id=\"introduction\"><h2 class=\"anchored\" data-anchor-id=\"introduction\">Introduction</h2>\n<p>How do you specify and estimate a diagnostic classification model (DCM) using measr? In this article, we will walk you through the steps. We start with data for building the model, learn how to specify DCMs that make different assumptions about the data, and explore how to estimate the model with <a href=\"https://mc-stan.org\"><em>Stan</em></a>.</p>\n<p>To use code in this article, you will need to install the following packages: <a href=\"https://dcmdata.r-dcm.org\">dcmdata</a>, <a href=\"https://measr.r-dcm.org\">measr</a>, and <a href=\"https://mc-stan.org/rstan/\">rstan</a>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb1\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org\">measr</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for model specification and estimation</span></span>\n<span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># Helper packages</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmdata.r-dcm.org\">dcmdata</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for example data set</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/rstan/\">rstan</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for estimation backend</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level2\" id=\"rapid-online-assessment-of-reading-and-phonological-awareness-roar-pa-data\"><h2 class=\"anchored\" data-anchor-id=\"rapid-online-assessment-of-reading-and-phonological-awareness-roar-pa-data\">Rapid Online Assessment of Reading and Phonological Awareness (ROAR-PA) data</h2>\n<p>Let\u2019s use data from the ROAR-PA <span class=\"citation\" data-cites=\"roarpa\">(Gijbels et al., 2024)</span> to learn how to specify and estimate a DCM with measr. The ROAR-PA data is available in the dcmdata package, and contains responses to 57 items from 272 respondents.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb2\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_data</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 272 \u00d7 58</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;       id fsm_01 fsm_04 fsm_05 fsm_06 fsm_07 fsm_08 fsm_10 fsm_11 fsm_12 fsm_14</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1   161      0      1      1      1      1      0      0      1      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2   226      0      1      0      1      0      0      1      0      1      0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3   103      0      1      0      1      0      0      0      0      0      0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4     7      1      1      0      0      1      0      0      0      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5   185      1      1      1      1      1      1      1      1      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6   129      1      1      1      0      1      1      0      0      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7   181      1      1      1      1      1      1      1      1      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8    36      1      1      1      1      1      1      1      1      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9   206      1      1      1      1      1      1      1      1      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10   257      1      1      1      1      1      1      1      1      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 262 more rows</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 47 more variables: fsm_15 &lt;int&gt;, fsm_16 &lt;int&gt;, fsm_17 &lt;int&gt;, fsm_18 &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   fsm_21 &lt;int&gt;, fsm_22 &lt;int&gt;, fsm_23 &lt;int&gt;, fsm_24 &lt;int&gt;, fsm_25 &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   lsm_01 &lt;int&gt;, lsm_02 &lt;int&gt;, lsm_04 &lt;int&gt;, lsm_05 &lt;int&gt;, lsm_06 &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   lsm_07 &lt;int&gt;, lsm_08 &lt;int&gt;, lsm_10 &lt;int&gt;, lsm_11 &lt;int&gt;, lsm_13 &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   lsm_15 &lt;int&gt;, lsm_16 &lt;int&gt;, lsm_17 &lt;int&gt;, lsm_18 &lt;int&gt;, lsm_19 &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   lsm_20 &lt;int&gt;, lsm_21 &lt;int&gt;, lsm_22 &lt;int&gt;, lsm_24 &lt;int&gt;, del_01 &lt;int&gt;, \u2026</span></span></code></pre></div></div>\n</div>\n<p>In addition to our response data, a DCM also requires a Q-matrix. A Q-matrix contains one row per item, and one column per attribute (plus an optional column of item identifiers). A value of 1 indicates that the item measures the attribute, and a value of 0 indicates the item does not measure the attribute. In our Q-matrix, we can see that the item identifiers in the in the rows (<code>item</code>) correspond to the column names of the data. Additionally, we see that there are three attributes measured by this assessment: <code>lsm</code>, <code>del</code>, and <code>fsm</code>. These refer to the first sound made (<code>fsm</code>), last sound made (<code>lsm</code>), and deletion (<code>del</code>) elements of phonological awareness.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb3\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_qmatrix</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 57 \u00d7 4</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    item     lsm   del   fsm</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;  &lt;int&gt; &lt;int&gt; &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 fsm_01     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 fsm_04     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 fsm_05     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 fsm_06     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 fsm_07     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 fsm_08     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 fsm_10     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 fsm_11     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 fsm_12     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 fsm_14     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 47 more rows</span></span></code></pre></div></div>\n</div>\n<p>Our task is to determine which attributes each respondent is proficient on, given their item responses. For more information on the data set, see <code><a href=\"https://dcmdata.r-dcm.org/reference/roarpa.html\">?roarpa</a></code> and <span class=\"citation\" data-cites=\"roarpa\">Gijbels et al. (2024)</span>.</p>\n</section><section class=\"level2\" id=\"specify-a-dcm\"><h2 class=\"anchored\" data-anchor-id=\"specify-a-dcm\">Specify a DCM</h2>\n<p>A DCM model specification has three primary components: the Q-matrix, a measurement model, and a structural model. Given these three components, we can create a model specification with <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb4\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_spec</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_spec</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; A loglinear cognitive diagnostic model (LCDM) measuring 3 attributes</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; with 57 items.</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attributes:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"lsm\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"del\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"fsm\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attribute structure:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   Unconstrained</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Prior distributions:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   intercept ~ normal(0, 2)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   maineffect ~ lognormal(0, 1)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   `Vc` ~ dirichlet(1, 1, 1)</span></span></code></pre></div></div>\n</div>\n<p>The Q-matrix, as we described, defines which items measure each attribute. In addition the the Q-matrix itself, we must also tell <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code> which column within the Q-matrix contains the item identifiers. If there is no item identifier, then <code>identifier</code> can be left as <code>NULL</code> (the default). In our ROAR-PA specification, we can see that each of our three attributes is measured by 19 items. The ROAR-PA Q-matrix is a simple structure, meaning that each item measures only one attribute.</p>\n<p>At a high level, the measurement model describes how attributes interact with each other on specific items. If an item measures two attributes, how do we expect a respondent to perform if they possess only one of the attributes? Are the attributes compensatory, meaning that proficiency on either is sufficient to answer the item correctly, or noncompensatory, and proficiency on both attributes is required in order to provide a correct response? The choice of measurement model dictates these relationships.</p>\n<p>The structural model describes relationships between proficiency on the attributes. Is proficiency on one attribute independent of proficiency on another, or is proficiency correlated? It\u2019s also possible that some attributes may represent prerequisite knowledge such that respondents must demonstrate proficiency before they can demonstrate proficiency of other attributes. The structural model is used to define these relationships.</p>\n<p>We\u2019ll explore both measurement and structural models in more detail in the next sections.</p>\n<section class=\"level3\" id=\"measurement-models\"><h3 class=\"anchored\" data-anchor-id=\"measurement-models\">Measurement models</h3>\n<p>measr provides functionality for seven DCM measurement models: the six core models identified by <span class=\"citation\" data-cites=\"rupp-dcm\">Rupp et al. (2010)</span> and a general model that subsumes the other models. A full description of these models is beyond the scope of what we are covering here. However, we will provide a high-level overview the types of models and offer referenes for further details on each.</p>\n<p>The general DCM supported by the measr is the loglinear cognitive diagnostic model <span class=\"citation\" data-cites=\"lcdm lcdm-handbook\">(LCDM; Henson et al., 2009; Henson &amp; Templin, 2019)</span>. This is the most flexible model that allows each item to have unique interactions between attributes, estimating separate main effects and interaction effects for all possible attribute combinations. You can think of the LCDM as the \u201csaturated model\u201d that all other DCMs are constrained versions of. That is, by placing constraints on the LCDM parameters, you can achieve models equivalent to the other core models.</p>\n<p>Under the umbrella of the LCDM are the six core DCMs, which generally fall into two categories: non-compensatory (also called conjunctive) and compensatory (disjunctive). When using a non-compensatory model, attributes function like prerequisites or requirements, and missing an attribute creates a specific deficit that other attributes cannot overcome. In other words, with non-compensatory models, performance is constrained by the weakest link. In this category, measr supports the deterministic input, noisy \u201cand\u201d gate model <span class=\"citation\" data-cites=\"dina\">(DINA; <span class=\"nocase\">de la Torre &amp; Douglas</span>, 2004)</span>; the noisy-input, deterministic \u201cand\u201d gate model <span class=\"citation\" data-cites=\"nida\">(NIDA; Junker &amp; Sijtsma, 2001)</span>; and the non-compensatory reparameterized unified model <span class=\"citation\" data-cites=\"ncrum\">(NC-RUM; DiBello et al., 1995)</span>. On the other hand, when compensatory models, attributes function like independent skills that accumulate, and having more attributes can partially or fully compensate for missing others. Thus, performance improves as you gain more attributes. In the compensatory category, measr supports the deterministic input, noisy \u201cor\u201d gate model <span class=\"citation\" data-cites=\"dino\">(DINO; Templin &amp; Henson, 2006)</span>; the noisy-input, deterministic \u201cor\u201d gate model <span class=\"citation\" data-cites=\"nido\">(NIDO; Templin, 2006)</span>; and the compensatory reparameterized unified model <span class=\"citation\" data-cites=\"crum\">(C-RUM; Hartz, 2002)</span>.</p>\n<p>Each of these measurement models can be estimated with measr by supplying the respective measurement model function, as shown in Table\u00a01, to the <code>measurement_model</code> argument of <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"cell quarto-float quarto-figure quarto-figure-center anchored\" data-layout-align=\"center\" id=\"tbl-meas-models\">\n<figure class=\"quarto-float quarto-float-tbl figure\"><figcaption class=\"quarto-float-caption-top quarto-float-caption quarto-float-tbl\" id=\"tbl-meas-models-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nTable\u00a01: Measurement models supported by measr\n</figcaption><div aria-describedby=\"tbl-meas-models-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<div class=\"cell-output-display\">\n<div id=\"ojumdzikhq\" style=\"padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;\">\n<style>@import url(\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap\");\n#ojumdzikhq table {\n  font-family: 'Open Sans', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n#ojumdzikhq thead, #ojumdzikhq tbody, #ojumdzikhq tfoot, #ojumdzikhq tr, #ojumdzikhq td, #ojumdzikhq th {\n  border-style: none;\n}\n\n#ojumdzikhq p {\n  margin: 0;\n  padding: 0;\n}\n\n#ojumdzikhq .gt_table {\n  display: table;\n  border-collapse: collapse;\n  line-height: normal;\n  margin-left: auto;\n  margin-right: auto;\n  color: #333333;\n  font-size: 16px;\n  font-weight: normal;\n  font-style: normal;\n  background-color: #FFFFFF;\n  width: auto;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #A8A8A8;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 1px;\n  border-bottom-color: #A8A8A8;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_caption {\n  padding-top: 4px;\n  padding-bottom: 4px;\n}\n\n#ojumdzikhq .gt_title {\n  color: #333333;\n  font-size: 125%;\n  font-weight: initial;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-color: #FFFFFF;\n  border-bottom-width: 0;\n}\n\n#ojumdzikhq .gt_subtitle {\n  color: #333333;\n  font-size: 85%;\n  font-weight: initial;\n  padding-top: 3px;\n  padding-bottom: 5px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-color: #FFFFFF;\n  border-top-width: 0;\n}\n\n#ojumdzikhq .gt_heading {\n  background-color: #FFFFFF;\n  text-align: left;\n  border-bottom-color: #FFFFFF;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_bottom_border {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_col_headings {\n  border-top-style: solid;\n  border-top-width: 3px;\n  border-top-color: #FFFFFF;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_col_heading {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 6px;\n  padding-left: 5px;\n  padding-right: 5px;\n  overflow-x: hidden;\n}\n\n#ojumdzikhq .gt_column_spanner_outer {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  padding-top: 0;\n  padding-bottom: 0;\n  padding-left: 4px;\n  padding-right: 4px;\n}\n\n#ojumdzikhq .gt_column_spanner_outer:first-child {\n  padding-left: 0;\n}\n\n#ojumdzikhq .gt_column_spanner_outer:last-child {\n  padding-right: 0;\n}\n\n#ojumdzikhq .gt_column_spanner {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 5px;\n  overflow-x: hidden;\n  display: inline-block;\n  width: 100%;\n}\n\n#ojumdzikhq .gt_spanner_row {\n  border-bottom-style: hidden;\n}\n\n#ojumdzikhq .gt_group_heading {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  text-align: left;\n}\n\n#ojumdzikhq .gt_empty_group_heading {\n  padding: 0.5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: middle;\n}\n\n#ojumdzikhq .gt_from_md > :first-child {\n  margin-top: 0;\n}\n\n#ojumdzikhq .gt_from_md > :last-child {\n  margin-bottom: 0;\n}\n\n#ojumdzikhq .gt_row {\n  padding-top: 3px;\n  padding-bottom: 3px;\n  padding-left: 5px;\n  padding-right: 5px;\n  margin: 10px;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  overflow-x: hidden;\n}\n\n#ojumdzikhq .gt_stub {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#ojumdzikhq .gt_stub_row_group {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 100%;\n  font-weight: initial;\n  text-transform: inherit;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n  vertical-align: top;\n}\n\n#ojumdzikhq .gt_row_group_first td {\n  border-top-width: 2px;\n}\n\n#ojumdzikhq .gt_row_group_first th {\n  border-top-width: 2px;\n}\n\n#ojumdzikhq .gt_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#ojumdzikhq .gt_first_summary_row {\n  border-top-style: solid;\n  border-top-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_first_summary_row.thick {\n  border-top-width: 2px;\n}\n\n#ojumdzikhq .gt_last_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_grand_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#ojumdzikhq .gt_first_grand_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-style: double;\n  border-top-width: 6px;\n  border-top-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_last_grand_summary_row_top {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: double;\n  border-bottom-width: 6px;\n  border-bottom-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_striped {\n  background-color: rgba(128, 128, 128, 0.05);\n}\n\n#ojumdzikhq .gt_table_body {\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_footnotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_footnote {\n  margin: 0px;\n  font-size: 90%;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#ojumdzikhq .gt_sourcenotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 0px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 0px;\n  border-right-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_sourcenote {\n  font-size: 12px;\n  padding-top: 10px;\n  padding-bottom: 10px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#ojumdzikhq .gt_left {\n  text-align: left;\n}\n\n#ojumdzikhq .gt_center {\n  text-align: center;\n}\n\n#ojumdzikhq .gt_right {\n  text-align: right;\n  font-variant-numeric: tabular-nums;\n}\n\n#ojumdzikhq .gt_font_normal {\n  font-weight: normal;\n}\n\n#ojumdzikhq .gt_font_bold {\n  font-weight: bold;\n}\n\n#ojumdzikhq .gt_font_italic {\n  font-style: italic;\n}\n\n#ojumdzikhq .gt_super {\n  font-size: 65%;\n}\n\n#ojumdzikhq .gt_footnote_marks {\n  font-size: 75%;\n  vertical-align: 0.4em;\n  position: initial;\n}\n\n#ojumdzikhq .gt_asterisk {\n  font-size: 100%;\n  vertical-align: 0;\n}\n\n#ojumdzikhq .gt_indent_1 {\n  text-indent: 5px;\n}\n\n#ojumdzikhq .gt_indent_2 {\n  text-indent: 10px;\n}\n\n#ojumdzikhq .gt_indent_3 {\n  text-indent: 15px;\n}\n\n#ojumdzikhq .gt_indent_4 {\n  text-indent: 20px;\n}\n\n#ojumdzikhq .gt_indent_5 {\n  text-indent: 25px;\n}\n\n#ojumdzikhq .katex-display {\n  display: inline-flex !important;\n  margin-bottom: 0.75em !important;\n}\n\n#ojumdzikhq div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {\n  height: 0px !important;\n}\n</style>\n<table class=\"gt_table\" data-quarto-bootstrap=\"false\" data-quarto-disable-processing=\"false\" style=\"table-layout:fixed;width:0px;\">\n<colgroup>\n<col style=\"width:155px;\"/>\n<col style=\"width:500px;\"/>\n<col style=\"width:80px;\"/>\n</colgroup>\n<thead><tr class=\"gt_col_headings\">\n<th class=\"gt_col_heading gt_columns_bottom_border gt_left\" colspan=\"1\" id=\"model\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">model</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_left\" colspan=\"1\" id=\"description\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">description</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_left\" colspan=\"1\" id=\"measr\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">measr</th>\n</tr></thead>\n<tbody class=\"gt_table_body\">\n<tr class=\"gt_group_heading_row\">\n<th class=\"gt_empty_group_heading\" colspan=\"3\" scope=\"colgroup\" style=\"background-color: #023047; color: #FFFFFF; border-left-width: 0px; border-left-style: solid; border-left-color: #000000; border-right-width: 0px; border-right-style: solid; border-right-color: #000000; border-top-width: 0px; border-top-style: solid; border-top-color: #000000; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: #000000;\"></th>\n</tr>\n<tr class=\"gt_row_group_first\">\n<td class=\"gt_row gt_left\" headers=\"NA model\" style=\"background-color: #FFFFFF;\">LCDM</td>\n<td class=\"gt_row gt_left\" headers=\"NA description\" style=\"background-color: #FFFFFF;\">General and flexible, subsumes other models</td>\n<td class=\"gt_row gt_left\" headers=\"NA measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YGxjZG0oKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm()</a></code></span></span></td>\n</tr>\n<tr class=\"gt_group_heading_row\">\n<th class=\"gt_group_heading\" colspan=\"3\" id=\"Non-compensatory\" scope=\"colgroup\" style=\"background-color: #023047; color: #FFFFFF; border-left-width: 0px; border-left-style: solid; border-left-color: #000000; border-right-width: 0px; border-right-style: solid; border-right-color: #000000; border-top-width: 0px; border-top-style: solid; border-top-color: #000000; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: #000000;\">Non-compensatory</th>\n</tr>\n<tr class=\"gt_row_group_first\">\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory model\" style=\"background-color: #FFFFFF;\">DINA</td>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory description\" style=\"background-color: #FFFFFF;\">All attributes must be present</td>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YGRpbmEoKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">dina()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory model\" style=\"background-color: #FFFFFF;\">NIDA</td>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory description\" style=\"background-color: #FFFFFF;\">Attributes have multiplicative penalties equal across items</td>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YG5pZGEoKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">nida()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory model\" style=\"background-color: #FFFFFF;\">NC-RUM</td>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory description\" style=\"background-color: #FFFFFF;\">Attributes have multiplicative penalites that vary across items</td>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YG5jcnVtKClg\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">ncrum()</a></code></span></span></td>\n</tr>\n<tr class=\"gt_group_heading_row\">\n<th class=\"gt_group_heading\" colspan=\"3\" id=\"Compensatory\" scope=\"colgroup\" style=\"background-color: #023047; color: #FFFFFF; border-left-width: 0px; border-left-style: solid; border-left-color: #000000; border-right-width: 0px; border-right-style: solid; border-right-color: #000000; border-top-width: 0px; border-top-style: solid; border-top-color: #000000; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: #000000;\">Compensatory</th>\n</tr>\n<tr class=\"gt_row_group_first\">\n<td class=\"gt_row gt_left\" headers=\"Compensatory model\" style=\"background-color: #FFFFFF;\">DINO</td>\n<td class=\"gt_row gt_left\" headers=\"Compensatory description\" style=\"background-color: #FFFFFF;\">Any one attribute must be present</td>\n<td class=\"gt_row gt_left\" headers=\"Compensatory measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YGRpbm8oKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">dino()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"Compensatory model\" style=\"background-color: #FFFFFF;\">NIDO</td>\n<td class=\"gt_row gt_left\" headers=\"Compensatory description\" style=\"background-color: #FFFFFF;\">Attributes are additive and equal across items</td>\n<td class=\"gt_row gt_left\" headers=\"Compensatory measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YG5pZG8oKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">nido()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"Compensatory model\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">C-RUM</td>\n<td class=\"gt_row gt_left\" headers=\"Compensatory description\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">Attributes are additive and vary across items</td>\n<td class=\"gt_row gt_left\" headers=\"Compensatory measr\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\"><span data-qmd-base64=\"YGNydW0oKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">crum()</a></code></span></span></td>\n</tr>\n</tbody>\n</table>\n</div>\n</div>\n</div>\n</figure>\n</div>\n</div>\n</section><section class=\"level3\" id=\"structural-models\"><h3 class=\"anchored\" data-anchor-id=\"structural-models\">Structural models</h3>\n<p>measr provides functionality for five structural models. The structural model describes the joint distribution of attribute profiles in the population. Different structural models make different assumptions about how attributes relate to each other.</p>\n<p>The most general option is the unconstrained model <span class=\"citation\" data-cites=\"rupp-dcm\">(Rupp et al., 2010)</span>. This model places no constraints on the relationships between attributes. Each of the 2<sup><em>A</em></sup> possible attribute profiles (where <em>A</em> is the number of attributes) has its own freely estimated base rate parameter. Because all profiles are freely estimated, this is a saturated structural model.</p>\n<p>The independent model <span class=\"citation\" data-cites=\"independent\">(Lee, 2017)</span> assumes that attributes are completely unrelated. Proficiency on one attribute tells you nothing about proficiency on another. Under this model, each attribute has its own proficiency base rate, and the probability of any profile is simply the product of the individual attribute base rates (or their complements for non-proficiency).</p>\n<p>The loglinear model <span class=\"citation\" data-cites=\"loglinear\">(<span class=\"nocase\">Xu &amp; von Davier</span>, 2008)</span> uses a log-linear parameterization with main effects and interactions. When specifying a loglinear model, we can use the <code>max_interaction</code> argument to control the high-level interactions to include. When <code>max_interaction</code> is set to the number of attributes (the default), the loglinear model is equivalent to the unconstrained model. When <code>max_interaction = 1</code>, only main effects are included, which is equivalent to the independent model. Intermediate values allow you to model some degree of attribute dependence without fully saturating the structural model.</p>\n<p>The remaining two structural models incorporate attribute hierarchies. In these models, proficiency on some attributes may be a prerequisite for proficiency on others. The hierarchical DCM <span class=\"citation\" data-cites=\"hdcm\">(HDCM; Templin &amp; Bradshaw, 2014)</span> enforces strict attribute prerequisites. Attribute profiles that violate the specified hierarchy are excluded entirely from the model, meaning their base rates are fixed to zero. In contrast, the Bayesian network model <span class=\"citation\" data-cites=\"bayesnet\">(Hu &amp; Templin, 2020)</span> implements a softer version of the hierarchy. All attribute profiles remain possible, but profiles that are inconsistent with the hierarchy are estimated to be less likely. Both models require a <code>hierarchy</code> argument that defines the attribute relationships using dagitty-style syntax, such as <code>\"att1 -&gt; att2 -&gt; att3\"</code>. For more details on specifying attribute hierarchies, see the <a href=\"https://r-dcm.org/start/specify//../../start/hierarchies/\">Define Attribute Relationships</a> article.</p>\n<p>Each of these structural models can be estimated with measr by supplying the respective structural model function, as shown in Table\u00a02, to the <code>structural_model</code> argument of <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"cell quarto-float quarto-figure quarto-figure-center anchored\" data-layout-align=\"center\" id=\"tbl-strc-models\">\n<figure class=\"quarto-float quarto-float-tbl figure\"><figcaption class=\"quarto-float-caption-top quarto-float-caption quarto-float-tbl\" id=\"tbl-strc-models-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nTable\u00a02: Structural models supported by measr\n</figcaption><div aria-describedby=\"tbl-strc-models-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<div class=\"cell-output-display\">\n<div id=\"wdwlwaheej\" style=\"padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;\">\n<style>@import url(\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap\");\n#wdwlwaheej table {\n  font-family: 'Open Sans', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n#wdwlwaheej thead, #wdwlwaheej tbody, #wdwlwaheej tfoot, #wdwlwaheej tr, #wdwlwaheej td, #wdwlwaheej th {\n  border-style: none;\n}\n\n#wdwlwaheej p {\n  margin: 0;\n  padding: 0;\n}\n\n#wdwlwaheej .gt_table {\n  display: table;\n  border-collapse: collapse;\n  line-height: normal;\n  margin-left: auto;\n  margin-right: auto;\n  color: #333333;\n  font-size: 16px;\n  font-weight: normal;\n  font-style: normal;\n  background-color: #FFFFFF;\n  width: auto;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #A8A8A8;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 1px;\n  border-bottom-color: #A8A8A8;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_caption {\n  padding-top: 4px;\n  padding-bottom: 4px;\n}\n\n#wdwlwaheej .gt_title {\n  color: #333333;\n  font-size: 125%;\n  font-weight: initial;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-color: #FFFFFF;\n  border-bottom-width: 0;\n}\n\n#wdwlwaheej .gt_subtitle {\n  color: #333333;\n  font-size: 85%;\n  font-weight: initial;\n  padding-top: 3px;\n  padding-bottom: 5px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-color: #FFFFFF;\n  border-top-width: 0;\n}\n\n#wdwlwaheej .gt_heading {\n  background-color: #FFFFFF;\n  text-align: left;\n  border-bottom-color: #FFFFFF;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_bottom_border {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_col_headings {\n  border-top-style: solid;\n  border-top-width: 3px;\n  border-top-color: #FFFFFF;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_col_heading {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 6px;\n  padding-left: 5px;\n  padding-right: 5px;\n  overflow-x: hidden;\n}\n\n#wdwlwaheej .gt_column_spanner_outer {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  padding-top: 0;\n  padding-bottom: 0;\n  padding-left: 4px;\n  padding-right: 4px;\n}\n\n#wdwlwaheej .gt_column_spanner_outer:first-child {\n  padding-left: 0;\n}\n\n#wdwlwaheej .gt_column_spanner_outer:last-child {\n  padding-right: 0;\n}\n\n#wdwlwaheej .gt_column_spanner {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 5px;\n  overflow-x: hidden;\n  display: inline-block;\n  width: 100%;\n}\n\n#wdwlwaheej .gt_spanner_row {\n  border-bottom-style: hidden;\n}\n\n#wdwlwaheej .gt_group_heading {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  text-align: left;\n}\n\n#wdwlwaheej .gt_empty_group_heading {\n  padding: 0.5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: middle;\n}\n\n#wdwlwaheej .gt_from_md > :first-child {\n  margin-top: 0;\n}\n\n#wdwlwaheej .gt_from_md > :last-child {\n  margin-bottom: 0;\n}\n\n#wdwlwaheej .gt_row {\n  padding-top: 3px;\n  padding-bottom: 3px;\n  padding-left: 5px;\n  padding-right: 5px;\n  margin: 10px;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  overflow-x: hidden;\n}\n\n#wdwlwaheej .gt_stub {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#wdwlwaheej .gt_stub_row_group {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 100%;\n  font-weight: initial;\n  text-transform: inherit;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n  vertical-align: top;\n}\n\n#wdwlwaheej .gt_row_group_first td {\n  border-top-width: 2px;\n}\n\n#wdwlwaheej .gt_row_group_first th {\n  border-top-width: 2px;\n}\n\n#wdwlwaheej .gt_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#wdwlwaheej .gt_first_summary_row {\n  border-top-style: solid;\n  border-top-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_first_summary_row.thick {\n  border-top-width: 2px;\n}\n\n#wdwlwaheej .gt_last_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_grand_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#wdwlwaheej .gt_first_grand_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-style: double;\n  border-top-width: 6px;\n  border-top-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_last_grand_summary_row_top {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: double;\n  border-bottom-width: 6px;\n  border-bottom-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_striped {\n  background-color: rgba(128, 128, 128, 0.05);\n}\n\n#wdwlwaheej .gt_table_body {\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_footnotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_footnote {\n  margin: 0px;\n  font-size: 90%;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#wdwlwaheej .gt_sourcenotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 0px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 0px;\n  border-right-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_sourcenote {\n  font-size: 12px;\n  padding-top: 10px;\n  padding-bottom: 10px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#wdwlwaheej .gt_left {\n  text-align: left;\n}\n\n#wdwlwaheej .gt_center {\n  text-align: center;\n}\n\n#wdwlwaheej .gt_right {\n  text-align: right;\n  font-variant-numeric: tabular-nums;\n}\n\n#wdwlwaheej .gt_font_normal {\n  font-weight: normal;\n}\n\n#wdwlwaheej .gt_font_bold {\n  font-weight: bold;\n}\n\n#wdwlwaheej .gt_font_italic {\n  font-style: italic;\n}\n\n#wdwlwaheej .gt_super {\n  font-size: 65%;\n}\n\n#wdwlwaheej .gt_footnote_marks {\n  font-size: 75%;\n  vertical-align: 0.4em;\n  position: initial;\n}\n\n#wdwlwaheej .gt_asterisk {\n  font-size: 100%;\n  vertical-align: 0;\n}\n\n#wdwlwaheej .gt_indent_1 {\n  text-indent: 5px;\n}\n\n#wdwlwaheej .gt_indent_2 {\n  text-indent: 10px;\n}\n\n#wdwlwaheej .gt_indent_3 {\n  text-indent: 15px;\n}\n\n#wdwlwaheej .gt_indent_4 {\n  text-indent: 20px;\n}\n\n#wdwlwaheej .gt_indent_5 {\n  text-indent: 25px;\n}\n\n#wdwlwaheej .katex-display {\n  display: inline-flex !important;\n  margin-bottom: 0.75em !important;\n}\n\n#wdwlwaheej div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {\n  height: 0px !important;\n}\n</style>\n<table class=\"gt_table\" data-quarto-bootstrap=\"false\" data-quarto-disable-processing=\"false\" style=\"table-layout:fixed;width:0px;\">\n<colgroup>\n<col style=\"width:130px;\"/>\n<col style=\"width:475px;\"/>\n<col style=\"width:150px;\"/>\n</colgroup>\n<thead><tr class=\"gt_col_headings\">\n<th class=\"gt_col_heading gt_columns_bottom_border gt_left\" colspan=\"1\" id=\"model\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">model</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_left\" colspan=\"1\" id=\"description\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">description</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_left\" colspan=\"1\" id=\"measr\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">measr</th>\n</tr></thead>\n<tbody class=\"gt_table_body\">\n<tr>\n<td class=\"gt_row gt_left\" headers=\"model\" style=\"background-color: #FFFFFF;\">Unconstrained</td>\n<td class=\"gt_row gt_left\" headers=\"description\" style=\"background-color: #FFFFFF;\">General and flexible, subsumes other models</td>\n<td class=\"gt_row gt_left\" headers=\"measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YHVuY29uc3RyYWluZWQoKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"model\" style=\"background-color: #FFFFFF;\">Independent</td>\n<td class=\"gt_row gt_left\" headers=\"description\" style=\"background-color: #FFFFFF;\">Attributes are independent of each other</td>\n<td class=\"gt_row gt_left\" headers=\"measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YGluZGVwZW5kZW50KClg\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">independent()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"model\" style=\"background-color: #FFFFFF;\">Loglinear</td>\n<td class=\"gt_row gt_left\" headers=\"description\" style=\"background-color: #FFFFFF;\">Can be constrained to only include certain interaction levels</td>\n<td class=\"gt_row gt_left\" headers=\"measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YGxvZ2xpbmVhcigpYA==\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">loglinear()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"model\" style=\"background-color: #FFFFFF;\">HDCM</td>\n<td class=\"gt_row gt_left\" headers=\"description\" style=\"background-color: #FFFFFF;\">Hard constraints on profiles based on attribute dependencies</td>\n<td class=\"gt_row gt_left\" headers=\"measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YGhkY20oKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">hdcm()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"model\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">BayesNet</td>\n<td class=\"gt_row gt_left\" headers=\"description\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">Soft constraints on profiles based on attribute dependencies</td>\n<td class=\"gt_row gt_left\" headers=\"measr\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\"><span data-qmd-base64=\"YGJheWVzbmV0KClg\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">bayesnet()</a></code></span></span></td>\n</tr>\n</tbody>\n</table>\n</div>\n</div>\n</div>\n</figure>\n</div>\n</div>\n</section><section class=\"level3\" id=\"prior-distributions\"><h3 class=\"anchored\" data-anchor-id=\"prior-distributions\">Prior distributions</h3>\n<p>A final aspect of the DCM specification that we have not yet talked about is the definition of the model priors. Take another look at our specifciation object. We can see that there are prior distribution defined for each type of parameter in our model.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb5\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_spec</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; A loglinear cognitive diagnostic model (LCDM) measuring 3 attributes</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; with 57 items.</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attributes:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"lsm\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"del\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"fsm\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attribute structure:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   Unconstrained</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Prior distributions:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   intercept ~ normal(0, 2)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   maineffect ~ lognormal(0, 1)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   `Vc` ~ dirichlet(1, 1, 1)</span></span></code></pre></div></div>\n</div>\n<p>Every parameter in a DCM specification is assigned a prior distribution that encodes our beliefs about plausible parameter values before observing any data. measr provides sensible defaults, but you can also customize priors to reflect domain knowledge or to implement more informative constraints.</p>\n<p>To view the default priors for a given measurement and structural model combination, use <code><a href=\"https://dcmstan.r-dcm.org/reference/default_dcm_priors.html\">default_dcm_priors()</a></code>. In our example, we have specified an LCDM with an unconstrained structural model. Plugging those two components in, we see the same priors that we saw in our specification object.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb6\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/default_dcm_priors.html\">default_dcm_priors</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 4 \u00d7 3</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   type        coefficient prior                      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;       &lt;chr&gt;       &lt;chr&gt;                      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 intercept   &lt;NA&gt;        normal(0, 2)               </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 maineffect  &lt;NA&gt;        lognormal(0, 1)            </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 interaction &lt;NA&gt;        normal(0, 2)               </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 structural  Vc          dirichlet(rep_vector(1, C))</span></span></code></pre></div></div>\n</div>\n<p>However, different choices of measurement and structural models will result in different parameters being included, and therefore different prior distributions. For example, specifying a DINA measurement model with and independent structural model has a completely different set of parameters.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb7\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/default_dcm_priors.html\">default_dcm_priors</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">dina</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">independent</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 3 \u00d7 3</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   type       coefficient prior      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;      &lt;chr&gt;       &lt;chr&gt;      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 slip       &lt;NA&gt;        beta(5, 25)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 guess      &lt;NA&gt;        beta(5, 25)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 structural &lt;NA&gt;        beta(1, 1)</span></span></code></pre></div></div>\n</div>\n<p>You can see which parameter types and specific coefficients are available for your model using <code><a href=\"https://dcmstan.r-dcm.org/reference/get_parameters.html\">get_parameters()</a></code>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb8\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/get_parameters.html\">get_parameters</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_qmatrix</span>, identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 114 \u00d7 4</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    item   type       attributes coefficient</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;  &lt;chr&gt;      &lt;chr&gt;      &lt;chr&gt;      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 fsm_01 intercept  &lt;NA&gt;       l1_0       </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 fsm_01 maineffect fsm        l1_13      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 fsm_04 intercept  &lt;NA&gt;       l2_0       </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 fsm_04 maineffect fsm        l2_13      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 fsm_05 intercept  &lt;NA&gt;       l3_0       </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 fsm_05 maineffect fsm        l3_13      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 fsm_06 intercept  &lt;NA&gt;       l4_0       </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 fsm_06 maineffect fsm        l4_13      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 fsm_07 intercept  &lt;NA&gt;       l5_0       </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 fsm_07 maineffect fsm        l5_13      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 104 more rows</span></span></code></pre></div></div>\n</div>\n<p>To customize priors, use the <code><a href=\"https://dcmstan.r-dcm.org/reference/prior.html\">prior()</a></code> function. The <code>type</code> argument specifies which parameter type the prior applies to, and the optional <code>coefficient</code> argument can target a specific parameter within that type. Custom priors can be passed to <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code> via the <code>priors</code> argument. Any parameter types not covered by a custom prior will retain their default values.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb9\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">my_priors</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/prior.html\">prior</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">normal</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, type <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"intercept\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/prior.html\">prior</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">lognormal</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.5</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, type <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"maineffect\"</span>, coefficient <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"l1_13\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  priors <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">my_priors</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; A loglinear cognitive diagnostic model (LCDM) measuring 3 attributes</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; with 57 items.</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attributes:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"lsm\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"del\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"fsm\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attribute structure:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   Unconstrained</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Prior distributions:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   `l1_13` ~ lognormal(0, 0.5)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   intercept ~ normal(0, 1)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   maineffect ~ lognormal(0, 1)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   `Vc` ~ dirichlet(1, 1, 1)</span></span></code></pre></div></div>\n</div>\n</section></section><section class=\"level2\" id=\"estimate-a-model-specification\"><h2 class=\"anchored\" data-anchor-id=\"estimate-a-model-specification\">Estimate a model specification</h2>\n<p>Once we have a model specification, we can estimate it using <code><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate()</a></code>. This function takes a specification object (created by <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code>), along with the response data and the name of the column in the data that contains respondent identifiers.</p>\n<p>The <code>method</code> argument controls how the model is estimated. Options include <code>\"optim\"</code> for point estimation using Stan\u2019s optimizer, <code>\"mcmc\"</code> for full Markov chain Monte Carlo sampling, <code>\"variational\"</code> for variational inference, and <code>\"pathfinder\"</code> (available only when using the cmdstanr backend). Full MCMC provides the most complete picture of the posterior distribution, but takes the longest to run. The optimizer is the fastest option and is useful for quick analyses, but does not provide a full posterior distribution.</p>\n<p>The <code>backend</code> argument specifies which Stan interface to use for estimation: <code>\"rstan\"</code> or <code>\"cmdstanr\"</code> to use the <a href=\"https://mc-stan.org/rstan/\">rstan</a> or <a href=\"https://mc-stan.org/cmdstanr/\">cmdstanr</a> package, respetively. The <code>file</code> argument allows you to save the estimated model to disk so that it does not need to be re-estimated if you re-run the script. Any additional arguments are passed directly to the backend\u2019s estimation function (e.g., <code>chains</code>, <code>iter</code>, and <code>warmup</code> for MCMC estimation when using the <code>\"rstan\"</code> backend).</p>\n<p>For this example, we use the optimizer with rstan, which provides fast point estimates of the model parameters.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb10\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_lcdm</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  dcm_spec <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_spec</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"id\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"optim\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"rstan\"</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"roarpa-lcdm-uncst-rstn\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</div>\n<section class=\"level3\" id=\"respondent-proficiency-estimates\"><h3 class=\"anchored\" data-anchor-id=\"respondent-proficiency-estimates\">Respondent proficiency estimates</h3>\n<p>After estimating a model, we typically want to know which attributes each respondent has mastered. The <code><a href=\"https://measr.r-dcm.org/reference/score.html\">score()</a></code> function calculates respondent proficiency estimates from a fitted model. It returns a list with two elements: <code>class_probabilities</code>, which contains the probability that each respondent belongs to each possible attribute profile, and <code>attribute_probabilities</code>, which contains the marginal probability that each respondent is proficient on each individual attribute.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb11\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_scores</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/score.html\">score</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_lcdm</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_scores</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $class_probabilities</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 2,176 \u00d7 3</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    id    class   probability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt; &lt;chr&gt;         &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 161   [0,0,0]   2.59 e- 1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 161   [1,0,0]   2.25 e-10</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 161   [0,1,0]   7.41 e- 1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 161   [0,0,1]   1.10 e- 7</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 161   [1,1,0]   7.97 e- 9</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 161   [1,0,1]   1.29 e-15</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 161   [0,1,1]   2.35 e- 6</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 161   [1,1,1]   2.14 e-13</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 226   [0,0,0]   1.000e+ 0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 226   [1,0,0]   6.68 e-11</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 2,166 more rows</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $attribute_probabilities</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 816 \u00d7 3</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    id    attribute probability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt; &lt;chr&gt;           &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 161   lsm          8.20e- 9</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 161   del          7.41e- 1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 161   fsm          2.46e- 6</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 226   lsm          6.68e-11</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 226   del          5.08e-10</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 226   fsm          1.19e- 7</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 103   lsm          2.42e-13</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 103   del          3.79e- 6</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 103   fsm          2.62e-14</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 7     lsm          2.15e-15</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 806 more rows</span></span></code></pre></div></div>\n</div>\n<p>In practice, we often want to convert these probabilities into binary proficiency classifications. A common approach is to use a threshold of .5, classifying a respondent as proficient on an attribute if their estimated probability of proficiency exceeds .5. The choice of threshold matters and can be adjusted based on the intended use of the results.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb12\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyverse.tidyverse.org\">tidyverse</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_scores</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">attribute_probabilities</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>probability <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/integer.html\">as.integer</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">probability</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&gt;</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">.5</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/pivot_wider.html\">pivot_wider</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>names_from <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">attribute</span>, values_from <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">probability</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 272 \u00d7 4</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    id      lsm   del   fsm</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 161       0     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 226       0     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 103       0     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 7         0     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 185       1     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 129       0     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 181       1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 36        1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 206       1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 257       1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 262 more rows</span></span></code></pre></div></div>\n</div>\n</section></section><section class=\"level2\" id=\"wrapping-up\"><h2 class=\"anchored\" data-anchor-id=\"wrapping-up\">Wrapping up</h2>\n<p>We now have an estimate of proficiency for each respondent on each of the attribute measured by the ROAR-PA. However, before we report these result it\u2019s important to evaluate the quality of the model. We need to ensure that the model fits well and provides accurate classifications. That is the focus of the <a href=\"https://r-dcm.org/start/specify//../../start/evaluate/\">Evaluate Model Performance</a> article.</p>\n</section><div class=\"default\" id=\"quarto-appendix\"><section class=\"level2 appendix\" id=\"session-info\"><h2 class=\"anchored quarto-appendix-heading\">Session information</h2><div class=\"quarto-appendix-contents\">\n<div class=\"cell\" data-layout-align=\"center\">\n<pre><code>#&gt; \u2500 Session info \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  version      R version 4.5.2 (2025-10-31)\n#&gt;  language     (EN)\n#&gt;  date         2026-04-04\n#&gt;  pandoc       3.9\n#&gt;  quarto       1.9.24\n#&gt;  Stan (rstan) 2.37.0\n#&gt; \n#&gt; \u2500 Packages \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  package          version     date (UTC) source\n#&gt;  bridgesampling   1.2-1       2025-11-19 CRAN (R 4.5.2)\n#&gt;  dcmdata          0.2.0       2026-03-10 CRAN (R 4.5.2)\n#&gt;  dcmstan          0.1.0       2025-11-24 CRAN (R 4.5.2)\n#&gt;  dplyr            1.2.0       2026-02-03 CRAN (R 4.5.2)\n#&gt;  forcats          1.0.1       2025-09-25 CRAN (R 4.5.0)\n#&gt;  ggplot2          4.0.2       2026-02-03 CRAN (R 4.5.2)\n#&gt;  loo              2.9.0.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  lubridate        1.9.5       2026-02-04 CRAN (R 4.5.2)\n#&gt;  measr            2.0.0.9000  2026-03-21 Github (r-dcm/measr@475bc50)\n#&gt;  posterior        1.6.1.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  purrr            1.2.1       2026-01-09 CRAN (R 4.5.2)\n#&gt;  readr            2.2.0       2026-02-19 CRAN (R 4.5.2)\n#&gt;  rlang            1.1.7       2026-01-09 CRAN (R 4.5.2)\n#&gt;  rstan            2.36.0.9000 2025-09-26 https://stan-dev.r-universe.dev (R 4.5.1)\n#&gt;  stringr          1.6.0       2025-11-04 CRAN (R 4.5.0)\n#&gt;  tibble           3.3.1       2026-01-11 CRAN (R 4.5.2)\n#&gt;  tidyr            1.3.2       2025-12-19 CRAN (R 4.5.2)\n#&gt; \n#&gt; \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500</code></pre>\n</div>\n</div></section><section class=\"quarto-appendix-contents\" id=\"quarto-bibliography\"><h2 class=\"anchored quarto-appendix-heading\">References</h2><div class=\"references csl-bib-body hanging-indent\" data-entry-spacing=\"0\" data-line-spacing=\"2\" id=\"refs\">\n<div class=\"csl-entry\" id=\"ref-dina\">\n<span class=\"nocase\">de la Torre, J., &amp; Douglas, J. A.</span> (2004). Higher-order latent trait models for cognitive diagnosis. <em>Psychometrika</em>, <em>69</em>(3), 333\u2013353. <a href=\"https://doi.org/10.1007/BF02295640\">https://doi.org/10.1007/BF02295640</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-ncrum\">\nDiBello, L. V., Stout, W. F., &amp; Roussos, L. (1995). Unified cognitive psychometric assessment likelihood-based classification techniques. In P. D. Nichols, S. F. Chipman, &amp; R. L. Brennan (Eds.), <em>Cognitively diagnostic assessment</em> (pp. 361\u2013390). Erlbaum.\n</div>\n<div class=\"csl-entry\" id=\"ref-roarpa\">\nGijbels, L., Burkhardt, A., Ma, W. A., &amp; Yeatman, J. D. (2024). Rapid online assessment of reading and phonological awareness <span>(ROAR-PA)</span>. <em>Scientific Reports</em>, <em>14</em>, Article 10249. <a href=\"https://doi.org/10.1038/s41598-024-60834-9\">https://doi.org/10.1038/s41598-024-60834-9</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-crum\">\nHartz, S. M. (2002). <em>A <span>Bayesian</span> framework for the unified model for assessing cognitive abilities: <span>Blending</span> theory with practicality</em> (Publication No. 3044108). <span>[Doctoral thesis, University of Illinois at Urbana-Champaign]. ProQuest Dissertations and Theses Global</span>.\n</div>\n<div class=\"csl-entry\" id=\"ref-lcdm-handbook\">\nHenson, R. A., &amp; Templin, J. L. (2019). Loglinear cognitive diagnostic model (<span>LCDM</span>). In <span class=\"nocase\">M. von Davier &amp; Y.-S. Lee (Eds.)</span>, <em>Handbook of diagnostic classification models</em> (pp. 171\u2013185). Springer International Publishing. <a href=\"https://doi.org/10.1007/978-3-030-05584-4_8\">https://doi.org/10.1007/978-3-030-05584-4_8</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-lcdm\">\nHenson, R. A., Templin, J. L., &amp; Willse, J. T. (2009). Defining a family of cognitive diagnosis models using log-linear models with latent variables. <em>Psychometrika</em>, <em>74</em>(2), 191\u2013210. <a href=\"https://doi.org/10.1007/s11336-008-9089-5\">https://doi.org/10.1007/s11336-008-9089-5</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-bayesnet\">\nHu, B., &amp; Templin, J. (2020). Using diagnostic classification models to validate attribute hierarchies and evaluate model fit in <span>Bayesian</span> networks. <em>Multivariate Behavioral Research</em>, <em>55</em>(2), 300\u2013311. <a href=\"https://doi.org/10.1080/00273171.2019.1632165\">https://doi.org/10.1080/00273171.2019.1632165</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-nida\">\nJunker, B. W., &amp; Sijtsma, K. (2001). Cognitive assessment models with few assumptions, and connections with nonparametric item response theory. <em>Applied Psychological Measurement</em>, <em>25</em>(3), 258\u2013272. <a href=\"https://doi.org/10.1177/01466210122032064\">https://doi.org/10.1177/01466210122032064</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-independent\">\nLee, S. Y. (2017, June 27). <em>Cognitive diagnosis model: <span>DINA</span> model with independent attributes</em>. Stan. <a href=\"https://mc-stan.org/learn-stan/case-studies/dina_independent.html\">https://mc-stan.org/learn-stan/case-studies/dina_independent.html</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-rupp-dcm\">\nRupp, A. A., Templin, J., &amp; Henson, R. A. (2010). <em>Diagnostic measurement: <span>Theory</span>, methods, and applications</em>. <span>Guilford Press</span>.\n</div>\n<div class=\"csl-entry\" id=\"ref-nido\">\nTemplin, J. (2006). <em><span>CDM</span> user\u2019s guide</em> [Unpublished manuscript]. Department of Psychology, University of Kansas.\n</div>\n<div class=\"csl-entry\" id=\"ref-hdcm\">\nTemplin, J., &amp; Bradshaw, L. (2014). Hierarchical diagnostic classification models: <span>A</span> family of models for estimating and testing attribute hierarchies. <em>Psychometrika</em>, <em>79</em>(2), 317\u2013339. <a href=\"https://doi.org/10.1007/s11336-013-9362-0\">https://doi.org/10.1007/s11336-013-9362-0</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-dino\">\nTemplin, J., &amp; Henson, R. A. (2006). Measurement of psychological disorders using cognitive diagnosis models. <em>Psychological Methods</em>, <em>11</em>(3), 287\u2013305. <a href=\"https://doi.org/10.1037/1082-989X.11.3.287\">https://doi.org/10.1037/1082-989X.11.3.287</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-loglinear\">\n<span class=\"nocase\">Xu, X., &amp; von Davier, M.</span> (2008). <em>Fitting the structured general diagnostic model to <span>NAEP</span> data</em> (Nos. RR-08-27). Educational Testing Service. <a href=\"https://files.eric.ed.gov/fulltext/EJ1111272.pdf\">https://files.eric.ed.gov/fulltext/EJ1111272.pdf</a>\n</div>\n</div></section></div>","doi":"https://doi.org/10.59350/2667p-wrq64","funding_references":null,"guid":"https://r-dcm.org/start/specify/","id":"aea44852-cc0d-4946-b107-6a19c98f47a8","image":null,"indexed":true,"indexed_at":1775360510,"language":"en","parent_doi":null,"published_at":1775357296,"reference":[{"id":"https://doi.org/10.1007/BF02295640","unstructured":"\nde la Torre, J., & Douglas, J. A. (2004). Higher-order latent trait models for cognitive diagnosis. Psychometrika, 69(3), 333\u2013353. https://doi.org/10.1007/BF02295640\n"},{"unstructured":"\nDiBello, L. V., Stout, W. F., & Roussos, L. (1995). Unified cognitive psychometric assessment likelihood-based classification techniques. In P. D. Nichols, S. F. Chipman, & R. L. Brennan (Eds.), Cognitively diagnostic assessment (pp. 361\u2013390). Erlbaum.\n"},{"id":"https://doi.org/10.1038/s41598-024-60834-9","unstructured":"\nGijbels, L., Burkhardt, A., Ma, W. A., & Yeatman, J. D. (2024). Rapid online assessment of reading and phonological awareness (ROAR-PA). Scientific Reports, 14, Article 10249. https://doi.org/10.1038/s41598-024-60834-9\n"},{"unstructured":"\nHartz, S. M. (2002). A Bayesian framework for the unified model for assessing cognitive abilities: Blending theory with practicality (Publication No. 3044108). [Doctoral thesis, University of Illinois at Urbana-Champaign]. ProQuest Dissertations and Theses Global.\n"},{"id":"https://doi.org/10.1007/978-3-030-05584-4_8","unstructured":"\nHenson, R. A., & Templin, J. L. (2019). Loglinear cognitive diagnostic model (LCDM). In M. von Davier & Y.-S. Lee (Eds.), Handbook of diagnostic classification models (pp. 171\u2013185). Springer International Publishing. https://doi.org/10.1007/978-3-030-05584-4_8\n"},{"id":"https://doi.org/10.1007/s11336-008-9089-5","unstructured":"\nHenson, R. A., Templin, J. L., & Willse, J. T. (2009). Defining a family of cognitive diagnosis models using log-linear models with latent variables. Psychometrika, 74(2), 191\u2013210. https://doi.org/10.1007/s11336-008-9089-5\n"},{"id":"https://doi.org/10.1080/00273171.2019.1632165","unstructured":"\nHu, B., & Templin, J. (2020). Using diagnostic classification models to validate attribute hierarchies and evaluate model fit in Bayesian networks. Multivariate Behavioral Research, 55(2), 300\u2013311. https://doi.org/10.1080/00273171.2019.1632165\n"},{"id":"https://doi.org/10.1177/01466210122032064","unstructured":"\nJunker, B. W., & Sijtsma, K. (2001). Cognitive assessment models with few assumptions, and connections with nonparametric item response theory. Applied Psychological Measurement, 25(3), 258\u2013272. https://doi.org/10.1177/01466210122032064\n"},{"id":"https://mc-stan.org/learn-stan/case-studies/dina_independent.html","unstructured":"\nLee, S. Y. (2017, June 27). Cognitive diagnosis model: DINA model with independent attributes. Stan. https://mc-stan.org/learn-stan/case-studies/dina_independent.html\n"},{"unstructured":"\nRupp, A. A., Templin, J., & Henson, R. A. (2010). Diagnostic measurement: Theory, methods, and applications. Guilford Press.\n"},{"unstructured":"\nTemplin, J. (2006). CDM user\u2019s guide [Unpublished manuscript]. Department of Psychology, University of Kansas.\n"},{"id":"https://doi.org/10.1007/s11336-013-9362-0","unstructured":"\nTemplin, J., & Bradshaw, L. (2014). Hierarchical diagnostic classification models: A family of models for estimating and testing attribute hierarchies. Psychometrika, 79(2), 317\u2013339. https://doi.org/10.1007/s11336-013-9362-0\n"},{"id":"https://doi.org/10.1037/1082-989X.11.3.287","unstructured":"\nTemplin, J., & Henson, R. A. (2006). Measurement of psychological disorders using cognitive diagnosis models. Psychological Methods, 11(3), 287\u2013305. https://doi.org/10.1037/1082-989X.11.3.287\n"},{"id":"https://files.eric.ed.gov/fulltext/EJ1111272.pdf","unstructured":"\nXu, X., & von Davier, M. (2008). Fitting the structured general diagnostic model to NAEP data (Nos. RR-08-27). Educational Testing Service. https://files.eric.ed.gov/fulltext/EJ1111272.pdf\n"}],"registered_at":0,"relationships":[],"rid":"enneg-wn621","status":"active","summary":"Introduction   How do you specify and estimate a diagnostic classification model (DCM) using measr? In this article, we will walk you through the steps. We start with data for building the model, learn how to specify DCMs that make different assumptions about the data, and explore how to estimate the model with\n<em>\n Stan\n</em>\n.  To use code in this article, you will need to install the following packages: dcmdata, measr, and rstan.","tags":[],"title":"Specify a diagnostic model","updated_at":1775357296,"url":"https://r-dcm.org/start/specify/","version":"v1"}},{"document":{"abstract":null,"archive_url":null,"authors":[],"blog":{"archive_collection":null,"archive_host":null,"archive_prefix":null,"archive_timestamps":null,"authors":null,"canonical_url":null,"category":"socialScience","community_id":"6db161d5-9161-49cf-ab79-f33ad128ed24","created_at":1734126057,"current_feed_url":null,"description":"r-dcm blog","doi_as_guid":false,"favicon":null,"feed_format":"application/rss+xml","feed_url":"https://r-dcm.org/rss.xml","filter":null,"funding":null,"generator":"Quarto","generator_raw":"Quarto 1.6.39","home_page_url":"https://r-dcm.org","id":"5822f383-190a-4c32-9937-86ee8fc75254","indexed":true,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":0,"relative_url":null,"ror":null,"secure":true,"slug":"r_dcm","status":"active","subfield":"1803","subfield_validated":null,"title":"r-dcm blog","updated_at":1775375532.831312,"use_api":null,"use_mastodon":false,"user_id":"943e7faa-bd06-4044-80a5-9fef5df8ccdb"},"blog_name":"r-dcm blog","blog_slug":"r_dcm","content_html":"<section class=\"level2\" id=\"introduction\"><h2 class=\"anchored\" data-anchor-id=\"introduction\">Introduction</h2>\n<p>Each of the previous <a href=\"https://r-dcm.org/start/case-study//../../start/\">Get Started</a> articles has focused on introducing one component of analyzing data using diagnostic classification models (DCMs). In this article we\u2019ll combine everything we\u2019ve learned to explore a data set and answer substantive questions.</p>\n<p>To use code in this article, you will need to install the following packages: <a href=\"https://dcmdata.r-dcm.org\">dcmdata</a>, <a href=\"https://measr.r-dcm.org\">measr</a>, and <a href=\"https://mc-stan.org/rstan/\">rstan</a>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb1\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org\">measr</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for model estimation and evaluation</span></span>\n<span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># Helper packages</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmdata.r-dcm.org\">dcmdata</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for example data set</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/rstan/\">rstan</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for estimation backend</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level2\" id=\"pathways-for-instructionally-embedded-assessment-pie-data\"><h2 class=\"anchored\" data-anchor-id=\"pathways-for-instructionally-embedded-assessment-pie-data\">Pathways for Instructionally Embedded Assessment (PIE) data</h2>\n<p>We\u2019ll use data from the Pathways for Instructionally Embedded Assessment <span class=\"citation\" data-cites=\"pie-ft\">(PIE; Accessible Teaching, Learning, and Assessment Systems, 2025)</span> field test to explore attribute hierarchies. The PIE field test data is available in dcmdata, and contains responses to 15 items from 172 students.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb2\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_data</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 172 \u00d7 16</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    student `00592` `14415` `56400` `64967` `06238` `10231` `54596` `96748`</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;     &lt;int&gt;   &lt;int&gt;   &lt;int&gt;   &lt;int&gt;   &lt;int&gt;   &lt;int&gt;   &lt;int&gt;   &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 8978593       1       1       1       1       1       0       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 5231294       1       1       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 3681220       1       1       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 7763384       1       0       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 1913897       1       1       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 0692477       1       1       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 6961042       1       1       0       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 4241777       1       1       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 3068583       1       1       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 6607413       1       1       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 162 more rows</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 7 more variables: `97634` &lt;int&gt;, `13080` &lt;int&gt;, `27971` &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   `56741` &lt;int&gt;, `63088` &lt;int&gt;, `81175` &lt;int&gt;, `88063` &lt;int&gt;</span></span></code></pre></div></div>\n</div>\n<p>The corresponding Q-matrix maps each item three attributes. The three attributes represent successive levels along a Grade 5 mathematics learning pathway for repeating and numeric patterns <span class=\"citation\" data-cites=\"pie-pathways\">(Kim et al., 2024)</span>. Level 1 (L1) skills relate to recognizing the order of elements in a repeating pattern. Level 2 (L2) skills represent organizing two numeric patterns in a table. Level 3 (L3) skills are the ability to translate two numeric patterns into ordered pairs and represent the learning target for this pathway.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb3\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_qmatrix</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 15 \u00d7 4</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    task     L1    L2    L3</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 00592     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 14415     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 56400     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 64967     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 06238     0     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 10231     0     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 54596     0     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 96748     0     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 97634     0     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 13080     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 11 27971     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 12 56741     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 13 63088     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 14 81175     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 15 88063     0     0     1</span></span></code></pre></div></div>\n</div>\n<p>These skills develop in a natural order: you need to recognize pattern structure before you can organize patterns in a table, and organizing them in a table precedes translating them into coordinate pairs. This gives us a clear linear progression: <code>L1 -&gt; L2 -&gt; L3</code>. For more information on the data set, see <code><a href=\"https://dcmdata.r-dcm.org/reference/pie.html\">?pie</a></code> and <span class=\"citation\" data-cites=\"pie-ft\">Accessible Teaching, Learning, and Assessment Systems (2025)</span>.</p>\n<p>For a quick summary of the data, we can calculate the proportion of students that answered each question correctly (i.e., the item <em>p</em>-values).</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb4\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyverse.tidyverse.org\">tidyverse</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_data</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/summarise.html\">summarize</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/across.html\">across</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">-</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">student</span>, \\<span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">x</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/mean.html\">mean</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">x</span>, na.rm <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">TRUE</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/pivot_longer.html\">pivot_longer</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyselect.r-lib.org/reference/everything.html\">everything</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, names_to <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"task\"</span>, values_to <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pvalue\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 15 \u00d7 2</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    task  pvalue</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;  &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 00592  0.987</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 14415  0.948</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 56400  0.662</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 64967  0.948</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 06238  0.948</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 10231  0.948</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 54596  0.961</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 96748  0.857</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 97634  0.987</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 13080  0.364</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 11 27971  0.416</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 12 56741  0.403</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 13 63088  0.416</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 14 81175  0.242</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 15 88063  0.126</span></span></code></pre></div></div>\n</div>\n<p>We can then join the item <em>p</em>-values with the Q-matrix to get a sense of which attributes are the most difficult. Overall, most of the Level 1 and Level 2 items have relatively high <em>p</em>-values, with most items having a <em>p</em>-value greater than .8, whereas the Level 3 items appear more difficult, with all Level 3 <em>p</em>-values less than .5.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb5\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_data</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/summarise.html\">summarize</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/across.html\">across</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">-</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">student</span>, \\<span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">x</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/mean.html\">mean</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">x</span>, na.rm <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">TRUE</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/pivot_longer.html\">pivot_longer</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyselect.r-lib.org/reference/everything.html\">everything</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, names_to <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"task\"</span>, values_to <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pvalue\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate-joins.html\">left_join</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_qmatrix</span>, <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/join_by.html\">join_by</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">task</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/pivot_longer.html\">pivot_longer</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">L1</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">L2</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">L3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    names_to <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"attribute\"</span>,</span>\n<span>    values_to <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"measured\"</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/filter.html\">filter</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">measured</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">==</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/summarise.html\">summarize</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    measures <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/paste.html\">paste</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://stringr.tidyverse.org/reference/case.html\">str_to_title</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">attribute</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, collapse <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"/\\n\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    .by <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">task</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pvalue</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    measures <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/factor.html\">factor</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>      <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">measures</span>,</span>\n<span>      levels <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"L1\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"L2\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"L3\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>      labels <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Level 1\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Level 2\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Level 3\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>    <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pvalue</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">measures</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_point.html\">geom_point</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">measures</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    position <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/position_jitter.html\">position_jitter</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>height <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.2</span>, width <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, seed <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1213</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    size <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">4</span>,</span>\n<span>    show.legend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">FALSE</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/scale_manual.html\">scale_color_manual</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    values <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"#023047\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"#D7263D\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"#8ECAE6\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"#219EBC\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"#F3D3BD\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"#000000\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/expand_limits.html\">expand_limits</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/scale_continuous.html\">scale_x_continuous</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>breaks <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/seq.html\">seq</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/labs.html\">labs</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Item *p*-value\"</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Measured attributes\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"Scatter plot showing item p-values on the x-axis and attribute combinations from the Q-matrix on the y-axis.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-pvalue-plot\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-pvalue-plot-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"Scatter plot showing item p-values on the x-axis and attribute combinations from the Q-matrix on the y-axis.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/case-study/index_files/figure-html/fig-pvalue-plot-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-pvalue-plot-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a01: Item <em>p</em>-values by pathway level.\n</figcaption></figure>\n</div>\n</div>\n</div>\n</section><section class=\"level2\" id=\"model-estimation\"><h2 class=\"anchored\" data-anchor-id=\"model-estimation\">Model estimation</h2>\n<p>Now that we have a feel for our data, we will estimate a DCM. As we saw in <a href=\"https://r-dcm.org/start/case-study//../../start/specify/\">Specify a Diagnostic Model</a>, we can create a DCM specification with <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code>. We\u2019ll start by estimating a loglinear cognitive diagnostic model (LCDM) with an unconstrained structural model. The LCDM is a general diagnostic model that allows for different attribute relationships on items (e.g., compensatory, non-compensatory) and subsumes many other types of DCMs <span class=\"citation\" data-cites=\"lcdm lcdm-handbook\">(Henson et al., 2009; Henson &amp; Templin, 2019)</span>. The unconstrained structural model places no constraints on the attribute relationships. Our theory indicates that there is a linear progression among the attributes, but it\u2019s not a bad idea to start with fewer contrains and work our down to a simpler model.</p>\n<p>As in the <a href=\"https://r-dcm.org/start/case-study//../../start/evaluate/\">Evaluate Model Performance</a> article, we want to estimate the model using MCMC so that we have the full range of model fit methods available to us. We can customize how the MCMC process is executed with <a href=\"https://mc-stan.org/rstan/\">rstan</a>. For this example, we specified 4 chains, each with 2,000 warmup iterations and 500 retained iterations for 2,500 iterations total. This results in a total posterior distribution of 2,000 samples for each parameter (i.e., 500 iterations from each of the 4 chains).</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb6\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_spec</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"task\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_lcdm</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_spec</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"student\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"mcmc\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"rstan\"</span>,</span>\n<span>  chains <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">4</span>,</span>\n<span>  iter <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2500</span>,</span>\n<span>  warmup <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2000</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pie-lcdm-uncst-rstn\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</div>\n<p>Now that we\u2019ve estimated a model, let\u2019s examine the output. There are three types of information we\u2019ll examine: structural parameters, item parameters, and student proficiency.</p>\n<section class=\"level3\" id=\"structural-parameters\"><h3 class=\"anchored\" data-anchor-id=\"structural-parameters\">Structural parameters</h3>\n<p>The structural parameters define the base rate of membership in each of attribute profiles. Because the PIE data consists of 3 dichotomous attributes, there are a total of 2<sup>3</sup> = 8 possible profiles, or classes. We can view the possible profiles using <code><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract()</a></code>, which extracts different aspects of a model estimated with measr. The order of the attributes in the profiles corresponds to the order the attributes were listed in the Q-matrix used to estimate the model. This means that attributes 1, 2, and 3 correspond to morphosyntactic, cohesive, and lexical rules, respectively.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb7\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_classes</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_lcdm</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"classes\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_classes</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 8 \u00d7 4</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   class      L1    L2    L3</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;   &lt;int&gt; &lt;int&gt; &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 [0,0,0]     0     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 [1,0,0]     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 [0,1,0]     0     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 [0,0,1]     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 5 [1,1,0]     1     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 6 [1,0,1]     1     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 7 [0,1,1]     0     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 8 [1,1,1]     1     1     1</span></span></code></pre></div></div>\n</div>\n<p>We can also extract the estimated structural parameters themselves using <code><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract()</a></code>. For structural parameters, we see the <code>class</code>, or the attribute profile, and the estimated proportion of students in that class with a measure of error (the standard deviation of the posterior). For example, nearly 9% of students are estimated to not be proficient on any of the pathway levels (class 1), and 31% are estimated to proficient on just pathway levels 1 and 2 (class 5).</p>\n<p>Also note that some classes</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb8\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">structural_parameters</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_lcdm</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"strc_param\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">structural_parameters</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 8 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   class      L1    L2    L3       estimate</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;   &lt;int&gt; &lt;int&gt; &lt;int&gt;     &lt;rvar[1d]&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 [0,0,0]     0     0     0  0.089 \u00b1 0.066</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 [1,0,0]     1     0     0  0.095 \u00b1 0.082</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 [0,1,0]     0     1     0  0.133 \u00b1 0.107</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 [0,0,1]     0     0     1  0.051 \u00b1 0.047</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 5 [1,1,0]     1     1     0  0.314 \u00b1 0.134</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 6 [1,0,1]     1     0     1  0.130 \u00b1 0.078</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 7 [0,1,1]     0     1     1  0.070 \u00b1 0.058</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 8 [1,1,1]     1     1     1  0.118 \u00b1 0.078</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level3\" id=\"item-parameters\"><h3 class=\"anchored\" data-anchor-id=\"item-parameters\">Item parameters</h3>\n<p>The item parameters define the log-odds of a student in each class providing a correct response. We can again extract our estimated item parameters using <code><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract()</a></code>. Here, the <code>estimate</code> column reports estimated value for each parameter and a measure of the associated error (i.e., the standard deviation of the posterior distribution). For example, task 00592 has two parameters, as it measures two attributes:</p>\n<ol type=\"1\">\n<li>An intercept, which represents the log-odds of providing a correct response for a student who is not proficient on the attribute this item measures (i.e., Level 1).</li>\n<li>A main effect for Level 1 skills, which represents the increase in the log-odds of providing a correct response for a student who is proficient on that attribute.</li>\n</ol>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb9\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">item_parameters</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_lcdm</span>, what <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item_param\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">item_parameters</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 30 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    task  type       attributes coefficient      estimate</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt; &lt;chr&gt;      &lt;chr&gt;      &lt;chr&gt;          &lt;rvar[1d]&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 00592 intercept  &lt;NA&gt;       l1_0          3.07 \u00b1 0.98</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 00592 maineffect L1         l1_11         2.78 \u00b1 2.94</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 14415 intercept  &lt;NA&gt;       l2_0          1.80 \u00b1 0.91</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 14415 maineffect L1         l2_11         3.03 \u00b1 2.92</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 56400 intercept  &lt;NA&gt;       l3_0         -0.36 \u00b1 0.87</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 56400 maineffect L1         l3_11         1.89 \u00b1 1.77</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 64967 intercept  &lt;NA&gt;       l4_0          1.94 \u00b1 0.79</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 64967 maineffect L1         l4_11         2.49 \u00b1 2.53</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 06238 intercept  &lt;NA&gt;       l5_0          2.25 \u00b1 0.70</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 06238 maineffect L2         l5_12         1.55 \u00b1 1.92</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 20 more rows</span></span></code></pre></div></div>\n</div>\n</section></section><section class=\"level2\" id=\"model-evaluation\"><h2 class=\"anchored\" data-anchor-id=\"model-evaluation\">Model evaluation</h2>\n<p>A fully Bayesian estimation allows us to evaluate model fit using posterior predictive model checks (PPMCs). Specifically, measr supports a PPMC of the overall raw score distribution as described by <span class=\"citation\" data-cites=\"park2015\">Park et al. (2015)</span> and <span class=\"citation\" data-cites=\"thompson-bayes\">Thompson (2019)</span>. For each of the replicated data sets, we calculate the number of students with each raw score (i.e., the number of correct responses). This can be done using <code><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc()</a></code>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb10\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_lcdm</span>, model_fit <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"raw_score\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $ppmc_raw_score</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 1 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   obs_chisq ppmc_mean `2.5%` `97.5%`    ppp</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;       &lt;dbl&gt;     &lt;dbl&gt;  &lt;dbl&gt;   &lt;dbl&gt;  &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1      36.9      17.1   4.80    41.9 0.0455</span></span></code></pre></div></div>\n</div>\n<p>In the output, the posterior predictive <em>p</em>-value (<em>ppp</em>) is small (&lt;.05), indicating poor fit. To unpack what this really means, let\u2019s visualize the PPMC. In the following figure, the blue bars show the credible intervals for the number of students we would expect to see at each raw score point, given our estimated model parameters. The red dots and line indicate the number of students that were observed at each raw score point in our observed data (<code>pie_ft_data</code>). For example, the model expects there to be between about 0 and 20 students with a total score of 7. In the observed data, there were 2 students with a total score of 7. In general, the model does a fairly good job of capturing the observed data. However, there are several places where the observed values fall close to the edge of the expected distribution. So even though the model doesn\u2019t miss anywhere by a lot, the accumulation of small misses leads to poor fit.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb11\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/\">ggdist</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_scores</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_data</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/pivot_longer.html\">pivot_longer</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>cols <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">-</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"student\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/summarise.html\">summarize</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>raw_score <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/sum.html\">sum</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">value</span>, na.rm <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">TRUE</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, .by <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">student</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/count.html\">count</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/complete.html\">complete</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>raw_score <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">:</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">15</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/list.html\">list</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>n <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0L</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span></span>\n<span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_lcdm</span>, model_fit <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"raw_score\"</span>, return_draws <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2000</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://purrr.tidyverse.org/reference/pluck.html\">pluck</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"ppmc_raw_score\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/select.html\">select</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">rawscore_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/unnest.html\">unnest</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">rawscore_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/unnest.html\">unnest</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_scores</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/reference/stat_interval.html\">stat_interval</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">n</span>, color_ramp <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes_eval.html\">after_stat</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">level</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    point_interval <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"mean_qi\"</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    linewidth <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">5</span>,</span>\n<span>    show.legend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">FALSE</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_path.html\">geom_line</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_scores</span>,</span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">n</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_point.html\">geom_point</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_scores</span>,</span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">n</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Observed Data\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    shape <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">21</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    size <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/reference/scale_colour_ramp.html\">scale_color_ramp_discrete</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    from <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"white\"</span>,</span>\n<span>    range <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.2</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    breaks <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.5</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.8</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.95</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    labels <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">~</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/sprintf.html\">sprintf</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"%0.2f\"</span>, <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/numeric.html\">as.numeric</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">.x</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/scale_manual.html\">scale_fill_manual</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>values <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/scale_continuous.html\">scale_x_continuous</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>breaks <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/seq.html\">seq</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">15</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, expand <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">scale_y_comma</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/labs.html\">labs</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Raw score\"</span>,</span>\n<span>    y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Students\"</span>,</span>\n<span>    color_ramp <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Credible Interval\"</span>,</span>\n<span>    fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">NULL</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/guides.html\">guides</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/guide_legend.html\">guide_legend</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>override.aes <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/list.html\">list</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>size <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"Line plot showing the observed number of students at each raw score point, superimposed over an interval showing the expected number of students at each score point according to the estimated model.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-rawscore-dist\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-rawscore-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"Line plot showing the observed number of students at each raw score point, superimposed over an interval showing the expected number of students at each score point according to the estimated model.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/case-study/index_files/figure-html/fig-rawscore-dist-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-rawscore-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a02: Posterior predictive check for the raw score distribution.\n</figcaption></figure>\n</div>\n</div>\n</div>\n<p>In summary, the raw score PPMC indicates poor fit of our estimated LCDM to the observed data. This is not unexpected, given that some classes are very small. Recall from our discussion of the estimated structural parameters that there are three classes that combine to include less than 4% of all students. When classes are this small, parameter estimates can be unstable, leading to poor model fit <span class=\"citation\" data-cites=\"hdcm wang2021\">(e.g., Templin &amp; Bradshaw, 2014; Wang &amp; Lu, 2021)</span>.</p>\n</section><section class=\"level2\" id=\"adding-attribute-structure\"><h2 class=\"anchored\" data-anchor-id=\"adding-attribute-structure\">Adding attribute structure</h2>\n<p>Model fit can often occur if there are small classes, causing parameter estimates to be unstable <span class=\"citation\" data-cites=\"hdcm wang2021\">(e.g., Templin &amp; Bradshaw, 2014; Wang &amp; Lu, 2021)</span>. In our LCDM model, there are class that have small base rate estimates, and which are also inconsistent with the ordering of the levels in the learning pathway. For example, classes [0,0,1] and [0,1,1] have relatively low base rates and represent profiles where students are proficient on Levels 2 and/or 3 without first demonstrating proficiency of Level 1.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb12\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">structural_parameters</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 8 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   class      L1    L2    L3       estimate</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;   &lt;int&gt; &lt;int&gt; &lt;int&gt;     &lt;rvar[1d]&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 [0,0,0]     0     0     0  0.089 \u00b1 0.066</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 [1,0,0]     1     0     0  0.095 \u00b1 0.082</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 [0,1,0]     0     1     0  0.133 \u00b1 0.107</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 [0,0,1]     0     0     1  0.051 \u00b1 0.047</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 5 [1,1,0]     1     1     0  0.314 \u00b1 0.134</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 6 [1,0,1]     1     0     1  0.130 \u00b1 0.078</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 7 [0,1,1]     0     1     1  0.070 \u00b1 0.058</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 8 [1,1,1]     1     1     1  0.118 \u00b1 0.078</span></span></code></pre></div></div>\n</div>\n<p>We can estimate a new model that encodes our proposed hierarchy. Specifically, we\u2019ll estimate a model that uses a Bayesian Network for the structural model. As we discussed in the <a href=\"https://r-dcm.org/start/case-study//../../start/hierarchies/\">Define Attribute Relationships</a> article, the BayesNet puts soft constraints on the possible profiles. All profiles are still allowed, but students are pushed toward the profiles that are consistent with our proposed linear hierarchy of the pathway levels.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb13\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">bayesnet_spec</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"task\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">bayesnet</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"L1 -&gt; L2 -&gt; L3\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_bayesnet</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">bayesnet_spec</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"student\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"mcmc\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"rstan\"</span>,</span>\n<span>  chains <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">4</span>,</span>\n<span>  iter <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2500</span>,</span>\n<span>  warmup <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2000</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pie-lcdm-bayesnet-rstn\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</div>\n<p>Figure\u00a03 shows the estimated base rates of each profile under the original unconstrained and BayesNet model. As expected, we see fewer students in the unexpected profiles (e.g., [0,1,0], [0,0,1]) and more students in profiles [1,1,0] and [1,1,1].</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb14\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/bind_rows.html\">bind_rows</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">structural_parameters</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>estimate <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/posterior/reference/rvar-summaries-over-draws.html\">E</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">estimate</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Unconstrained\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/select.html\">select</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">model</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">estimate</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_bayesnet</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"strc_param\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>estimate <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/posterior/reference/rvar-summaries-over-draws.html\">E</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">estimate</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"BayesNet\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/select.html\">select</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">model</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">estimate</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>class <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://forcats.tidyverse.org/reference/fct_inorder.html\">fct_inorder</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">estimate</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_bar.html\">geom_col</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">model</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, position <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/position_dodge.html\">position_dodge</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, width <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.5</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">scale_fill_okabeito</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>limits <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Unconstrained\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"BayesNet\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/labs.html\">labs</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Base rate\"</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Profile\"</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">NULL</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"Bar chart showing class base rats on the x-axis and profiles on the y-axis.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-strc-compare\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-strc-compare-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"Bar chart showing class base rats on the x-axis and profiles on the y-axis.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/case-study/index_files/figure-html/fig-strc-compare-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-strc-compare-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a03: Base rates for the unconstrained and BayesNet structural models.\n</figcaption></figure>\n</div>\n</div>\n</div>\n<section class=\"level3\" id=\"structure-evaluation\"><h3 class=\"anchored\" data-anchor-id=\"structure-evaluation\">Structure evaluation</h3>\n<p>Let\u2019s see how the new structural model has affected model fit. We\u2019ll once again check the raw score PPMC. With the BayesNet structural model, we see much better fit, with a <em>ppp</em> value of 0.232.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb15\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_bayesnet</span>, model_fit <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"raw_score\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $ppmc_raw_score</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 1 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   obs_chisq ppmc_mean `2.5%` `97.5%`   ppp</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;       &lt;dbl&gt;     &lt;dbl&gt;  &lt;dbl&gt;   &lt;dbl&gt; &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1      20.2      16.8   4.87    54.6 0.232</span></span></code></pre></div></div>\n</div>\n<p>We can also use model comparisons and leave-one-out cross validation (LOO) to evaluate the hierarchy imposed by the BayesNet. Here, we see that the BayesNet is the preferred model, although the difference between the models is negligible. This is what we would hope to see. Imposing the hierarchy has not hurt model fit, and the fewer parameters of the BayesNet makes it preferred.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb16\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/loo/reference/loo_compare.html\">loo_compare</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_lcdm</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_bayesnet</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;              elpd_diff se_diff</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; pie_bayesnet  0.0       0.0   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; pie_lcdm     -1.7       1.4</span></span></code></pre></div></div>\n</div>\n<p>Finally, we can also examine classification reliability for the BayesNet model. Under the BayesNet hierarchy, all three pathway levels have high levels of both classification accuracy and consistency, indicating that we can have confidence in the classifications made by the model.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb17\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_bayesnet</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"classification_reliability\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 3 \u00d7 3</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   attribute accuracy consistency</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;        &lt;dbl&gt;       &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 L1           0.868       0.971</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 L2           0.906       0.981</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 L3           0.924       0.864</span></span></code></pre></div></div>\n</div>\n</section></section><section class=\"level2\" id=\"wrapping-up\"><h2 class=\"anchored\" data-anchor-id=\"wrapping-up\">Wrapping up</h2>\n<p>In this case study, we estimated an LCDM to analyze the PIE field test data. From the model evalution, we saw that model fit indices indicated that the LCDM does not do a great job of representing the observed data. This was likely due to dependencies among the attributes that were ignored by the unconstrained structural model. To address this issue, we fit another model where the stuctural model was parameterized as a Bayesian Network with a defined linear hierarchy of the pathway levels. The model with the BayesNet structural model showed improved absolute model fit, was the preferred model by the LOO, and demonstrated high levels of classification accuracy and consistency. Thus, we have strong technical evidence that this model would be sufficient for reporting student proficiency on the measured attributes.</p>\n</section><div class=\"default\" id=\"quarto-appendix\"><section class=\"level2 appendix\" id=\"session-info\"><h2 class=\"anchored quarto-appendix-heading\">Session information</h2><div class=\"quarto-appendix-contents\">\n<div class=\"cell\" data-layout-align=\"center\">\n<pre><code>#&gt; \u2500 Session info \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  version      R version 4.5.2 (2025-10-31)\n#&gt;  language     (EN)\n#&gt;  date         2026-04-04\n#&gt;  pandoc       3.9\n#&gt;  quarto       1.9.24\n#&gt;  Stan (rstan) 2.37.0\n#&gt; \n#&gt; \u2500 Packages \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  package          version     date (UTC) source\n#&gt;  bridgesampling   1.2-1       2025-11-19 CRAN (R 4.5.2)\n#&gt;  dcmdata          0.2.0       2026-03-10 CRAN (R 4.5.2)\n#&gt;  dcmstan          0.1.0       2025-11-24 CRAN (R 4.5.2)\n#&gt;  dplyr            1.2.0       2026-02-03 CRAN (R 4.5.2)\n#&gt;  forcats          1.0.1       2025-09-25 CRAN (R 4.5.0)\n#&gt;  ggplot2          4.0.2       2026-02-03 CRAN (R 4.5.2)\n#&gt;  loo              2.9.0.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  lubridate        1.9.5       2026-02-04 CRAN (R 4.5.2)\n#&gt;  measr            2.0.0.9000  2026-03-21 Github (r-dcm/measr@475bc50)\n#&gt;  posterior        1.6.1.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  purrr            1.2.1       2026-01-09 CRAN (R 4.5.2)\n#&gt;  readr            2.2.0       2026-02-19 CRAN (R 4.5.2)\n#&gt;  rlang            1.1.7       2026-01-09 CRAN (R 4.5.2)\n#&gt;  rstan            2.36.0.9000 2025-09-26 https://stan-dev.r-universe.dev (R 4.5.1)\n#&gt;  stringr          1.6.0       2025-11-04 CRAN (R 4.5.0)\n#&gt;  tibble           3.3.1       2026-01-11 CRAN (R 4.5.2)\n#&gt;  tidyr            1.3.2       2025-12-19 CRAN (R 4.5.2)\n#&gt; \n#&gt; \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500</code></pre>\n</div>\n</div></section><section class=\"quarto-appendix-contents\" id=\"quarto-bibliography\"><h2 class=\"anchored quarto-appendix-heading\">References</h2><div class=\"references csl-bib-body hanging-indent\" data-entry-spacing=\"0\" data-line-spacing=\"2\" id=\"refs\">\n<div class=\"csl-entry\" id=\"ref-pie-ft\">\nAccessible Teaching, Learning, and Assessment Systems. (2025). <em>PIE assessment design and development</em>. University of Kansas. <a href=\"https://pie.atlas4learning.org/sites/default/files/documents/resources/PIE_Assessment_Design_Development_Technical_Report.pdf\">https://pie.atlas4learning.org/sites/default/files/documents/resources/PIE_Assessment_Design_Development_Technical_Report.pdf</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-lcdm-handbook\">\nHenson, R. A., &amp; Templin, J. L. (2019). Loglinear cognitive diagnostic model (<span>LCDM</span>). In <span class=\"nocase\">M. von Davier &amp; Y.-S. Lee (Eds.)</span>, <em>Handbook of diagnostic classification models</em> (pp. 171\u2013185). Springer International Publishing. <a href=\"https://doi.org/10.1007/978-3-030-05584-4_8\">https://doi.org/10.1007/978-3-030-05584-4_8</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-lcdm\">\nHenson, R. A., Templin, J. L., &amp; Willse, J. T. (2009). Defining a family of cognitive diagnosis models using log-linear models with latent variables. <em>Psychometrika</em>, <em>74</em>(2), 191\u2013210. <a href=\"https://doi.org/10.1007/s11336-008-9089-5\">https://doi.org/10.1007/s11336-008-9089-5</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-pie-pathways\">\nKim, E. M., Nash, B., &amp; Swinburne Romine, R. (2024). <em>Pathways for instructionally embedded assessment (<span>PIE</span>): <span>Developing</span> learning pathways for the <span>PIE</span> assessment system</em>. University of Kansas; Accessible Teaching, Learning,; Assessment Systems. <a href=\"https://pie.atlas4learning.org/sites/default/files/documents/resources/Developing_Learning_Pathways_for_the_PIE_Assessment_System.pdf\">https://pie.atlas4learning.org/sites/default/files/documents/resources/Developing_Learning_Pathways_for_the_PIE_Assessment_System.pdf</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-park2015\">\nPark, J. Y., Johnson, M. S., &amp; Lee, Y.-S. (2015). Posterior predictive model checks for cognitive diagnostic models. <em>International Journal of Quantitative Research in Education</em>, <em>2</em>(3\u20134), 244\u2013264. <a href=\"https://doi.org/10.1504/IJQRE.2015.071738\">https://doi.org/10.1504/IJQRE.2015.071738</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-hdcm\">\nTemplin, J., &amp; Bradshaw, L. (2014). Hierarchical diagnostic classification models: <span>A</span> family of models for estimating and testing attribute hierarchies. <em>Psychometrika</em>, <em>79</em>(2), 317\u2013339. <a href=\"https://doi.org/10.1007/s11336-013-9362-0\">https://doi.org/10.1007/s11336-013-9362-0</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-thompson-bayes\">\nThompson, W. J. (2019). <em>Bayesian psychometrics for diagnostic assessments: <span>A</span> proof of concept</em> (Research Report Nos. No. 19-01). <span>University of Kansas; Accessible Teaching, Learning, and Assessment Systems</span>. <a href=\"https://doi.org/10.35542/osf.io/jzqs8\">https://doi.org/10.35542/osf.io/jzqs8</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-wang2021\">\nWang, C., &amp; Lu, J. (2021). Learning attribute hierarchies from data: Two exploratory approaches. <em>Journal of Educational and Behavioral Statistics</em>, <em>46</em>(1), 58\u201384. <a href=\"https://doi.org/10.3102/1076998620931094\">https://doi.org/10.3102/1076998620931094</a>\n</div>\n</div></section></div>","doi":"https://doi.org/10.59350/c2f8e-18m08","funding_references":null,"guid":"https://r-dcm.org/start/case-study/","id":"c94fe4f4-f8fe-49c1-8795-5d8ca0cee408","image":"https://r-dcm.org/start/case-study/index_files/figure-html/fig-pvalue-plot-1.png","indexed":true,"indexed_at":1775360512,"language":"en","parent_doi":null,"published_at":1775357296,"reference":[{"id":"https://pie.atlas4learning.org/sites/default/files/documents/resources/PIE_Assessment_Design_Development_Technical_Report.pdf","unstructured":"\nAccessible Teaching, Learning, and Assessment Systems. (2025). PIE assessment design and development. University of Kansas. https://pie.atlas4learning.org/sites/default/files/documents/resources/PIE_Assessment_Design_Development_Technical_Report.pdf\n"},{"id":"https://doi.org/10.1007/978-3-030-05584-4_8","unstructured":"\nHenson, R. A., & Templin, J. L. (2019). Loglinear cognitive diagnostic model (LCDM). In M. von Davier & Y.-S. Lee (Eds.), Handbook of diagnostic classification models (pp. 171\u2013185). Springer International Publishing. https://doi.org/10.1007/978-3-030-05584-4_8\n"},{"id":"https://doi.org/10.1007/s11336-008-9089-5","unstructured":"\nHenson, R. A., Templin, J. L., & Willse, J. T. (2009). Defining a family of cognitive diagnosis models using log-linear models with latent variables. Psychometrika, 74(2), 191\u2013210. https://doi.org/10.1007/s11336-008-9089-5\n"},{"id":"https://pie.atlas4learning.org/sites/default/files/documents/resources/Developing_Learning_Pathways_for_the_PIE_Assessment_System.pdf","unstructured":"\nKim, E. M., Nash, B., & Swinburne Romine, R. (2024). Pathways for instructionally embedded assessment (PIE): Developing learning pathways for the PIE assessment system. University of Kansas; Accessible Teaching, Learning,; Assessment Systems. https://pie.atlas4learning.org/sites/default/files/documents/resources/Developing_Learning_Pathways_for_the_PIE_Assessment_System.pdf\n"},{"id":"https://doi.org/10.1504/IJQRE.2015.071738","unstructured":"\nPark, J. Y., Johnson, M. S., & Lee, Y.-S. (2015). Posterior predictive model checks for cognitive diagnostic models. International Journal of Quantitative Research in Education, 2(3\u20134), 244\u2013264. https://doi.org/10.1504/IJQRE.2015.071738\n"},{"id":"https://doi.org/10.1007/s11336-013-9362-0","unstructured":"\nTemplin, J., & Bradshaw, L. (2014). Hierarchical diagnostic classification models: A family of models for estimating and testing attribute hierarchies. Psychometrika, 79(2), 317\u2013339. https://doi.org/10.1007/s11336-013-9362-0\n"},{"id":"https://doi.org/10.35542/osf.io/jzqs8","unstructured":"\nThompson, W. J. (2019). Bayesian psychometrics for diagnostic assessments: A proof of concept (Research Report Nos. No. 19-01). University of Kansas; Accessible Teaching, Learning, and Assessment Systems. https://doi.org/10.35542/osf.io/jzqs8\n"},{"id":"https://doi.org/10.3102/1076998620931094","unstructured":"\nWang, C., & Lu, J. (2021). Learning attribute hierarchies from data: Two exploratory approaches. Journal of Educational and Behavioral Statistics, 46(1), 58\u201384. https://doi.org/10.3102/1076998620931094\n"}],"registered_at":0,"relationships":[],"rid":"sqkzc-wjq83","status":"active","summary":"Introduction   Each of the previous Get Started articles has focused on introducing one component of analyzing data using diagnostic classification models (DCMs). In this article we\u2019ll combine everything we\u2019ve learned to explore a data set and answer substantive questions. To use code in this article, you will need to install the following packages: dcmdata, measr, and rstan.","tags":[],"title":"A diagnostic assessment case study","updated_at":1775357296,"url":"https://r-dcm.org/start/case-study/","version":"v1"}},{"document":{"abstract":null,"archive_url":null,"authors":[],"blog":{"archive_collection":null,"archive_host":null,"archive_prefix":null,"archive_timestamps":null,"authors":null,"canonical_url":null,"category":"socialScience","community_id":"6db161d5-9161-49cf-ab79-f33ad128ed24","created_at":1734126057,"current_feed_url":null,"description":"r-dcm blog","doi_as_guid":false,"favicon":null,"feed_format":"application/rss+xml","feed_url":"https://r-dcm.org/rss.xml","filter":null,"funding":null,"generator":"Quarto","generator_raw":"Quarto 1.6.39","home_page_url":"https://r-dcm.org","id":"5822f383-190a-4c32-9937-86ee8fc75254","indexed":true,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":0,"relative_url":null,"ror":null,"secure":true,"slug":"r_dcm","status":"active","subfield":"1803","subfield_validated":null,"title":"r-dcm blog","updated_at":1775375532.831312,"use_api":null,"use_mastodon":false,"user_id":"943e7faa-bd06-4044-80a5-9fef5df8ccdb"},"blog_name":"r-dcm blog","blog_slug":"r_dcm","content_html":"<section class=\"level2\" id=\"introduction\"><h2 class=\"anchored\" data-anchor-id=\"introduction\">Introduction</h2>\n<p>We\u2019ve seen how to specify and estimate a model, and what it looks like when a model doesn\u2019t perform well. One of the most productive places to start when something seems off is the structural model. The structural model controls the assumptions your DCM makes about how attributes relate to each other. By default, the unconstrained model makes no assumptions at all and every possible attribute profile is freely estimated. That flexibility is a virtue when you have no prior theory about attribute relationships. However, if there are profiles that are rarely observed, attempting to estimate the base rates and item parameters associated with those profiles can result in issues with model fit <span class=\"citation\" data-cites=\"hdcm wang2021\">(Templin &amp; Bradshaw, 2014; Wang &amp; Lu, 2021)</span>. When the nature of the domain suggests that proficiency on one skill is required before another can develop, you can encode, and test, that theory directly in the model. In this article we\u2019ll learn how to do exactly that with attribute hierarchies.</p>\n<p>To use code in this article, you will need to install the following packages: <a href=\"https://mc-stan.org/cmdstanr/\">cmdstanr</a>, <a href=\"https://dcmdata.r-dcm.org\">dcmdata</a>, and <a href=\"https://measr.r-dcm.org\">measr</a>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb1\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org\">measr</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for model estimation and evaluation</span></span>\n<span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># Helper packages</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmdata.r-dcm.org\">dcmdata</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for example data set</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/cmdstanr/\">cmdstanr</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for estimation backend</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level2\" id=\"examination-for-the-certificate-of-proficiency-in-english-ecpe-data\"><h2 class=\"anchored\" data-anchor-id=\"examination-for-the-certificate-of-proficiency-in-english-ecpe-data\">Examination for the Certificate of Proficiency in English (ECPE) data</h2>\n<p>To demonstrate how to specify heirarhcies with measr, we\u2019ll use the ECPE data. The ECPE data has been widely used in the DCM research literature, and was the inspiration used by <span class=\"citation\" data-cites=\"hdcm\">Templin &amp; Bradshaw (2014)</span> for their development of the hierarchcial DCM. The ECPE data measures three attributes related to rules of the English language. In total, the data set contains responses to 28 items from 2,922 respondents.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb2\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_data</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 2,922 \u00d7 29</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    resp_id    E1    E2    E3    E4    E5    E6    E7    E8    E9   E10   E11</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;      &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1       1     1     1     1     0     1     1     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2       2     1     1     1     1     1     1     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3       3     1     1     1     1     1     1     0     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4       4     1     1     1     1     1     1     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5       5     1     1     1     1     1     1     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6       6     1     1     1     1     1     1     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7       7     1     1     1     1     1     1     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8       8     0     1     1     1     1     1     0     1     1     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9       9     1     1     1     1     1     1     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10      10     1     1     1     1     0     0     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 2,912 more rows</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 17 more variables: E12 &lt;int&gt;, E13 &lt;int&gt;, E14 &lt;int&gt;, E15 &lt;int&gt;, E16 &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   E17 &lt;int&gt;, E18 &lt;int&gt;, E19 &lt;int&gt;, E20 &lt;int&gt;, E21 &lt;int&gt;, E22 &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   E23 &lt;int&gt;, E24 &lt;int&gt;, E25 &lt;int&gt;, E26 &lt;int&gt;, E27 &lt;int&gt;, E28 &lt;int&gt;</span></span></code></pre></div></div>\n</div>\n<p>In addition to the response data, we also have a Q-matrix defining which items measure each of the 3 attributes. These attributes represent knowledge of differnt rules of the English language:</p>\n<ul>\n<li>Lexical: vocabulary (e.g., word choices, idioms)</li>\n<li>Cohesive: connection (e.g., pronouns, conjunctions, transitions)</li>\n<li>Morphosyntactic: grammar (e.g., prefixes and suffixes, tense, verb conjugations)</li>\n</ul>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb3\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_qmatrix</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 28 \u00d7 4</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    item_id morphosyntactic cohesive lexical</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;             &lt;int&gt;    &lt;int&gt;   &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 E1                    1        1       0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 E2                    0        1       0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 E3                    1        0       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 E4                    0        0       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 E5                    0        0       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 E6                    0        0       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 E7                    1        0       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 E8                    0        1       0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 E9                    0        0       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 E10                   1        0       0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 18 more rows</span></span></code></pre></div></div>\n</div>\n<p>For more information on the data, see <code><a href=\"https://dcmdata.r-dcm.org/reference/ecpe.html\">?ecpe</a></code>.</p>\n</section><section class=\"level2\" id=\"when-attributes-have-order\"><h2 class=\"anchored\" data-anchor-id=\"when-attributes-have-order\">When attributes have order</h2>\n<p>Without any hierarchy, the number of possible attribute profiles grows exponentially with the number of attributes. With three attributes, there are 2<sup>3</sup> = 8 possible profiles that represent every combination of proficiency and non-proficiency across the three attributes.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"cell quarto-float quarto-figure quarto-figure-center anchored\" data-layout-align=\"center\" id=\"tbl-unconstrained-profiles\">\n<figure class=\"quarto-float quarto-float-tbl figure\"><figcaption class=\"quarto-float-caption-top quarto-float-caption quarto-float-tbl\" id=\"tbl-unconstrained-profiles-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nTable\u00a01: All possible attribute profiles under an unconstrained structural model\n</figcaption><div aria-describedby=\"tbl-unconstrained-profiles-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<div class=\"cell-output-display\">\n<div id=\"rwiajevbsk\" style=\"padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;\">\n<style>@import url(\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap\");\n#rwiajevbsk table {\n  font-family: 'Open Sans', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n#rwiajevbsk thead, #rwiajevbsk tbody, #rwiajevbsk tfoot, #rwiajevbsk tr, #rwiajevbsk td, #rwiajevbsk th {\n  border-style: none;\n}\n\n#rwiajevbsk p {\n  margin: 0;\n  padding: 0;\n}\n\n#rwiajevbsk .gt_table {\n  display: table;\n  border-collapse: collapse;\n  line-height: normal;\n  margin-left: auto;\n  margin-right: auto;\n  color: #333333;\n  font-size: 16px;\n  font-weight: normal;\n  font-style: normal;\n  background-color: #FFFFFF;\n  width: auto;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #A8A8A8;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 1px;\n  border-bottom-color: #A8A8A8;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_caption {\n  padding-top: 4px;\n  padding-bottom: 4px;\n}\n\n#rwiajevbsk .gt_title {\n  color: #333333;\n  font-size: 125%;\n  font-weight: initial;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-color: #FFFFFF;\n  border-bottom-width: 0;\n}\n\n#rwiajevbsk .gt_subtitle {\n  color: #333333;\n  font-size: 85%;\n  font-weight: initial;\n  padding-top: 3px;\n  padding-bottom: 5px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-color: #FFFFFF;\n  border-top-width: 0;\n}\n\n#rwiajevbsk .gt_heading {\n  background-color: #FFFFFF;\n  text-align: left;\n  border-bottom-color: #FFFFFF;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_bottom_border {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_col_headings {\n  border-top-style: solid;\n  border-top-width: 3px;\n  border-top-color: #FFFFFF;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_col_heading {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 6px;\n  padding-left: 5px;\n  padding-right: 5px;\n  overflow-x: hidden;\n}\n\n#rwiajevbsk .gt_column_spanner_outer {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  padding-top: 0;\n  padding-bottom: 0;\n  padding-left: 4px;\n  padding-right: 4px;\n}\n\n#rwiajevbsk .gt_column_spanner_outer:first-child {\n  padding-left: 0;\n}\n\n#rwiajevbsk .gt_column_spanner_outer:last-child {\n  padding-right: 0;\n}\n\n#rwiajevbsk .gt_column_spanner {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 5px;\n  overflow-x: hidden;\n  display: inline-block;\n  width: 100%;\n}\n\n#rwiajevbsk .gt_spanner_row {\n  border-bottom-style: hidden;\n}\n\n#rwiajevbsk .gt_group_heading {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  text-align: left;\n}\n\n#rwiajevbsk .gt_empty_group_heading {\n  padding: 0.5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: middle;\n}\n\n#rwiajevbsk .gt_from_md > :first-child {\n  margin-top: 0;\n}\n\n#rwiajevbsk .gt_from_md > :last-child {\n  margin-bottom: 0;\n}\n\n#rwiajevbsk .gt_row {\n  padding-top: 3px;\n  padding-bottom: 3px;\n  padding-left: 5px;\n  padding-right: 5px;\n  margin: 10px;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  overflow-x: hidden;\n}\n\n#rwiajevbsk .gt_stub {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#rwiajevbsk .gt_stub_row_group {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 100%;\n  font-weight: initial;\n  text-transform: inherit;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n  vertical-align: top;\n}\n\n#rwiajevbsk .gt_row_group_first td {\n  border-top-width: 2px;\n}\n\n#rwiajevbsk .gt_row_group_first th {\n  border-top-width: 2px;\n}\n\n#rwiajevbsk .gt_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#rwiajevbsk .gt_first_summary_row {\n  border-top-style: solid;\n  border-top-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_first_summary_row.thick {\n  border-top-width: 2px;\n}\n\n#rwiajevbsk .gt_last_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_grand_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#rwiajevbsk .gt_first_grand_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-style: double;\n  border-top-width: 6px;\n  border-top-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_last_grand_summary_row_top {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: double;\n  border-bottom-width: 6px;\n  border-bottom-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_striped {\n  background-color: rgba(128, 128, 128, 0.05);\n}\n\n#rwiajevbsk .gt_table_body {\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_footnotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_footnote {\n  margin: 0px;\n  font-size: 90%;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#rwiajevbsk .gt_sourcenotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 0px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 0px;\n  border-right-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_sourcenote {\n  font-size: 12px;\n  padding-top: 10px;\n  padding-bottom: 10px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#rwiajevbsk .gt_left {\n  text-align: left;\n}\n\n#rwiajevbsk .gt_center {\n  text-align: center;\n}\n\n#rwiajevbsk .gt_right {\n  text-align: right;\n  font-variant-numeric: tabular-nums;\n}\n\n#rwiajevbsk .gt_font_normal {\n  font-weight: normal;\n}\n\n#rwiajevbsk .gt_font_bold {\n  font-weight: bold;\n}\n\n#rwiajevbsk .gt_font_italic {\n  font-style: italic;\n}\n\n#rwiajevbsk .gt_super {\n  font-size: 65%;\n}\n\n#rwiajevbsk .gt_footnote_marks {\n  font-size: 75%;\n  vertical-align: 0.4em;\n  position: initial;\n}\n\n#rwiajevbsk .gt_asterisk {\n  font-size: 100%;\n  vertical-align: 0;\n}\n\n#rwiajevbsk .gt_indent_1 {\n  text-indent: 5px;\n}\n\n#rwiajevbsk .gt_indent_2 {\n  text-indent: 10px;\n}\n\n#rwiajevbsk .gt_indent_3 {\n  text-indent: 15px;\n}\n\n#rwiajevbsk .gt_indent_4 {\n  text-indent: 20px;\n}\n\n#rwiajevbsk .gt_indent_5 {\n  text-indent: 25px;\n}\n\n#rwiajevbsk .katex-display {\n  display: inline-flex !important;\n  margin-bottom: 0.75em !important;\n}\n\n#rwiajevbsk div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {\n  height: 0px !important;\n}\n</style>\n<table class=\"gt_table\" data-quarto-bootstrap=\"false\" data-quarto-disable-processing=\"false\" style=\"table-layout:fixed;width:0px;\">\n<colgroup>\n<col style=\"width:115px;\"/>\n<col style=\"width:160px;\"/>\n<col style=\"width:100px;\"/>\n<col style=\"width:100px;\"/>\n</colgroup>\n<thead><tr class=\"gt_col_headings\">\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"profile\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Profile ID</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"morphosyntactic\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Morphosyntactic</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"cohesive\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Cohesive</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"lexical\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Lexical</th>\n</tr></thead>\n<tbody class=\"gt_table_body\">\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">0</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">2</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">0</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">3</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">0</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">4</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">1</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">5</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">0</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">6</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">1</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">7</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">1</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">8</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">1</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div>\n</div>\n</figure>\n</div>\n</div>\n<p>Some of these profiles may be theoretically impossible given what we know about the domain. Consider a respondent who is proficient on morphosyntactic but not lexical skills. Under the theory that lexical skills are foundational, this profile shouldn\u2019t exist. An individual cannot apply morphosyntactic skills without first being able to apply lexical skills.</p>\n<p>A hierarchy lets us encode this constraint. The hierarchy reduces the eight unconstrained profiles down to four valid ones: [0,0,0], [0,0,1], [0,1,1] and [1,1,1]. Each valid profile represents a step along a developmental ladder, and no one skips a rung.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"cell quarto-float quarto-figure quarto-figure-center anchored\" data-layout-align=\"center\" id=\"tbl-hdcm-profiles\">\n<figure class=\"quarto-float quarto-float-tbl figure\"><figcaption class=\"quarto-float-caption-top quarto-float-caption quarto-float-tbl\" id=\"tbl-hdcm-profiles-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nTable\u00a02: Valid attribute profiles under the hypothesized hierarchy\n</figcaption><div aria-describedby=\"tbl-hdcm-profiles-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<div class=\"cell-output-display\">\n<div id=\"uzfjusnfvk\" style=\"padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;\">\n<style>@import url(\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap\");\n#uzfjusnfvk table {\n  font-family: 'Open Sans', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n#uzfjusnfvk thead, #uzfjusnfvk tbody, #uzfjusnfvk tfoot, #uzfjusnfvk tr, #uzfjusnfvk td, #uzfjusnfvk th {\n  border-style: none;\n}\n\n#uzfjusnfvk p {\n  margin: 0;\n  padding: 0;\n}\n\n#uzfjusnfvk .gt_table {\n  display: table;\n  border-collapse: collapse;\n  line-height: normal;\n  margin-left: auto;\n  margin-right: auto;\n  color: #333333;\n  font-size: 16px;\n  font-weight: normal;\n  font-style: normal;\n  background-color: #FFFFFF;\n  width: auto;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #A8A8A8;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 1px;\n  border-bottom-color: #A8A8A8;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_caption {\n  padding-top: 4px;\n  padding-bottom: 4px;\n}\n\n#uzfjusnfvk .gt_title {\n  color: #333333;\n  font-size: 125%;\n  font-weight: initial;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-color: #FFFFFF;\n  border-bottom-width: 0;\n}\n\n#uzfjusnfvk .gt_subtitle {\n  color: #333333;\n  font-size: 85%;\n  font-weight: initial;\n  padding-top: 3px;\n  padding-bottom: 5px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-color: #FFFFFF;\n  border-top-width: 0;\n}\n\n#uzfjusnfvk .gt_heading {\n  background-color: #FFFFFF;\n  text-align: left;\n  border-bottom-color: #FFFFFF;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_bottom_border {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_col_headings {\n  border-top-style: solid;\n  border-top-width: 3px;\n  border-top-color: #FFFFFF;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_col_heading {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 6px;\n  padding-left: 5px;\n  padding-right: 5px;\n  overflow-x: hidden;\n}\n\n#uzfjusnfvk .gt_column_spanner_outer {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  padding-top: 0;\n  padding-bottom: 0;\n  padding-left: 4px;\n  padding-right: 4px;\n}\n\n#uzfjusnfvk .gt_column_spanner_outer:first-child {\n  padding-left: 0;\n}\n\n#uzfjusnfvk .gt_column_spanner_outer:last-child {\n  padding-right: 0;\n}\n\n#uzfjusnfvk .gt_column_spanner {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 5px;\n  overflow-x: hidden;\n  display: inline-block;\n  width: 100%;\n}\n\n#uzfjusnfvk .gt_spanner_row {\n  border-bottom-style: hidden;\n}\n\n#uzfjusnfvk .gt_group_heading {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  text-align: left;\n}\n\n#uzfjusnfvk .gt_empty_group_heading {\n  padding: 0.5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: middle;\n}\n\n#uzfjusnfvk .gt_from_md > :first-child {\n  margin-top: 0;\n}\n\n#uzfjusnfvk .gt_from_md > :last-child {\n  margin-bottom: 0;\n}\n\n#uzfjusnfvk .gt_row {\n  padding-top: 3px;\n  padding-bottom: 3px;\n  padding-left: 5px;\n  padding-right: 5px;\n  margin: 10px;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  overflow-x: hidden;\n}\n\n#uzfjusnfvk .gt_stub {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#uzfjusnfvk .gt_stub_row_group {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 100%;\n  font-weight: initial;\n  text-transform: inherit;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n  vertical-align: top;\n}\n\n#uzfjusnfvk .gt_row_group_first td {\n  border-top-width: 2px;\n}\n\n#uzfjusnfvk .gt_row_group_first th {\n  border-top-width: 2px;\n}\n\n#uzfjusnfvk .gt_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#uzfjusnfvk .gt_first_summary_row {\n  border-top-style: solid;\n  border-top-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_first_summary_row.thick {\n  border-top-width: 2px;\n}\n\n#uzfjusnfvk .gt_last_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_grand_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#uzfjusnfvk .gt_first_grand_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-style: double;\n  border-top-width: 6px;\n  border-top-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_last_grand_summary_row_top {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: double;\n  border-bottom-width: 6px;\n  border-bottom-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_striped {\n  background-color: rgba(128, 128, 128, 0.05);\n}\n\n#uzfjusnfvk .gt_table_body {\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_footnotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_footnote {\n  margin: 0px;\n  font-size: 90%;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#uzfjusnfvk .gt_sourcenotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 0px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 0px;\n  border-right-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_sourcenote {\n  font-size: 12px;\n  padding-top: 10px;\n  padding-bottom: 10px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#uzfjusnfvk .gt_left {\n  text-align: left;\n}\n\n#uzfjusnfvk .gt_center {\n  text-align: center;\n}\n\n#uzfjusnfvk .gt_right {\n  text-align: right;\n  font-variant-numeric: tabular-nums;\n}\n\n#uzfjusnfvk .gt_font_normal {\n  font-weight: normal;\n}\n\n#uzfjusnfvk .gt_font_bold {\n  font-weight: bold;\n}\n\n#uzfjusnfvk .gt_font_italic {\n  font-style: italic;\n}\n\n#uzfjusnfvk .gt_super {\n  font-size: 65%;\n}\n\n#uzfjusnfvk .gt_footnote_marks {\n  font-size: 75%;\n  vertical-align: 0.4em;\n  position: initial;\n}\n\n#uzfjusnfvk .gt_asterisk {\n  font-size: 100%;\n  vertical-align: 0;\n}\n\n#uzfjusnfvk .gt_indent_1 {\n  text-indent: 5px;\n}\n\n#uzfjusnfvk .gt_indent_2 {\n  text-indent: 10px;\n}\n\n#uzfjusnfvk .gt_indent_3 {\n  text-indent: 15px;\n}\n\n#uzfjusnfvk .gt_indent_4 {\n  text-indent: 20px;\n}\n\n#uzfjusnfvk .gt_indent_5 {\n  text-indent: 25px;\n}\n\n#uzfjusnfvk .katex-display {\n  display: inline-flex !important;\n  margin-bottom: 0.75em !important;\n}\n\n#uzfjusnfvk div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {\n  height: 0px !important;\n}\n</style>\n<table class=\"gt_table\" data-quarto-bootstrap=\"false\" data-quarto-disable-processing=\"false\" style=\"table-layout:fixed;width:0px;\">\n<colgroup>\n<col style=\"width:115px;\"/>\n<col style=\"width:160px;\"/>\n<col style=\"width:100px;\"/>\n<col style=\"width:100px;\"/>\n</colgroup>\n<thead><tr class=\"gt_col_headings\">\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"profile\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Profile ID</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"morphosyntactic\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Morphosyntactic</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"cohesive\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Cohesive</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"lexical\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Lexical</th>\n</tr></thead>\n<tbody class=\"gt_table_body\">\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">0</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">4</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">1</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">7</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">1</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">8</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">1</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div>\n</div>\n</figure>\n</div>\n</div>\n<p>We can visualize this structure as a directed acyclic graph (DAG), where an arrow from attribute A to attribute B means that proficiency on A is required before proficiency on B.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb4\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyverse.tidyverse.org\">tidyverse</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://www.dagitty.net\">dagitty</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://github.com/r-causal/ggdag\">ggdag</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; Attaching package: 'ggdag'</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; The following object is masked from 'package:stats':</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;     filter</span></span>\n<span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dag</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/pkg/dagitty/man/dagitty.html\">dagitty</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"dag { Lexical -&gt; Cohesive -&gt; Morphosyntactic }\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/pkg/dagitty/man/coordinates.html\">coordinates</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dag</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/list.html\">list</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>Lexical <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span>, Cohesive <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span>, Morphosyntactic <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>Lexical <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span>, Cohesive <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span>, Morphosyntactic <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://r-causal.github.io/ggdag/reference/tidy_dagitty.html\">tidy_dagitty</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dag</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/across.html\">across</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">name</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">to</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">~</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://stringr.tidyverse.org/reference/str_replace.html\">str_replace</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">.x</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Morphosyntactic\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Morpho-\\nsyntactic\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">x</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">y</span>, xend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">xend</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">-</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.06</span>, yend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">yend</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://r-causal.github.io/ggdag/reference/node_point.html\">geom_dag_node</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>, size <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">30</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://r-causal.github.io/ggdag/reference/geom_dag_text.html\">geom_dag_text</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>, size <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">4</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://r-causal.github.io/ggdag/reference/geom_dag_edges.html\">geom_dag_edges</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">x</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.06</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    edge_color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    edge_width <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span>,</span>\n<span>    arrow_directed <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">grid</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/grid/arrow.html\">arrow</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>length <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">grid</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/grid/unit.html\">unit</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">7</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pt\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, type <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"closed\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/scale_continuous.html\">scale_y_continuous</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>expand <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">FALSE</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggtheme.html\">theme_void</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/theme.html\">theme</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>plot.margin <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/element.html\">margin</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"A directed acyclic graph showing three nodes: L1, L2, and L3, connected left to right by arrows indicating the prerequisite ordering of the ECPE hierarchy.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-hierarchy-dag\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-hierarchy-dag-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"A directed acyclic graph showing three nodes: L1, L2, and L3, connected left to right by arrows indicating the prerequisite ordering of the ECPE hierarchy.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/hierarchies/index_files/figure-html/fig-hierarchy-dag-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-hierarchy-dag-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a01: The ECPE hierarchy as a directed acyclic graph.\n</figcaption></figure>\n</div>\n</div>\n</div>\n</section><section class=\"level2\" id=\"hierarchies-in-structural-models\"><h2 class=\"anchored\" data-anchor-id=\"hierarchies-in-structural-models\">Hierarchies in structural models</h2>\n<p>Two structural models implement attribute hierarchies, and they differ in how strictly they enforce it.</p>\n<p>The hierarchical DCM <span class=\"citation\" data-cites=\"hdcm\">(HDCM; Templin &amp; Bradshaw, 2014)</span> is strict. Profiles that violate the hierarchy are excluded from the model entirely by fixing their base rates to zero. This is demonstrated in Table\u00a02, where only profiles consistent with the proposed hierarchy are included. If a respondent\u2019s true profile is theoretically impossible, the model cannot assign them to it. Instead, they will be assigned to the nearest valid profile.</p>\n<p>The Bayesian network model <span class=\"citation\" data-cites=\"bayesnet\">(BayesNet; Hu &amp; Templin, 2020)</span> is softer. All profiles remain possible, but profiles that are inconsistent with the hierarchy are estimated to be less likely. Rather than fixing probabilities to zero, the BayesNet structural model uses the hierarchy to inform the prior distribution over profiles. A respondent whose responses look most consistent with an \u201cimpossible\u201d profile will still be assigned a non-zero probability for that profile, but the model will push that probability down.</p>\n<p>The choice between them depends on how much you trust your theory. If you\u2019re confident the hierarchy is real and complete, HDCM gives you a parsimonious model that\u2019s easy to interpret. If you want to test the hierarchy rather than assume it, BayesNet lets the data push back.</p>\n<section class=\"level3\" id=\"specifying-a-hierarchical-structural-model\"><h3 class=\"anchored\" data-anchor-id=\"specifying-a-hierarchical-structural-model\">Specifying a hierarchical structural model</h3>\n<p>For measr, hierarchies are specified with a string that describes the attribute relationships using a DAG-like syntax. Attributes are connected using the <code>-&gt;</code> operator. The <code>-&gt;</code> defines parent-child relationships in the hierarchy string. Parent attributes are prerequisites for child attributes. That is, you must possess or be proficient on the parent before you can acquire the child.</p>\n<p>For our ECPE hierarchy, we can define the attribute relationships as <code>\"lexical -&gt; cohesive -&gt; morphosyntactic\"</code>. We could also write the two relationships separately: <code>\"lexical -&gt; cohesive; cohesive -&gt; morphosyntactic\"</code>. For a simple linear hierarchy, a single chain is the most readable form. However, nonlinear hierarchies may require the relationships to be defined as multiple linear relationships that connect together in various ways. To see examples of different hierarchies and how to specify them using the DAG syntax, check out the <a href=\"https://dcmstan.r-dcm.org/articles/attribute-hierarchies.html\">attribute hierarchies vignette</a> in the <a href=\"https://dcmstan.r-dcm.org\">dcmstan</a> package.</p>\n<p>Our hierarchy string can then be passed to <code><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">hdcm()</a></code> or <code><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">bayesnet()</a></code> as the structural model in <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code>. Both take a <code>hierarchy</code> argument where we can define the hierarchy using a DAG-like syntax.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb5\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item_id\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">hdcm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>hierarchy <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"lexical -&gt; cohesive -&gt; morphosyntactic\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; A loglinear cognitive diagnostic model (LCDM) measuring 3 attributes</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; with 28 items.</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attributes:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"morphosyntactic\" (13 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"cohesive\" (6 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"lexical\" (18 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attribute structure:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   Hierarchical diagnostic classification model (HDCM),</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   with structure:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   lexical -&gt; cohesive -&gt; morphosyntactic</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Prior distributions:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   intercept ~ normal(0, 2)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   maineffect ~ lognormal(0, 1)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   interaction ~ normal(0, 2)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   `Vc` ~ dirichlet(1, 1, 1)</span></span></code></pre></div></div>\n</div>\n<p>The hierarchy must be a directed <em>acyclic</em> graph. You cannot have a cycle where attribute A is a prerequisite for B, and then B is also a prerequisite for A. All of the attributes in the hierarchy must also match the attribute names in the <code>qmatrix</code>. If you specify a cyclical graph or use an unknown attribute name, you\u2019ll receive an error.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb6\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># A cycle: lexical requires cohesive, cohesive requires lexical</span></span>\n<span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item_id\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">hdcm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"lexical -&gt; cohesive -&gt; lexical\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; Error in `hdcm()`:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; ! `hierarchy` must not be cyclical</span></span>\n<span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># Incorrect attribute name: \"lexical_rules\" instead of \"lexical\"</span></span>\n<span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item_id\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">hdcm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"lexical_rules -&gt; cohesive -&gt; morphosyntactic\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; Error in `dcm_specify()`:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; ! `hdcm(\"lexical_rules -&gt; cohesive -&gt; morphosyntactic\")` must</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   only include attributes in a hierarchy present in the Q-matrix</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Extra attributes: \"lexical_rules\"</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level3\" id=\"estimating-hierarchical-models\"><h3 class=\"anchored\" data-anchor-id=\"estimating-hierarchical-models\">Estimating hierarchical models</h3>\n<p>Once we create our DCM specification with the hierarchy, we can use that specification within <code><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate()</a></code> just like we normally do. Here we\u2019ll estimate both an HDCM and a BayesNet model using <a href=\"https://mc-stan.org/cmdstanr/\">cmdstanr</a> and the Pathfinder algorithm <span class=\"citation\" data-cites=\"pathfinder\">(Zhang et al., 2022)</span>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb7\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_hdcm</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_qmatrix</span>,</span>\n<span>    identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item_id\"</span>,</span>\n<span>    measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">hdcm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"lexical -&gt; cohesive -&gt; morphosyntactic\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"resp_id\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pathfinder\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"cmdstanr\"</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"ecpe-lcdm-hdcm-cmds\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_bayesnet</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_qmatrix</span>,</span>\n<span>    identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item_id\"</span>,</span>\n<span>    measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">bayesnet</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"lexical -&gt; cohesive -&gt; morphosyntactic\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"resp_id\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pathfinder\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"cmdstanr\"</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"epce-lcdm-bayesnet-cmds\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</div>\n<p>If we look at the respondent proficiency estimates, we see that we still get a proficiency estimate for each student on each attribute (<code>$attribute_probabilities</code>), but in the class probabilities, we only see the classes that are allowed by the specification (<code>$class_probabilities</code>).</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb8\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/score.html\">score</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_hdcm</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $class_probabilities</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 11,688 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    resp_id class   probability     `2.5%`    `97.5%`</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;   &lt;chr&gt;         &lt;dbl&gt;      &lt;dbl&gt;      &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 1       [0,0,0]  0.00000803 0.00000664 0.00000951</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 1       [0,0,1]  0.00168    0.00154    0.00198   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 1       [0,1,1]  0.00260    0.00215    0.00302   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 1       [1,1,1]  0.996      0.995      0.996     </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 2       [0,0,0]  0.00000645 0.00000444 0.00000869</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 2       [0,0,1]  0.00498    0.00373    0.00554   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 2       [0,1,1]  0.00259    0.00214    0.00300   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 2       [1,1,1]  0.992      0.992      0.994     </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 3       [0,0,0]  0.00000597 0.00000439 0.00000777</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 3       [0,0,1]  0.00276    0.00192    0.00374   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 11,678 more rows</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $attribute_probabilities</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 8,766 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    resp_id attribute       probability `2.5%` `97.5%`</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;   &lt;chr&gt;                 &lt;dbl&gt;  &lt;dbl&gt;   &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 1       morphosyntactic       0.996  0.995   0.996</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 1       cohesive              0.998  0.998   0.998</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 1       lexical               1.000  1.000   1.000</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 2       morphosyntactic       0.992  0.992   0.994</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 2       cohesive              0.995  0.994   0.996</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 2       lexical               1.000  1.000   1.000</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 3       morphosyntactic       0.979  0.973   0.985</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 3       cohesive              0.997  0.996   0.998</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 3       lexical               1.000  1.000   1.000</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 4       morphosyntactic       0.997  0.997   0.997</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 8,756 more rows</span></span></code></pre></div></div>\n</div>\n<p>We can also see how the choice of structural model impacts respondent estimates by examining the estimated model base rates. The base rates represent the proportion of respondents estimated to have each profile. For comparison purposes, let\u2019s also estimate a model with an unconstrained structural model.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb9\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_lcdm</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_qmatrix</span>,</span>\n<span>    identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item_id\"</span>,</span>\n<span>    measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"resp_id\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pathfinder\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"cmdstanr\"</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"ecpe-lcdm-uncst-cmds\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</div>\n<p>In Figure\u00a02, we see the difference between the HDCM and the BayesNet. In the HDCM, the base rate is 0 for any of the profiles that are inconsistent with the defined hierarchy (e.g., [0,1,0]), whereas the BayesNet has non-zero base rates for all profiles. However, notice that the base rate for the BayesNet is much lower for the inconsistent profiles than what is seen in the unconstrained model. So the BayesNet is pushing respondents toward the profiles that are consistent with our specified attribute relationships, but those profiles are not a strict requirement as with the HDCM.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb10\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/bind_rows.html\">bind_rows</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_lcdm</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"strc_param\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, strc <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Unconstrained\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_bayesnet</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"strc_param\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, strc <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"BayesNet\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_hdcm</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"strc_param\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, strc <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"HDCM\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/select.html\">select</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">strc</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">estimate</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    class <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://forcats.tidyverse.org/reference/fct_inorder.html\">fct_inorder</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    strc <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/factor.html\">factor</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">strc</span>, levels <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Unconstrained\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"BayesNet\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"HDCM\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/complete.html\">complete</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">strc</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/list.html\">list</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>estimate <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">posterior</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/posterior/reference/rvar.html\">rvar</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/posterior/reference/rvar-summaries-over-draws.html\">E</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">estimate</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://forcats.tidyverse.org/reference/fct_rev.html\">fct_rev</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://forcats.tidyverse.org/reference/fct_rev.html\">fct_rev</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">strc</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_bar.html\">geom_col</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    position <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/position_dodge.html\">position_dodge2</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>preserve <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"single\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    width <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.7</span>,</span>\n<span>    na.rm <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">TRUE</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">scale_fill_okabeito</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    order <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    breaks <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Unconstrained\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"BayesNet\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"HDCM\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/labs.html\">labs</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Profile\"</span>, x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Estimated Base Rate\"</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Structural Model\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"A grouped horizontal bar chart showing estimated profile base rates for each of the eight attribute profiles under three structural models: Unconstrained, BayesNet, and HDCM. Profiles are listed along the y-axis and estimated base rates along the x-axis.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-model-base-rates\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-model-base-rates-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"A grouped horizontal bar chart showing estimated profile base rates for each of the eight attribute profiles under three structural models: Unconstrained, BayesNet, and HDCM. Profiles are listed along the y-axis and estimated base rates along the x-axis.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/hierarchies/index_files/figure-html/fig-model-base-rates-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-model-base-rates-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a02: Estimated profile base rates for each structural model\n</figcaption></figure>\n</div>\n</div>\n</div>\n</section></section><section class=\"level2\" id=\"evaluating-hierarchical-structures\"><h2 class=\"anchored\" data-anchor-id=\"evaluating-hierarchical-structures\">Evaluating hierarchical structures</h2>\n<p>To this point, we\u2019ve focused on how to encode attribute relationships into our DCM specifications. However, in the DCM framework, these relationships are also testable hypotheses. <span class=\"citation\" data-cites=\"dcm-maps\">Thompson &amp; Nash (2022)</span> demonstrated how we can evaluate a proposed attribute hierarchy using the model fit tools we learned about in the <a href=\"https://r-dcm.org/start/hierarchies//../../start/evaluate/\">Evaluate Model Performance</a> article.</p>\n<p>Specifically, we can use relative fit comparisons to directly compare the models. As in our previous case study, we\u2019ll use leave-one-out cross validation <span class=\"citation\" data-cites=\"loo-waic\">(LOO; Vehtari et al., 2017)</span> for our model comparisons. The model with the highest expected log predictive density (ELPD) is listed first. A difference that is large relative to its standard error <span class=\"citation\" data-cites=\"bengio2004\">(roughly more than 2.5 times; Bengio &amp; Brandvalet, 2004)</span> provides strong evidence for preferring one model over another.</p>\n<p>If the hierarchical models show comparable ELPD to the unconstrained model, the hierarchy is consistent with the data: the simpler, theoretically motivated model fits as well as the fully flexible one. This is the ideal outcome when you have good domain theory. The defined attribute relationships reduce model complexity without sacrificing predictive accuracy. If the unconstrained model dominates clearly, the attribute relationships may be too restrictive, and some theoretically \u201cimpossible\u201d profiles may actually be present in the data.</p>\n<p>As we would expect to see if our theory of a linear hierarchy is correct, unconstrained LCDM, BayesNet, and HDCM have similar ELPD values (difference within the standard error). Because all the model have approximately equal fit, we would probably prefer the HDCM, as that is the simplest of the three models.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb11\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/loo/reference/loo_compare.html\">loo_compare</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_lcdm</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_bayesnet</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_hdcm</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;               elpd_diff se_diff</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; ecpe_bayesnet  0.0       0.0   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; ecpe_lcdm     -0.3       6.3   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; ecpe_hdcm     -6.3       8.6</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level2\" id=\"wrapping-up\"><h2 class=\"anchored\" data-anchor-id=\"wrapping-up\">Wrapping up</h2>\n<p>Defining attribute relationships like hierarchies lets you incorporate domain theory directly into the structural model. Rather than leaving the model to estimate all possible profile base rates freely, you can encode what you know about the order in which skills develop. The HDCM enforces that order as a hard constraint; BayesNet encodes it as a prior that the data can weigh against. Comparing hierarchical models to an unconstrained baseline tells you whether your theory is consistent with the data.</p>\n<p>The next article puts everything we\u2019ve learned so far together in a complete <a href=\"https://r-dcm.org/start/hierarchies//../../start/case-study/\">Diagnostic Assessment Case Study</a> from start to finish.</p>\n</section><div class=\"default\" id=\"quarto-appendix\"><section class=\"level2 appendix\" id=\"session-info\"><h2 class=\"anchored quarto-appendix-heading\">Session information</h2><div class=\"quarto-appendix-contents\">\n<div class=\"cell\" data-layout-align=\"center\">\n<pre><code>#&gt; \u2500 Session info \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  version         R version 4.5.2 (2025-10-31)\n#&gt;  language        (EN)\n#&gt;  date            2026-04-04\n#&gt;  pandoc          3.9\n#&gt;  quarto          1.9.24\n#&gt;  Stan (rstan)    2.37.0\n#&gt;  Stan (cmdstanr) 2.38.0\n#&gt; \n#&gt; \u2500 Packages \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  package          version     date (UTC) source\n#&gt;  bridgesampling   1.2-1       2025-11-19 CRAN (R 4.5.2)\n#&gt;  cmdstanr         0.9.0       2025-03-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  dcmdata          0.2.0       2026-03-10 CRAN (R 4.5.2)\n#&gt;  dcmstan          0.1.0       2025-11-24 CRAN (R 4.5.2)\n#&gt;  dplyr            1.2.0       2026-02-03 CRAN (R 4.5.2)\n#&gt;  forcats          1.0.1       2025-09-25 CRAN (R 4.5.0)\n#&gt;  ggplot2          4.0.2       2026-02-03 CRAN (R 4.5.2)\n#&gt;  loo              2.9.0.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  lubridate        1.9.5       2026-02-04 CRAN (R 4.5.2)\n#&gt;  measr            2.0.0.9000  2026-03-21 Github (r-dcm/measr@475bc50)\n#&gt;  posterior        1.6.1.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  purrr            1.2.1       2026-01-09 CRAN (R 4.5.2)\n#&gt;  readr            2.2.0       2026-02-19 CRAN (R 4.5.2)\n#&gt;  rlang            1.1.7       2026-01-09 CRAN (R 4.5.2)\n#&gt;  rstan            2.36.0.9000 2025-09-26 https://stan-dev.r-universe.dev (R 4.5.1)\n#&gt;  stringr          1.6.0       2025-11-04 CRAN (R 4.5.0)\n#&gt;  tibble           3.3.1       2026-01-11 CRAN (R 4.5.2)\n#&gt;  tidyr            1.3.2       2025-12-19 CRAN (R 4.5.2)\n#&gt; \n#&gt; \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500</code></pre>\n</div>\n</div></section><section class=\"quarto-appendix-contents\" id=\"quarto-bibliography\"><h2 class=\"anchored quarto-appendix-heading\">References</h2><div class=\"references csl-bib-body hanging-indent\" data-entry-spacing=\"0\" data-line-spacing=\"2\" id=\"refs\">\n<div class=\"csl-entry\" id=\"ref-bengio2004\">\nBengio, Y., &amp; Brandvalet, Y. (2004). No unbiased estimator of the variance of k-fold cross-validation. <em>Journal of Machine Learning Research</em>, <em>5</em>, 1089\u20131105. <a href=\"https://www.jmlr.org/papers/v5/grandvalet04a.html\">https://www.jmlr.org/papers/v5/grandvalet04a.html</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-bayesnet\">\nHu, B., &amp; Templin, J. (2020). Using diagnostic classification models to validate attribute hierarchies and evaluate model fit in <span>Bayesian</span> networks. <em>Multivariate Behavioral Research</em>, <em>55</em>(2), 300\u2013311. <a href=\"https://doi.org/10.1080/00273171.2019.1632165\">https://doi.org/10.1080/00273171.2019.1632165</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-hdcm\">\nTemplin, J., &amp; Bradshaw, L. (2014). Hierarchical diagnostic classification models: <span>A</span> family of models for estimating and testing attribute hierarchies. <em>Psychometrika</em>, <em>79</em>(2), 317\u2013339. <a href=\"https://doi.org/10.1007/s11336-013-9362-0\">https://doi.org/10.1007/s11336-013-9362-0</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-dcm-maps\">\nThompson, W. J., &amp; Nash, B. (2022). A diagnostic framework for the empirical evaluation of learning maps. <em>Frontiers in Education</em>, <em>6</em>, Article 714736. <a href=\"https://doi.org/10.3389/feduc.2021.714736\">https://doi.org/10.3389/feduc.2021.714736</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-loo-waic\">\nVehtari, A., Gelman, A., &amp; Gabry, J. (2017). Practical <span>Bayesian</span> model evaluation using leave-one-out cross-validation and <span>WAIC</span>. <em>Statistics and Computing</em>, <em>27</em>, 1413\u20131432. <a href=\"https://doi.org/10.1007/s11222-016-9696-4\">https://doi.org/10.1007/s11222-016-9696-4</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-wang2021\">\nWang, C., &amp; Lu, J. (2021). Learning attribute hierarchies from data: Two exploratory approaches. <em>Journal of Educational and Behavioral Statistics</em>, <em>46</em>(1), 58\u201384. <a href=\"https://doi.org/10.3102/1076998620931094\">https://doi.org/10.3102/1076998620931094</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-pathfinder\">\nZhang, L., Carpenter, B., Gelman, A., &amp; A., V. (2022). Pathfinder: Parallel quasi-<span>Newton</span> variational inference. <em>Journal of Machine Learning Research</em>, <em>23</em>(306), 1\u201349. <a href=\"http://jmlr.org/papers/v23/21-0889.html\">http://jmlr.org/papers/v23/21-0889.html</a>\n</div>\n</div></section></div>","doi":"https://doi.org/10.59350/szqr6-8md61","funding_references":null,"guid":"https://r-dcm.org/start/hierarchies/","id":"49af7dd9-4dd7-439e-9f7f-3a855a30faa3","image":"https://r-dcm.org/start/hierarchies/index_files/figure-html/fig-hierarchy-dag-1.png","indexed":true,"indexed_at":1775360511,"language":"en","parent_doi":null,"published_at":1775357296,"reference":[{"id":"https://www.jmlr.org/papers/v5/grandvalet04a.html","unstructured":"\nBengio, Y., & Brandvalet, Y. (2004). No unbiased estimator of the variance of k-fold cross-validation. Journal of Machine Learning Research, 5, 1089\u20131105. https://www.jmlr.org/papers/v5/grandvalet04a.html\n"},{"id":"https://doi.org/10.1080/00273171.2019.1632165","unstructured":"\nHu, B., & Templin, J. (2020). Using diagnostic classification models to validate attribute hierarchies and evaluate model fit in Bayesian networks. Multivariate Behavioral Research, 55(2), 300\u2013311. https://doi.org/10.1080/00273171.2019.1632165\n"},{"id":"https://doi.org/10.1007/s11336-013-9362-0","unstructured":"\nTemplin, J., & Bradshaw, L. (2014). Hierarchical diagnostic classification models: A family of models for estimating and testing attribute hierarchies. Psychometrika, 79(2), 317\u2013339. https://doi.org/10.1007/s11336-013-9362-0\n"},{"id":"https://doi.org/10.3389/feduc.2021.714736","unstructured":"\nThompson, W. J., & Nash, B. (2022). A diagnostic framework for the empirical evaluation of learning maps. Frontiers in Education, 6, Article 714736. https://doi.org/10.3389/feduc.2021.714736\n"},{"id":"https://doi.org/10.1007/s11222-016-9696-4","unstructured":"\nVehtari, A., Gelman, A., & Gabry, J. (2017). Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC. Statistics and Computing, 27, 1413\u20131432. https://doi.org/10.1007/s11222-016-9696-4\n"},{"id":"https://doi.org/10.3102/1076998620931094","unstructured":"\nWang, C., & Lu, J. (2021). Learning attribute hierarchies from data: Two exploratory approaches. Journal of Educational and Behavioral Statistics, 46(1), 58\u201384. https://doi.org/10.3102/1076998620931094\n"},{"id":"http://jmlr.org/papers/v23/21-0889.html","unstructured":"\nZhang, L., Carpenter, B., Gelman, A., & A., V. (2022). Pathfinder: Parallel quasi-Newton variational inference. Journal of Machine Learning Research, 23(306), 1\u201349. http://jmlr.org/papers/v23/21-0889.html\n"}],"registered_at":0,"relationships":[],"rid":"p5n85-k2609","status":"active","summary":"Introduction   We\u2019ve seen how to specify and estimate a model, and what it looks like when a model doesn\u2019t perform well. One of the most productive places to start when something seems off is the structural model. The structural model controls the assumptions your DCM makes about how attributes relate to each other. By default, the unconstrained model makes no assumptions at all and every possible attribute profile is freely estimated.","tags":[],"title":"Define attribute relationships","updated_at":1775357296,"url":"https://r-dcm.org/start/hierarchies/","version":"v1"}},{"document":{"abstract":null,"archive_url":null,"authors":[],"blog":{"archive_collection":null,"archive_host":null,"archive_prefix":null,"archive_timestamps":null,"authors":null,"canonical_url":null,"category":"socialScience","community_id":"6db161d5-9161-49cf-ab79-f33ad128ed24","created_at":1734126057,"current_feed_url":null,"description":"r-dcm blog","doi_as_guid":false,"favicon":null,"feed_format":"application/rss+xml","feed_url":"https://r-dcm.org/rss.xml","filter":null,"funding":null,"generator":"Quarto","generator_raw":"Quarto 1.6.39","home_page_url":"https://r-dcm.org","id":"5822f383-190a-4c32-9937-86ee8fc75254","indexed":true,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":0,"relative_url":null,"ror":null,"secure":true,"slug":"r_dcm","status":"active","subfield":"1803","subfield_validated":null,"title":"r-dcm blog","updated_at":1775375532.831312,"use_api":null,"use_mastodon":false,"user_id":"943e7faa-bd06-4044-80a5-9fef5df8ccdb"},"blog_name":"r-dcm blog","blog_slug":"r_dcm","content_html":"<section class=\"level2\" id=\"introduction\"><h2 class=\"anchored\" data-anchor-id=\"introduction\">Introduction</h2>\n<p>Once you\u2019ve estimated a DCM, the natural next question is: <em>does this model actually work?</em> Before reporting results or making decisions based on proficiency classifications, we want evidence that the model is doing a good job of representing the data. In this article, we\u2019ll walk through four complementary approaches to evaluating a DCM:</p>\n<ul>\n<li>Absolute fit: Does the model fit the observed data?</li>\n<li>Relative fit: When comparing competing models, which one fits better?</li>\n<li>Classification reliability: How consistent and accurate are the proficiency classifications?</li>\n<li>Misfit diagnostics: If something seems off, where is the problem?</li>\n</ul>\n<p>To use code in this article, you will need to install the following packages: <a href=\"https://dcmdata.r-dcm.org\">dcmdata</a>, <a href=\"https://measr.r-dcm.org\">measr</a>, and <a href=\"https://mc-stan.org/rstan/\">rstan</a>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb1\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org\">measr</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for model evaluation</span></span>\n<span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># Helper packages</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmdata.r-dcm.org\">dcmdata</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for example data set</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/rstan/\">rstan</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for estimation backend</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level2\" id=\"diagnosing-teachers-multiplicative-reasoning-dtmr-data\"><h2 class=\"anchored\" data-anchor-id=\"diagnosing-teachers-multiplicative-reasoning-dtmr-data\">Diagnosing Teachers\u2019 Multiplicative Reasoning (DTMR) data</h2>\n<p>We\u2019ll use data from the DTMR project to demonstrate each of these evaluation tools. The DTMR assessment measures four attributes related to multiplicative reasoning in mathematics teachers. In total, the DTMR data contains responses to 27 items from 990 respondents.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb2\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_data</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 990 \u00d7 28</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    id      `1`   `2`   `3`   `4`   `5`   `6`   `7`  `8a`  `8b`  `8c`  `8d`   `9`</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;fct&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 0008\u2026     1     1     0     1     0     0     1     1     0     1     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 0009\u2026     0     1     0     0     0     0     0     1     1     1     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 0024\u2026     0     1     0     0     0     0     1     1     1     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 0031\u2026     0     1     0     0     1     0     1     1     1     0     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 0061\u2026     0     1     1     0     0     0     0     0     0     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 0087\u2026     0     1     1     1     0     0     0     1     1     1     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 0092\u2026     0     1     1     1     1     0     0     1     1     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 0097\u2026     0     0     0     1     0     0     0     1     0     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 0111\u2026     0     1     1     0     0     0     0     1     0     1     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 0121\u2026     0     1     0     0     0     0     0     1     1     1     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 980 more rows</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 15 more variables: `10a` &lt;int&gt;, `10b` &lt;int&gt;, `10c` &lt;int&gt;, `11` &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   `12` &lt;int&gt;, `13` &lt;int&gt;, `14` &lt;int&gt;, `15a` &lt;int&gt;, `15b` &lt;int&gt;, `15c` &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   `16` &lt;int&gt;, `17` &lt;int&gt;, `18` &lt;int&gt;, `21` &lt;int&gt;, `22` &lt;int&gt;</span></span></code></pre></div></div>\n</div>\n<p>Alongside the response data, we also have a Q-matrix that maps items to the 4 attributes measured by the assessment. These attributes represent aspects of multiplicative reasoning including and understanding of referent units, partitioning and iterating, appropriateness, and multiplicative comparison. For more information on the data set, see <code><a href=\"https://dcmdata.r-dcm.org/reference/dtmr.html\">?dtmr</a></code> and <span class=\"citation\" data-cites=\"dtmr\">Bradshaw et al. (2014)</span>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb3\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_qmatrix</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 27 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    item  referent_units partitioning_iterating appropriateness</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;          &lt;dbl&gt;                  &lt;dbl&gt;           &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 1                  1                      0               0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 2                  0                      0               1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 3                  0                      1               0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 4                  1                      0               0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 5                  1                      0               0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 6                  0                      1               0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 7                  1                      0               0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 8a                 0                      0               1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 8b                 0                      0               1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 8c                 0                      0               1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 17 more rows</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 1 more variable: multiplicative_comparison &lt;dbl&gt;</span></span></code></pre></div></div>\n</div>\n<p>One particularly useful feature of the DTMR data for learning purposes is that it was simulated from known parameters. The actual data set is not publicly available. However, dcmdata provides an artificial data set with the same number of items and respondents, using the parameter estimates reported by <span class=\"citation\" data-cites=\"dtmr\">Bradshaw et al. (2014)</span> and <span class=\"citation\" data-cites=\"dtmr-strc\">Izs\u00e1k et al. (2019)</span>. This means that the data set we are using will match the characterisitics of the real data, but we know what the true model parameters should be. For example, because this data was simulated from a loglinear cognitive diagnostic model <span class=\"citation\" data-cites=\"lcdm\">(LCDM; Henson et al., 2009)</span>, we know that we should see good model performance when estimating an LCDM to this data. Conversely, we should see poor performance if we estimate a more restrictive model, such as the deterministic input, noisy \u201cand\u201d gate model <span class=\"citation\" data-cites=\"dina\">(DINA; <span class=\"nocase\">de la Torre &amp; Douglas</span>, 2004)</span>. And that\u2019s exactly what makes this dataset a great learning example. We\u2019ll see what both good and bad fit look like and learn how to recognize it.</p>\n<p>Some of the evaluation tools we\u2019ll use require the full Bayesian posterior distribution, which means we need to estimate the model using MCMC. Let\u2019s specify and estimate two models now. First, we\u2019ll estimate and LCDM that we know should show good fit and performance.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb4\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_spec</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_spec</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"id\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"mcmc\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"rstan\"</span>,</span>\n<span>  chains <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">4</span>,</span>\n<span>  iter <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1500</span>,</span>\n<span>  warmup <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1000</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"dtmr-lcdm-mcmc-rstn\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</div>\n<p>Next, we\u2019ll estimate a DINA model. The DINA model puts constraints on the LCDM, so this model should show worse performance than our LCDM.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb5\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dina_spec</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">dina</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_dina</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dina_spec</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"id\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"mcmc\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"rstan\"</span>,</span>\n<span>  chains <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">4</span>,</span>\n<span>  iter <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2500</span>,</span>\n<span>  warmup <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2000</span>,</span>\n<span>  control <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/list.html\">list</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>adapt_delta <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">.99</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"dtmr-dina-mcmc-rstn\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level2\" id=\"absolute-model-fit\"><h2 class=\"anchored\" data-anchor-id=\"absolute-model-fit\">Absolute model fit</h2>\n<p>Absolute fit asks a direct question: does the model fit the data? We have two tools for answering it with measr: the M<sub>2</sub> statistic, which works with any estimation method, and posterior predictive model checks (PPMCs), which require a full posterior from either MCMC estimation or a variational inference algorithm.</p>\n<section class=\"level3\" id=\"m2-statistic\"><h3 class=\"anchored\" data-anchor-id=\"m2-statistic\">M<sub>2</sub> statistic</h3>\n<p>The M<sub>2</sub> statistic is a limited-information goodness-of-fit measure originally developed by Maydeu-Olivares &amp; Joe <span class=\"citation\" data-cites=\"m2-2005 m2-2006\">(2005, 2006)</span> and adapted for DCMs by <span class=\"citation\" data-cites=\"liu2016\">Liu et al. (2016)</span>. \u201cLimited-information\u201d means the statistic summarizes fit using item-pair statistics rather than the full multivariate response pattern, making it practical for assessments with many items.</p>\n<p>The null hypothesis is that the model fits the data. A large M<sub>2</sub> (relative to the degrees of freedom, <code>df</code>) with a small <em>p</em>-value suggests the model does not adequately reproduce the observed data patterns. We can calculate the M<sub>2</sub> for any measr model with <code><a href=\"https://rdrr.io/pkg/dcm2/man/fit_m2.html\">fit_m2()</a></code>. In addition to the M<sub>2</sub> statistic and its <em>p</em>-value, the function also returns the root mean square error of approximation (RMSEA) with a 90% confidence interval and the standardized root mean square residual (SRMSR) as supplementary fit indices.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb6\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/pkg/dcm2/man/fit_m2.html\">fit_m2</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 1 \u00d7 8</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;      m2    df  pval rmsea ci_lower ci_upper `90% CI`     srmsr</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt; &lt;dbl&gt;    &lt;dbl&gt;    &lt;dbl&gt; &lt;chr&gt;        &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1  266.   293 0.869     0        0   0.0068 [0, 0.0068] 0.0273</span></span></code></pre></div></div>\n</div>\n<p>Since the DTMR data was generated from an LCDM, we expect good fit here. A non-significant <em>p</em>-value means we cannot reject the null hypothesis that the model fits, and small RMSEA and SRMSR values indicate the model closely reproduces the observed item-pair statistics.</p>\n<p>Contrast that with the fit results for the DINA model. The M<sub>2</sub> is quite large with a very small <em>p</em>-value, and both the RMSEA and SRMSR are more elevated. This is expected in this example, because we know that the DINA model has more constraints than the model that was used to generate this data set.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb7\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/pkg/dcm2/man/fit_m2.html\">fit_m2</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_dina</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 1 \u00d7 8</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;      m2    df        pval  rmsea ci_lower ci_upper `90% CI`          srmsr</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;dbl&gt; &lt;int&gt;       &lt;dbl&gt;  &lt;dbl&gt;    &lt;dbl&gt;    &lt;dbl&gt; &lt;chr&gt;             &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1  452.   309 0.000000203 0.0216   0.0172   0.0258 [0.0172, 0.0258] 0.0719</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level3\" id=\"posterior-predictive-model-checks\"><h3 class=\"anchored\" data-anchor-id=\"posterior-predictive-model-checks\">Posterior predictive model checks</h3>\n<p>Posterior predictive model checks (PPMCs) are a Bayesian approach to evaluating model fit <span class=\"citation\" data-cites=\"park2015\">(Park et al., 2015)</span>. The idea is to simulate many replicated datasets from the estimated model posterior, then ask: does our observed data look like data the model would generate? If the model is well-specified, the observed data should be indistinguishable from the replicated data.</p>\n<p><code><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc()</a></code> performs a PPMC based on the raw score distribution. It simulates replicated datasets from the posterior, calculates the distribution of raw scores for each, and compares this distribution to our observed data. Because PPMCs require draws from the full posterior distribution, they only work with model estimated by a method that produces a posterior (i.e., MCMC, variational inference).</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb8\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_ppmc</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span>, model_fit <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"raw_score\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_ppmc</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $ppmc_raw_score</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 1 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   obs_chisq ppmc_mean `2.5%` `97.5%`   ppp</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;       &lt;dbl&gt;     &lt;dbl&gt;  &lt;dbl&gt;   &lt;dbl&gt; &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1      35.6      30.0   13.1    56.8 0.201</span></span></code></pre></div></div>\n</div>\n<p>The key output is the posterior predictive <em>p</em>-value (<em>ppp</em>), which is the proportion of replicated datasets that produced a larger fit statistic than our observed data. For a well-fitting model, the observed data should fall in the middle of the replicated distribution, giving a <em>ppp</em> near 0.5. Values near 0 indicate that the observed data produces a fit statistic with a much larger value than expected by replicated datasets; values near 1 would indicate the opposite. In this case, our <em>ppp</em> values is 0.201, indicating that 20.1% of replicated data sets had a larger fit statistic than our observed data.</p>\n<p>Let\u2019s visualize the PPMC to see how the observed raw score distribution compares to the replicated data.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb9\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyverse.tidyverse.org\">tidyverse</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/\">ggdist</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_scores</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_data</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/pivot_longer.html\">pivot_longer</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>cols <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">-</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"id\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/summarise.html\">summarize</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>raw_score <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/sum.html\">sum</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">value</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, .by <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">id</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/count.html\">count</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/complete.html\">complete</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>raw_score <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">:</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/nrow.html\">ncol</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_data</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">-</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/list.html\">list</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>n <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0L</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span>, model_fit <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"raw_score\"</span>, return_draws <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2000</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://purrr.tidyverse.org/reference/pluck.html\">pluck</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"ppmc_raw_score\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/select.html\">select</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">rawscore_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/unnest.html\">unnest</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">rawscore_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/unnest.html\">unnest</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_scores</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/reference/stat_interval.html\">stat_interval</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">n</span>, color_ramp <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes_eval.html\">after_stat</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">level</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    point_interval <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"mean_qi\"</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    linewidth <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">5</span>,</span>\n<span>    show.legend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">FALSE</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_path.html\">geom_line</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_scores</span>,</span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">n</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_point.html\">geom_point</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_scores</span>,</span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">n</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Observed Data\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    shape <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">21</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    size <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/reference/scale_colour_ramp.html\">scale_color_ramp_discrete</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    from <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"white\"</span>,</span>\n<span>    range <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.2</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    breaks <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.5</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.8</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.95</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    labels <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">~</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/paste.html\">paste0</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/numeric.html\">as.numeric</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">.x</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">*</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">100</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"%\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/scale_manual.html\">scale_fill_manual</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>values <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/scale_continuous.html\">scale_x_continuous</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>breaks <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/seq.html\">seq</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">27</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, expand <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">scale_y_comma</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/labs.html\">labs</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Raw score\"</span>,</span>\n<span>    y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Respondents\"</span>,</span>\n<span>    color_ramp <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Credible Interval\"</span>,</span>\n<span>    fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">NULL</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/guides.html\">guides</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/guide_legend.html\">guide_legend</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>override.aes <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/list.html\">list</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>size <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"Line plot showing the observed number of respondents at each raw score point, superimposed over an interval showing the expected number of respondents at each score point from model-replicated data. The observed line runs through the middle of the credible interval bands, indicating good model fit.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-rawscore-dist\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-rawscore-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"Line plot showing the observed number of respondents at each raw score point, superimposed over an interval showing the expected number of respondents at each score point from model-replicated data. The observed line runs through the middle of the credible interval bands, indicating good model fit.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/evaluate/index_files/figure-html/fig-rawscore-dist-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-rawscore-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a01: Posterior predictive model check of the raw score distribution.\n</figcaption></figure>\n</div>\n</div>\n</div>\n<p>The blue bars show the 50%, 80%, and 95% credible intervals for the expected number of respondents at each score point, based on the model (i.e., the distribution across the replicated data sets). The red line and points show the counts from our observed data set. When the model fits well, the red line threads through the middle of the blue intervals rather than wandering outside them.</p>\n<p>We can also examine the distribution of \u03c7<sup>2</sup>-like statistics calculated from the replicated datasets <span class=\"citation\" data-cites=\"thompson-bayes\">(Thompson, 2019)</span>. For each replicated dataset, we compute how much it differs from the expected raw score distribution. This creates a distribution of plausible \u03c7<sup>2</sup> values under the model. The \u03c7<sup>2</sup> is our fit statistic in this PPMC, and the <em>ppp</em> value is the proportion of replicated \u03c7<sup>2</sup> values that exceed the observed value (as indicated by the red line). In this example, we see that the observed value is toward the middle, which is exactly what we would expect from a well-fitting model.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb10\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span>, model_fit <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"raw_score\"</span>, return_draws <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2000</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://purrr.tidyverse.org/reference/pluck.html\">pluck</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"ppmc_raw_score\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/select.html\">select</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">chisq_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/unnest.html\">unnest</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">chisq_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">chisq_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/reference/stat_dots.html\">stat_dots</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    quantiles <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">500</span>,</span>\n<span>    layout <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"hex\"</span>,</span>\n<span>    stackratio <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.9</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    na.rm <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">TRUE</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_abline.html\">geom_vline</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    xintercept <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">@</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">fit</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ppmc_raw_score</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_chisq</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    linewidth <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/coord_cartesian.html\">coord_cartesian</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>xlim <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">100</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/labs.html\">labs</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">NULL</span>, x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"&amp;chi;^2^&lt;sub&gt;rep&lt;/sub&gt;\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/theme.html\">theme</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>axis.text.y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/element.html\">element_blank</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, axis.ticks.y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/element.html\">element_blank</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"Dot plot showing the distribution of chi-square statistics from replicated datasets. A vertical line marks the observed chi-square statistic, which falls near the center of the distribution, indicating good model fit.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-chisq-dist\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-chisq-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"Dot plot showing the distribution of chi-square statistics from replicated datasets. A vertical line marks the observed chi-square statistic, which falls near the center of the distribution, indicating good model fit.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/evaluate/index_files/figure-html/fig-chisq-dist-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-chisq-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a02: Posterior predictive \u03c7<sup>2</sup> distribution for the LCDM.\n</figcaption></figure>\n</div>\n</div>\n</div>\n<p>Compare this to the same \u03c7<sup>2</sup> plot for the DINA model. For this model, the observed value is further out in the tail of the distribution of expected values. Accordingly, our <em>ppp</em> value is only 0.052.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb11\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_dina</span>, model_fit <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"raw_score\"</span>, return_draws <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2000</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://purrr.tidyverse.org/reference/pluck.html\">pluck</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"ppmc_raw_score\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/select.html\">select</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">chisq_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/unnest.html\">unnest</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">chisq_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">chisq_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/reference/stat_dots.html\">stat_dots</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    quantiles <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">500</span>,</span>\n<span>    layout <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"hex\"</span>,</span>\n<span>    stackratio <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.9</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    na.rm <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">TRUE</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_abline.html\">geom_vline</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    xintercept <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_dina</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">@</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">fit</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ppmc_raw_score</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_chisq</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    linewidth <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># scale_x_continuous(limits = c(0, 250)) +</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/coord_cartesian.html\">coord_cartesian</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>xlim <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">100</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/labs.html\">labs</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">NULL</span>, x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"&amp;chi;^2^&lt;sub&gt;rep&lt;/sub&gt;\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/theme.html\">theme</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>axis.text.y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/element.html\">element_blank</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, axis.ticks.y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/element.html\">element_blank</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"Dot plot showing the distribution of chi-square statistics from replicated datasets. A vertical line marks the observed chi-square statistic, which falls near the center of the distribution, indicating good model fit.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-dina-chisq-dist\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-dina-chisq-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"Dot plot showing the distribution of chi-square statistics from replicated datasets. A vertical line marks the observed chi-square statistic, which falls near the center of the distribution, indicating good model fit.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/evaluate/index_files/figure-html/fig-dina-chisq-dist-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-dina-chisq-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a03: Posterior predictive \u03c7<sup>2</sup> distribution for the DINA model.\n</figcaption></figure>\n</div>\n</div>\n</div>\n</section></section><section class=\"level2\" id=\"relative-model-fit\"><h2 class=\"anchored\" data-anchor-id=\"relative-model-fit\">Relative model fit</h2>\n<p>Absolute fit asks whether the model fits the data. Relative fit asks a different question: Among several candidate models, which fits better? This distinction matters because sometimes multiple models may show adequate absolute model fit, and we need to choose the best model to implement. In our example, we have one model that fits well and one that doesn\u2019t so we don\u2019t really need an evaluation of relative model fit to determine which is better. However, we\u2019ll run comparison to illustrate idea.</p>\n<p>We recommend using leave-one-out cross-validation (LOO) estimates for model comparisons <span class=\"citation\" data-cites=\"loo-waic\">(Vehtari et al., 2017)</span>. LOO approximates how well the model would predict new, unseen data. Higher expected log predictive density (ELPD) values indicate better out-of-sample predictive performance. <code><a href=\"https://mc-stan.org/loo/reference/loo_compare.html\">loo_compare()</a></code> uses the <a href=\"https://mc-stan.org/loo/\">loo</a> package to directly compare the models, rank them by ELPD and report the difference along with its standard error.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb12\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/loo/reference/loo_compare.html\">loo_compare</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_dina</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;           elpd_diff se_diff</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; dtmr_lcdm    0.0       0.0 </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; dtmr_dina -195.5      19.2</span></span></code></pre></div></div>\n</div>\n<p>The model with the higher ELPD is listed first. A difference in ELPD that is large relative to its standard error (roughly more than 2.5 times) provides strong evidence that one model genuinely fits better. Since the data was simulated from an LCDM, the LCDM should show a substantially higher ELPD than the DINA, reflecting that the LCDM is a better match for the true data-generating process.</p>\n</section><section class=\"level2\" id=\"classification-reliability\"><h2 class=\"anchored\" data-anchor-id=\"classification-reliability\">Classification reliability</h2>\n<p>Even after examining fit, it\u2019s worth asking a separate question. Regardless of how well the model fits the data at an overall level, how reliable are the individual classifications it produces? For practical applications of DCMs,like providing feedback to teachers about specific competencies, the reliability of those classifications matters as much as overall model fit.</p>\n<p><code><a href=\"https://measr.r-dcm.org/reference/reliability.html\">reliability()</a></code> calculates several types of reliability evidence from our estimated model.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb13\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_reliability</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/reliability.html\">reliability</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_reliability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $pattern_reliability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;       p_a       p_c </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 0.7211589 0.6007968 </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $map_reliability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $map_reliability$accuracy</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 4 \u00d7 8</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   attribute                   acc lambda_a kappa_a youden_a tetra_a  tp_a  tn_a</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;                     &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 referent_units            0.926    0.785   0.367    0.828   0.968 0.875 0.952</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 partitioning_iterating    0.925    0.847   0.849    0.849   0.972 0.924 0.926</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 appropriateness           0.891    0.725   0.733    0.764   0.938 0.925 0.838</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 multiplicative_comparison 0.924    0.803   0.146    0.840   0.969 0.938 0.902</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $map_reliability$consistency</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 4 \u00d7 10</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   attribute         consist lambda_c kappa_c youden_c tetra_c  tp_c  tn_c gammak</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;               &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt;  &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 referent_units      0.875    0.625   0.665    0.719   0.909 0.813 0.907  0.890</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 partitioning_ite\u2026   0.868    0.733   0.849    0.736   0.915 0.870 0.866  0.889</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 appropriateness     0.828    0.547   0.682    0.635   0.844 0.862 0.773  0.843</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 multiplicative_c\u2026   0.877    0.682   0.757    0.741   0.920 0.900 0.841  0.896</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 1 more variable: pc_prime &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $eap_reliability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 4 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   attribute                 rho_pf rho_bs rho_i rho_tb</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;                      &lt;dbl&gt;  &lt;dbl&gt; &lt;dbl&gt;  &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 referent_units             0.787  0.756 0.600  0.930</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 partitioning_iterating     0.796  0.779 0.637  0.940</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 appropriateness            0.740  0.673 0.564  0.873</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 multiplicative_comparison  0.812  0.781 0.632  0.943</span></span></code></pre></div></div>\n</div>\n<p>measr returns three categories of reliability: pattern reliability, MAP (maximum a posteriori) reliability, and EAP (expected a posteriori) reliability. Each reflects a different way of reporting results, and the most relevant indices depend on how proficiency scores are determined and used. For a comprehensive review of reliability methods for DCMs, see <span class=\"citation\" data-cites=\"reliability-handbook\">Sinharay &amp; Johnson (2019)</span>.</p>\n<section class=\"level3\" id=\"pattern-reliability\"><h3 class=\"anchored\" data-anchor-id=\"pattern-reliability\">Pattern reliability</h3>\n<p>Pattern reliability evaluates the consistency and accuracy of classifying respondents into an overall profile\u2014the complete pattern of proficiency across all attributes simultaneously. <span class=\"citation\" data-cites=\"cui2012\">Cui et al. (2012)</span> describe two indices, <code>p_a</code> and <code>p_c</code>:</p>\n<ul>\n<li>p<sub>a</sub> is the probability of classifying a random respondent into the correct class.</li>\n<li>p<sub>c</sub> is the probability of consistently classifying a random respondent into the same class across two test administrations.</li>\n</ul>\n<p>These indices range from 0 to 1, with 1 indicating perfect accuracy or consistency, and 0 indicating the opposite.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb14\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_reliability</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pattern_reliability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;       p_a       p_c </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 0.7211589 0.6007968</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level3\" id=\"map-reliability\"><h3 class=\"anchored\" data-anchor-id=\"map-reliability\">MAP reliability</h3>\n<p>MAP reliability evaluates accuracy and consistency at the attribute level, where each attribute is classified separately using a threshold (typically .5) applied to the estimated proficiency probability. <span class=\"citation\" data-cites=\"johnson2018\">Johnson &amp; Sinharay (2018)</span> describe two primary indices, P<sub>ak</sub> (<code>acc</code>) and P<sub>ck</sub> (<code>consist</code>):</p>\n<ul>\n<li>P<sub>ak</sub> is the accuracy of the attribute classification, or how often the classification matches the true latent state.</li>\n<li>P<sub>ck</sub> is the consistency of the classification across parallel test administrations.</li>\n</ul>\n<p>In addition, <span class=\"citation\" data-cites=\"johnson2018\">Johnson &amp; Sinharay (2018)</span> demonstrate how other agreement indices, such as Goodman and Kruskal\u2019s \u03bb and Cohen\u2019s \u03ba, can be used to evaluate accuracy and consistency at the attribute level. All indices are returned by <code><a href=\"https://measr.r-dcm.org/reference/reliability.html\">reliability()</a></code>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb15\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_reliability</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">map_reliability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $accuracy</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 4 \u00d7 8</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   attribute                   acc lambda_a kappa_a youden_a tetra_a  tp_a  tn_a</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;                     &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 referent_units            0.926    0.785   0.367    0.828   0.968 0.875 0.952</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 partitioning_iterating    0.925    0.847   0.849    0.849   0.972 0.924 0.926</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 appropriateness           0.891    0.725   0.733    0.764   0.938 0.925 0.838</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 multiplicative_comparison 0.924    0.803   0.146    0.840   0.969 0.938 0.902</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $consistency</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 4 \u00d7 10</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   attribute         consist lambda_c kappa_c youden_c tetra_c  tp_c  tn_c gammak</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;               &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt;  &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 referent_units      0.875    0.625   0.665    0.719   0.909 0.813 0.907  0.890</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 partitioning_ite\u2026   0.868    0.733   0.849    0.736   0.915 0.870 0.866  0.889</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 appropriateness     0.828    0.547   0.682    0.635   0.844 0.862 0.773  0.843</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 multiplicative_c\u2026   0.877    0.682   0.757    0.741   0.920 0.900 0.841  0.896</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 1 more variable: pc_prime &lt;dbl&gt;</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level3\" id=\"eap-reliability\"><h3 class=\"anchored\" data-anchor-id=\"eap-reliability\">EAP reliability</h3>\n<p>EAP reliability evaluates the precision of the probability of proficiency itself, rather than a binary classification. <span class=\"citation\" data-cites=\"johnson2020\">Johnson &amp; Sinharay (2020)</span> describe four reliability metrics for this purpose and recommend using the biserial (<code>rho_bs</code>) and informational (<code>rho_i</code>) indices, as the parallel form estimates tend to overestimate reliability.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb16\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_reliability</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">eap_reliability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 4 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   attribute                 rho_pf rho_bs rho_i rho_tb</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;                      &lt;dbl&gt;  &lt;dbl&gt; &lt;dbl&gt;  &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 referent_units             0.787  0.756 0.600  0.930</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 partitioning_iterating     0.796  0.779 0.637  0.940</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 appropriateness            0.740  0.673 0.564  0.873</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 multiplicative_comparison  0.812  0.781 0.632  0.943</span></span></code></pre></div></div>\n</div>\n<p>EAP reliability is typically lower than MAP reliability, because placing a respondent at a specific probability (a continuous scale) is harder than placing them into a binary category. That said, both MAP and EAP reliability can be adequate even when overall model fit is not perfect, which is one reason it\u2019s important to evaluate both fit and reliability.</p>\n</section></section><section class=\"level2\" id=\"wrapping-up\"><h2 class=\"anchored\" data-anchor-id=\"wrapping-up\">Wrapping up</h2>\n<p>So far we\u2019ve discussed various ways we can evaluate whether our model has good fit and provides accurate and reliable results. But what do we do if the answer is \u201cno\u201d? A good place to start is often examining your structural model and ensuring that attribute relationships are appropriately included. That is the focus of the <a href=\"https://r-dcm.org/start/evaluate//../../start/hierarchies/\">Define Attribute Relationships</a> article.</p>\n</section><div class=\"default\" id=\"quarto-appendix\"><section class=\"level2 appendix\" id=\"session-info\"><h2 class=\"anchored quarto-appendix-heading\">Session information</h2><div class=\"quarto-appendix-contents\">\n<div class=\"cell\" data-layout-align=\"center\">\n<pre><code>#&gt; \u2500 Session info \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  version      R version 4.5.2 (2025-10-31)\n#&gt;  language     (EN)\n#&gt;  date         2026-04-04\n#&gt;  pandoc       3.9\n#&gt;  quarto       1.9.24\n#&gt;  Stan (rstan) 2.37.0\n#&gt; \n#&gt; \u2500 Packages \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  package          version     date (UTC) source\n#&gt;  bridgesampling   1.2-1       2025-11-19 CRAN (R 4.5.2)\n#&gt;  dcmdata          0.2.0       2026-03-10 CRAN (R 4.5.2)\n#&gt;  dcmstan          0.1.0       2025-11-24 CRAN (R 4.5.2)\n#&gt;  dplyr            1.2.0       2026-02-03 CRAN (R 4.5.2)\n#&gt;  forcats          1.0.1       2025-09-25 CRAN (R 4.5.0)\n#&gt;  ggplot2          4.0.2       2026-02-03 CRAN (R 4.5.2)\n#&gt;  loo              2.9.0.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  lubridate        1.9.5       2026-02-04 CRAN (R 4.5.2)\n#&gt;  measr            2.0.0.9000  2026-03-21 Github (r-dcm/measr@475bc50)\n#&gt;  posterior        1.6.1.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  purrr            1.2.1       2026-01-09 CRAN (R 4.5.2)\n#&gt;  readr            2.2.0       2026-02-19 CRAN (R 4.5.2)\n#&gt;  rlang            1.1.7       2026-01-09 CRAN (R 4.5.2)\n#&gt;  rstan            2.36.0.9000 2025-09-26 https://stan-dev.r-universe.dev (R 4.5.1)\n#&gt;  stringr          1.6.0       2025-11-04 CRAN (R 4.5.0)\n#&gt;  tibble           3.3.1       2026-01-11 CRAN (R 4.5.2)\n#&gt;  tidyr            1.3.2       2025-12-19 CRAN (R 4.5.2)\n#&gt; \n#&gt; \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500</code></pre>\n</div>\n</div></section><section class=\"quarto-appendix-contents\" id=\"quarto-bibliography\"><h2 class=\"anchored quarto-appendix-heading\">References</h2><div class=\"references csl-bib-body hanging-indent\" data-entry-spacing=\"0\" data-line-spacing=\"2\" id=\"refs\">\n<div class=\"csl-entry\" id=\"ref-dtmr\">\nBradshaw, L., Izs\u00e1k, A., Templin, J., &amp; Jacobson, E. (2014). Diagnosing teachers\u2019 understandings of rational numbers: Building a multidimensional test within the diagnostic classification framework. <em>Educational Measurement: Issues and Practice</em>, <em>33</em>(1), 2\u201314. <a href=\"https://doi.org/10.1111/emip.12020\">https://doi.org/10.1111/emip.12020</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-cui2012\">\nCui, Y., Gierl, M. J., &amp; Chang, H.-H. (2012). Estimating classification consistency and accuracy for cognitive diagnostic assessment. <em>Journal of Educational Measurement</em>, <em>49</em>(1), 19\u201338. <a href=\"https://doi.org/10.1111/j.1745-3984.2011.00158.x\">https://doi.org/10.1111/j.1745-3984.2011.00158.x</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-dina\">\n<span class=\"nocase\">de la Torre, J., &amp; Douglas, J. A.</span> (2004). Higher-order latent trait models for cognitive diagnosis. <em>Psychometrika</em>, <em>69</em>(3), 333\u2013353. <a href=\"https://doi.org/10.1007/BF02295640\">https://doi.org/10.1007/BF02295640</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-lcdm\">\nHenson, R. A., Templin, J. L., &amp; Willse, J. T. (2009). Defining a family of cognitive diagnosis models using log-linear models with latent variables. <em>Psychometrika</em>, <em>74</em>(2), 191\u2013210. <a href=\"https://doi.org/10.1007/s11336-008-9089-5\">https://doi.org/10.1007/s11336-008-9089-5</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-dtmr-strc\">\nIzs\u00e1k, A., Jacobson, E., &amp; Bradshaw, L. (2019). Surveying middle-grades teachers\u2019 reasoning about fraction arithmetic in terms of measured quantities. <em>Journal for Research in Mathematics Education</em>, <em>50</em>(2), 156\u2013209. <a href=\"https://doi.org/10.5951/jresematheduc.50.2.0156\">https://doi.org/10.5951/jresematheduc.50.2.0156</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-johnson2018\">\nJohnson, M. S., &amp; Sinharay, S. (2018). Measures of agreement to assess attribute-level classification accuracy and consistency for cognitive diagnostic assessments. <em>Journal of Educational Measurement</em>, <em>55</em>(4), 635\u2013664. <a href=\"https://doi.org/10.1111/jedm.12196\">https://doi.org/10.1111/jedm.12196</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-johnson2020\">\nJohnson, M. S., &amp; Sinharay, S. (2020). The reliability of the posterior probability of skill attainment in diagnostic classification models. <em>Journal of Educational and Behavioral Statistics</em>, <em>45</em>(1), 5\u201331. <a href=\"https://doi.org/10.3102/1076998619864550\">https://doi.org/10.3102/1076998619864550</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-liu2016\">\nLiu, Y., Tian, W., &amp; Xin, T. (2016). An application of <span><img src=\"https://latex.codecogs.com/png.latex?M_2\"/></span> statistic to evaluate the fit of cognitive diagnostic models. <em>Journal of Educational and Behavioral Statistics</em>, <em>41</em>(1), 3\u201326. <a href=\"https://doi.org/10.3102/1076998615621293\">https://doi.org/10.3102/1076998615621293</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-m2-2005\">\nMaydeu-Olivares, A., &amp; Joe, H. (2005). Limited- and full-information estimation and goodness-of-fit testing in <img src=\"https://latex.codecogs.com/png.latex?2%5En\"/> contingency tables: <span>A</span> unified framework. <em>Journal of the American Statistical Association</em>, <em>100</em>(471), 1009\u20131020. <a href=\"https://doi.org/10.1198/016214504000002069\">https://doi.org/10.1198/016214504000002069</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-m2-2006\">\nMaydeu-Olivares, A., &amp; Joe, H. (2006). Limited information goodness-of-fit testing in multidimensional contingency tables. <em>Psychometrika</em>, <em>71</em>(4), 713\u2013732. <a href=\"https://doi.org/10.1007/s11336-005-1295-9\">https://doi.org/10.1007/s11336-005-1295-9</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-park2015\">\nPark, J. Y., Johnson, M. S., &amp; Lee, Y.-S. (2015). Posterior predictive model checks for cognitive diagnostic models. <em>International Journal of Quantitative Research in Education</em>, <em>2</em>(3\u20134), 244\u2013264. <a href=\"https://doi.org/10.1504/IJQRE.2015.071738\">https://doi.org/10.1504/IJQRE.2015.071738</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-reliability-handbook\">\nSinharay, S., &amp; Johnson, M. S. (2019). Measures of agreement: <span>Reliability</span>, classification accuracy, and classification consistency. In <span class=\"nocase\">M. von Davier &amp; Y.-S. Lee (Eds.)</span>, <em>Handbook of <span>Diagnostic Classification Models</span></em> (pp. 359\u2013377). <span>Springer International Publishing</span>. <a href=\"https://doi.org/10.1007/978-3-030-05584-4_17\">https://doi.org/10.1007/978-3-030-05584-4_17</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-thompson-bayes\">\nThompson, W. J. (2019). <em>Bayesian psychometrics for diagnostic assessments: <span>A</span> proof of concept</em> (Research Report Nos. No. 19-01). <span>University of Kansas; Accessible Teaching, Learning, and Assessment Systems</span>. <a href=\"https://doi.org/10.35542/osf.io/jzqs8\">https://doi.org/10.35542/osf.io/jzqs8</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-loo-waic\">\nVehtari, A., Gelman, A., &amp; Gabry, J. (2017). Practical <span>Bayesian</span> model evaluation using leave-one-out cross-validation and <span>WAIC</span>. <em>Statistics and Computing</em>, <em>27</em>, 1413\u20131432. <a href=\"https://doi.org/10.1007/s11222-016-9696-4\">https://doi.org/10.1007/s11222-016-9696-4</a>\n</div>\n</div></section></div>","doi":"https://doi.org/10.59350/pv6qr-6z165","funding_references":null,"guid":"https://r-dcm.org/start/evaluate/","id":"2b9990ca-7018-4b53-a816-b5366ea184ff","image":"https://r-dcm.org/start/evaluate/index_files/figure-html/fig-rawscore-dist-1.png","indexed":true,"indexed_at":1775360510,"language":"en","parent_doi":null,"published_at":1775357296,"reference":[{"id":"https://doi.org/10.1111/emip.12020","unstructured":"\nBradshaw, L., Izs\u00e1k, A., Templin, J., & Jacobson, E. (2014). Diagnosing teachers\u2019 understandings of rational numbers: Building a multidimensional test within the diagnostic classification framework. Educational Measurement: Issues and Practice, 33(1), 2\u201314. https://doi.org/10.1111/emip.12020\n"},{"id":"https://doi.org/10.1111/j.1745-3984.2011.00158.x","unstructured":"\nCui, Y., Gierl, M. J., & Chang, H.-H. (2012). Estimating classification consistency and accuracy for cognitive diagnostic assessment. Journal of Educational Measurement, 49(1), 19\u201338. https://doi.org/10.1111/j.1745-3984.2011.00158.x\n"},{"id":"https://doi.org/10.1007/BF02295640","unstructured":"\nde la Torre, J., & Douglas, J. A. (2004). Higher-order latent trait models for cognitive diagnosis. Psychometrika, 69(3), 333\u2013353. https://doi.org/10.1007/BF02295640\n"},{"id":"https://doi.org/10.1007/s11336-008-9089-5","unstructured":"\nHenson, R. A., Templin, J. L., & Willse, J. T. (2009). Defining a family of cognitive diagnosis models using log-linear models with latent variables. Psychometrika, 74(2), 191\u2013210. https://doi.org/10.1007/s11336-008-9089-5\n"},{"id":"https://doi.org/10.5951/jresematheduc.50.2.0156","unstructured":"\nIzs\u00e1k, A., Jacobson, E., & Bradshaw, L. (2019). Surveying middle-grades teachers\u2019 reasoning about fraction arithmetic in terms of measured quantities. Journal for Research in Mathematics Education, 50(2), 156\u2013209. https://doi.org/10.5951/jresematheduc.50.2.0156\n"},{"id":"https://doi.org/10.1111/jedm.12196","unstructured":"\nJohnson, M. S., & Sinharay, S. (2018). Measures of agreement to assess attribute-level classification accuracy and consistency for cognitive diagnostic assessments. Journal of Educational Measurement, 55(4), 635\u2013664. https://doi.org/10.1111/jedm.12196\n"},{"id":"https://doi.org/10.3102/1076998619864550","unstructured":"\nJohnson, M. S., & Sinharay, S. (2020). The reliability of the posterior probability of skill attainment in diagnostic classification models. Journal of Educational and Behavioral Statistics, 45(1), 5\u201331. https://doi.org/10.3102/1076998619864550\n"},{"id":"https://doi.org/10.3102/1076998615621293","unstructured":"\nLiu, Y., Tian, W., & Xin, T. (2016). An application of  statistic to evaluate the fit of cognitive diagnostic models. Journal of Educational and Behavioral Statistics, 41(1), 3\u201326. https://doi.org/10.3102/1076998615621293\n"},{"id":"https://doi.org/10.1198/016214504000002069","unstructured":"\nMaydeu-Olivares, A., & Joe, H. (2005). Limited- and full-information estimation and goodness-of-fit testing in  contingency tables: A unified framework. Journal of the American Statistical Association, 100(471), 1009\u20131020. https://doi.org/10.1198/016214504000002069\n"},{"id":"https://doi.org/10.1007/s11336-005-1295-9","unstructured":"\nMaydeu-Olivares, A., & Joe, H. (2006). Limited information goodness-of-fit testing in multidimensional contingency tables. Psychometrika, 71(4), 713\u2013732. https://doi.org/10.1007/s11336-005-1295-9\n"},{"id":"https://doi.org/10.1504/IJQRE.2015.071738","unstructured":"\nPark, J. Y., Johnson, M. S., & Lee, Y.-S. (2015). Posterior predictive model checks for cognitive diagnostic models. International Journal of Quantitative Research in Education, 2(3\u20134), 244\u2013264. https://doi.org/10.1504/IJQRE.2015.071738\n"},{"id":"https://doi.org/10.1007/978-3-030-05584-4_17","unstructured":"\nSinharay, S., & Johnson, M. S. (2019). Measures of agreement: Reliability, classification accuracy, and classification consistency. In M. von Davier & Y.-S. Lee (Eds.), Handbook of Diagnostic Classification Models (pp. 359\u2013377). Springer International Publishing. https://doi.org/10.1007/978-3-030-05584-4_17\n"},{"id":"https://doi.org/10.35542/osf.io/jzqs8","unstructured":"\nThompson, W. J. (2019). Bayesian psychometrics for diagnostic assessments: A proof of concept (Research Report Nos. No. 19-01). University of Kansas; Accessible Teaching, Learning, and Assessment Systems. https://doi.org/10.35542/osf.io/jzqs8\n"},{"id":"https://doi.org/10.1007/s11222-016-9696-4","unstructured":"\nVehtari, A., Gelman, A., & Gabry, J. (2017). Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC. Statistics and Computing, 27, 1413\u20131432. https://doi.org/10.1007/s11222-016-9696-4\n"}],"registered_at":0,"relationships":[],"rid":"nbv82-s8e12","status":"active","summary":"Introduction   Once you\u2019ve estimated a DCM, the natural next question is:\n<em>\n does this model actually work?\n</em>\nBefore reporting results or making decisions based on proficiency classifications, we want evidence that the model is doing a good job of representing the data. In this article, we\u2019ll walk through four complementary approaches to evaluating a DCM: Absolute fit: Does the model fit the observed data?","tags":[],"title":"Evaluate model performance","updated_at":1775357296,"url":"https://r-dcm.org/start/evaluate/","version":"v1"}},{"document":{"abstract":"A bit over a week ago, SWAT4HCLS 2026 took place, with the matching biohackathon on Thursday (see this post. I attempted a bit of live coverage on mastodon: day 1 and day 2. But it seems the semantic web community interested in SWAT4HCLS has not found the fediverse yet. So, make sure to check this full list of abstracts.","archive_url":null,"authors":[{"affiliation":[{"id":"https://ror.org/02jz4aj89","name":"Maastricht University"}],"contributor_roles":[],"family":"Willighagen","given":"Egon","url":"https://orcid.org/0000-0001-7542-0286"}],"blog":{"archive_collection":24077,"archive_host":null,"archive_prefix":null,"archive_timestamps":[20250309095102],"authors":[{"name":"Egon Willighagen"}],"canonical_url":null,"category":"chemicalSciences","community_id":"7f57028e-9d03-489c-b3b4-3d60de06bc9e","created_at":1710339716,"current_feed_url":"https://chem-bla-ics.linkedchemistry.info/feed.json","description":"Chemblaics (pronounced chem-bla-ics) is the science that uses open science and computers to solve problems in chemistry, biochemistry and related fields.","doi_as_guid":false,"favicon":"https://rogue-scholar.org/api/communities/7f57028e-9d03-489c-b3b4-3d60de06bc9e/logo","feed_format":"application/feed+json","feed_url":"https://chem-bla-ics.linkedchemistry.info/archive.json","filter":null,"funding":null,"generator":"Jekyll","generator_raw":"Jekyll 4.3.4","home_page_url":"https://chem-bla-ics.linkedchemistry.info","id":"0bf0d06a-a707-417d-81eb-65b6c060d7e4","indexed":true,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":1729769435,"relative_url":null,"ror":null,"secure":true,"slug":"chem_bla_ics","status":"active","subfield":"1606","subfield_validated":null,"title":"chem-bla-ics","updated_at":1775375431.247013,"use_api":true,"use_mastodon":false,"user_id":"dead81b3-8a8b-45c9-85fe-f01bb3948c77"},"blog_name":"chem-bla-ics","blog_slug":"chem_bla_ics","content_html":"<p>A bit over a week ago, <a href=\"https://www.swat4ls.org/workshops/amsterdam2026/\">SWAT4HCLS 2026</a> took place, with the matching\n<a href=\"https://www.swat4ls.org/workshops/amsterdam2026/swat4hcls-biohackathon-2026/\">biohackathon</a> on Thursday (see\n<a href=\"https://chem-bla-ics.linkedchemistry.info/2026/03/22/swat4hcls-2026-amsterdam-this-week.html\">this post</a>.\nI attempted a bit of live coverage on mastodon: <a href=\"https://social.edu.nl/@egonw/116285060969709401\">day 1</a> and\n<a href=\"https://social.edu.nl/@egonw/116289579219485790\">day 2</a>. But it seems the semantic web community interested\nin SWAT4HCLS has not found the fediverse yet. So, make sure to check\n<a href=\"https://www.swat4ls.org/workshops/amsterdam2026/programme/accepted-submissions/\">this full list of abstracts</a>.</p>\n<p>The meeting consisted of <a href=\"https://www.swat4ls.org/workshops/amsterdam2026/programme/keynotes/\">four keynotes</a>, each\none was quite interesting. Cornet gave a nice historic perspective of the venue and of the semantic web field,\nwhich is a great way to welcome the participants to your institute. The talk also touches on the main theme\nof the meeting: clinical data. It is a long standing (and important) research field, but progress is slow.\nCornet <a href=\"https://social.edu.nl/@egonw/116283216644714695\">comments</a> along the lines that <em>we have been talking\nabout reasoning over patient data for more than twenty years, but we still have not solve it</em>.</p>\n<p>The problem is really not only privacy, but simple also lack of a common language. As\n<a href=\"https://qlever.scholia.wiki/orcid/0000-0003-3248-7899\">Sabine \u00d6sterle</a> explains\nabout sharing health/patient data in Switzerland, across 26 kantons and legislations and 4 national languages.\nAnother issue is more technical, running SPARQL across hospitals involves more than just aligning ontologies,\nbut also requires (too much) fiddling with SPARQL queries.</p>\n<p>There was plenty of other content too, however. For example, I was pleasantly\n<a href=\"https://social.edu.nl/@egonw/116284409447761902\">surprised</a> by the\n<a href=\"https://www.swat4ls.org/workshops/amsterdam2026/programme/accepted-submissions/#RDF4RiskAssessment_Toolkit_A_Toolkit_for_Converting_Tabular_Research_Data_to_FAIR_RDF_for_Risk_Assessment_and_Life_Sciences\">RDF4RiskAssessment</a>\nwork, the <a href=\"https://www.swat4ls.org/workshops/amsterdam2026/programme/accepted-submissions/#RO-Crates_for_BioImaging\">RO-Crates for BioImaging</a>,\nand <a href=\"https://www.swat4ls.org/workshops/amsterdam2026/programme/accepted-submissions/#FDPcrawleR_A_Lightweight_R_Framework_for_Auditing_FAIR_Data_Points_and_FAIR_Virtual_Platforms\">FDPcrawleR</a>.\nAll these projects have direct links to research ongoing in <a href=\"https://www.maastrichtuniversity.nl/research/translational-genomics\">our TGX team</a>.</p>\n<p><a href=\"https://qlever.scholia.wiki/orcid/0000-0003-1213-6776\">Hanna Bast</a> gave the second keynote of the first day, about <a href=\"https://qlever.dev/\">QLever</a>\n(doi:<a href=\"https://doi.org/10.1145/3132847.3132921\">10.1145/3132847.3132921</a>). She talked about some of the recent improvements,\nsomething we really <a href=\"https://chem-bla-ics.linkedchemistry.info/2026/02/28/rescuing-scholia-3-we-did-it.html\">needed for Scholia</a>.\nShe showed a technical approach to make federated queries faster, tho it currently only works between endpoints\nthat both run QLever. One thing I am looking forward to, is playing with the notion of\n<a href=\"https://docs.qlever.dev/materialized-views/?h=materialize\">materialized views</a>, but the biohackathon\nwas too short to get around to that during the Thursday.</p>\n<p>The second day kicked off with a keynote by <a href=\"https://qlever.scholia.wiki/orcid/0000-0002-3469-4923\">Janna Hastings</a>,\nwhose work I greatly admire. I was not disappointed today, and she showed the\n<a href=\"https://www.bciontology.org/\">Behaviour Change Intervention Ontology</a> and <a href=\"https://chebifier.hastingslab.org/\">Chebifier</a>\n(doi:<a href=\"https://doi.org/10.1039/D3DD00238A\">10.1039/D3DD00238A</a>).</p>\n<p>The last talk I want to mention in the blog is by two researcher working with Michel Dumontier. They\n<a href=\"https://www.swat4ls.org/workshops/amsterdam2026/programme/accepted-submissions/#Embedding-based_Deduplication_of_Knowledge_Graphs_using_Graph_Neural_Networks\">presented</a>\na study about deduplication in/of knowledge graphs. This is something I want to read in more detail.</p>","doi":"https://doi.org/10.59350/bmxve-vry14","funding_references":null,"guid":"https://doi.org/10.59350/bmxve-vry14","id":"b5653278-57f5-437f-b74a-56baec89fdec","image":null,"indexed":true,"indexed_at":1775331556,"language":"en","parent_doi":null,"published_at":1775321640,"reference":[{"id":"https://doi.org/10.1039/D3DD00238A"},{"id":"https://doi.org/10.1145/3132847.3132921"}],"registered_at":0,"relationships":[],"rid":"fv0j9-k5x63","status":"active","summary":"A bit over a week ago, SWAT4HCLS 2026 took place, with the matching biohackathon on Thursday (see this post. I attempted a bit of live coverage on mastodon: day 1 and day 2. But it seems the semantic web community interested in SWAT4HCLS has not found the fediverse yet. So, make sure to check this full list of abstracts. The meeting consisted of four keynotes, each one was quite interesting.","tags":["Swat4ls","Mastodon"],"title":"SWAT4HCLS 2026","updated_at":1775321640,"url":"https://chem-bla-ics.linkedchemistry.info/2026/04/04/swat4hcls-2026.html","version":"v1"}},{"document":{"abstract":"Unsere monatliche Rubrik zu aktuellen Veranstaltungen rund um Open Research.","archive_url":null,"authors":[{"contributor_roles":[],"family":"Fischer","given":"Georg","url":"https://orcid.org/0000-0001-5620-5759"}],"blog":{"archive_collection":22141,"archive_host":null,"archive_prefix":"https://wayback.archive-it.org/22141/20231105110201/","archive_timestamps":[20231105110201,20240505180741,20241105110207,20250505110216],"authors":null,"canonical_url":null,"category":"otherSocialSciences","community_id":"52aefd81-f405-4349-b080-754395a5d8b2","created_at":1694476800,"current_feed_url":null,"description":null,"doi_as_guid":false,"favicon":"https://rogue-scholar.org/api/communities/52aefd81-f405-4349-b080-754395a5d8b2/logo","feed_format":"application/atom+xml","feed_url":"https://blogs.fu-berlin.de/open-research-berlin/feed/atom/","filter":null,"funding":null,"generator":"WordPress","generator_raw":"WordPress 6.0","home_page_url":"https://blogs.fu-berlin.de/open-research-berlin/","id":"575d6b2d-c555-4fc7-99fb-055a400f9163","indexed":false,"issn":null,"language":"de","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":"https://berlin.social/@openaccess","prefix":"10.59350","registered_at":1729602098,"relative_url":null,"ror":null,"secure":true,"slug":"oaberlin","status":"active","subfield":"1802","subfield_validated":null,"title":"Open Research Office Berlin","updated_at":1775375524.800675,"use_api":true,"use_mastodon":true,"user_id":"383c62ed-0cf6-4dc7-a56c-5b0104f7f10a"},"blog_name":"Open Research Office Berlin","blog_slug":"oaberlin","content_html":"<p>Unsere monatliche Rubrik zu aktuellen Veranstaltungen rund um Open Research.</p>\n<p><!--more--></p>\n<pre>Anmerkung zu dieser Rubrik: Das Open Research Office Berlin erstellt monatlich eine \u00dcbersicht \u00fcber Termine und Veranstaltungen zu Open Access und Open Research in Berlin bzw. an Berliner Einrichtungen. Der Fokus liegt dabei auf unseren Partnereinrichtungen und auf Veranstaltungen, die sich an die \u00d6ffentlichkeit richten bzw. die offen sind f\u00fcr Angeh\u00f6rige der Wissenschafts- und Kulturerbeeinrichtungen in Berlin. Wir erg\u00e4nzen diese Liste gerne (Info bitte via <a href=\"mailto:team@open-research-berlin.de\">Mail</a> ans OROB).</pre>\n<h2>6. Mai, Workshop Introduction to Data Management Plans</h2>\n<p>A Data Management Plan (DMP) describes how the research data created or used in a project is methodically managed throughout the project. It is a useful tool for reflecting on and improving one&#8217;s research data management. It is also often a requirement by research funding organisations. This online workshop is aimed at researchers and doctoral candidates at any stage of their (PhD) project.</p>\n<ul>\n<li><strong>Termin:\u00a0</strong>06.05.2026, 09:30 bis 12:00 Uhr</li>\n<li><strong>Organisiert von</strong>: Freie Universit\u00e4t Berlin</li>\n<li>[<a href=\"https://www.fu-berlin.de/sites/forschungsdatenmanagement/veranstaltungen/2026/2026-05-06-Workshop-Intro-DMP-en-DM.html\">Information und Anmeldung</a>]</li>\n</ul>\n<div class=\"box-event-doc-header-title col-m-8\">\n<h2>7. Mai, Study preregistration and Registered Reports for hypothesis-driven research, online</h2>\n<p><em>Registering a study\u2019s hypothesis, design, methods and analysis plan prior to conducting the study increases the transparency of your research and can reduce biases and questionable research practices. This coffee lecture introduces the Open Science practice of preregistration, the motivation behind it and how to preregister work in a repository (without peer review) or a journal (with peer review).</em></p>\n<ul>\n<li><strong>Termin:\u00a0</strong>07.05.2026, 10:00 bis 10:30 Uhr, online</li>\n<li><strong>Organisiert von</strong>: Freie Universit\u00e4t Berlin</li>\n<li>[<a href=\"https://www.fu-berlin.de/sites/forschungsdatenmanagement/veranstaltungen/2026/2026-05-07-CoffeeLecture-Preregistration-en-DM.html\">Information und Anmeldung</a>]</li>\n</ul>\n</div>\n<h2>7. Mai, Workshop Introduction to Research Data Management</h2>\n<p><em>Das Projekt \u201e<a href=\"https://www.berlin-university-alliance.de/commitments/sharing-resources/shared-resources-center/CARDS-FDM/index.html\">Collaboratively Advancing Research Data Support</a>\u201c (CARDS) l\u00e4dt Forscherinnen und Forscher von BUA-Einrichtungen herzlich ein, im Mai an einem\u00a0interaktiven Workshop zum Thema Forschungsdatenmanagement\u00a0(FDM) teilzunehmen. Vorkenntnisse im Bereich Forschungsdatenmanagement sind\u00a0nicht erforderlich!\u00a0</em><em>Der Workshop ist auf die Bed\u00fcrfnisse der Teilnehmerinnen und Teilnehmer zugeschnitten und behandelt wichtige Themen des FDM wie\u00a0Datendokumentation und -organisation, rechtliche Aspekte des Datenmanagements und Datenver\u00f6ffentlichung.\u00a0</em><em>Im ersten Teil des Workshops, der am 7. Mai 2026 stattfindet, werden Sie sich\u00a0praktische F\u00e4higkeiten\u00a0in\u00a0hands-on \u00dcbungen\u00a0aneignen, die Sie sofort in Ihrer Arbeit umsetzen k\u00f6nnen. Im anschlie\u00dfenden Online-Meeting mit dem Trainer im Oktober haben Sie die M\u00f6glichkeit,\u00a0Feedback zu Ihrem Forschungsdatenmanagement\u00a0zu erhalten und es mit Hilfe unseres Experten zu verfeinern.</em></p>\n<ul>\n<li><strong>Termin:\u00a0</strong>07.05.2026, 09:00 bis 15:30 Uhr</li>\n<li><strong>Organisiert von</strong>: Berlin University Alliance; Referent: Benjamin Golub-Overbeck (Landesinitiative f\u00fcr Forschungsdatenmanagement in Niedersachsen, FDM-NDS)</li>\n<li>[<a href=\"https://www.berlin-university-alliance.de/commitments/sharing-resources/shared-resources-center/CARDS-FDM/cards_events/2026-05-07_fdm_einfuehrung.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>8. Mai, Strategisch publizieren im Open Access: Das richtige Journal ausw\u00e4hlen, online</h2>\n<p><em>Was bedeutet es, im Open Access zu ver\u00f6ffentlichen? Wie finde ich ein geeignetes Open-Access-Journal f\u00fcr meinen Artikel? Welche offene Lizenz sollte ich verwenden? Diese und \u00e4hnliche Fragen werden in der von der Bibliothek organisierten Reihe &#8222;Open Access verstehen&#8220; beantwortet. Die Beitr\u00e4ge werden in Kooperation mit der Hochschulbibliothek der ASH und der BHT Berlin organisiert.\u00a0Die Vortr\u00e4ge finden im Online-Format statt und sind f\u00fcr alle offen. Eine Anmeldung ist nicht erforderlich.</em></p>\n<ul>\n<li><strong>Termin: </strong>08.05.2026, 11:00 bis 11:45 Uhr, online</li>\n<li><strong>Organisiert von</strong>: HTW, ASH und BHT Berlin</li>\n<li>[<a href=\"https://events.htw-berlin.de/forschung/open-access-verstehen/\">Information und Anmeldung</a>]</li>\n</ul>\n<div class=\"box-event-doc-header-title col-m-8\">\n<h2 class=\"box-event-doc-title\">13. Mai, Forschungsdatenmanagement und Open Science in der Forschungsf\u00f6rderung</h2>\n<p><em>In der Veranstaltung erhalten Sie eine knappe \u00dcbersicht zu den typischen formalen und inhaltlichen Vorgaben der zentralen bundesdeutschen und europ\u00e4ischen F\u00f6rderer. Zahlreiche nationale und internationale Forschungsf\u00f6rderer wie die DFG, das BMBF und die Europ\u00e4ische Kommission haben in den vergangenen Jahren Richtlinien f\u00fcr das Forschungsdatenmanagement (FDM) vorgelegt. Dabei variieren Inhalt und Umfang der Anforderungen je nach F\u00f6rderer und Programmlinie. Auch die f\u00fcr das FDM zu beantragenden Kosten unterscheiden sich je nach F\u00f6rderer; und schlie\u00dflich kann auch die Fachdisziplin Auswirkungen auf die Anforderungen haben. Die Veranstaltung richtet sich an interessierte Forschende aller Erfahrungsstufen, die Forschungsantr\u00e4ge stellen (wollen), sowie an forschungsunterst\u00fctzendes Personal.</em></p>\n</div>\n<ul>\n<li><strong>Termin: </strong>13.05.2026, 10:00 bis 12:00 Uhr, online</li>\n<li><strong>Organisiert von</strong>: Freie Universit\u00e4t Berlin</li>\n<li>[<a href=\"https://www.fu-berlin.de/sites/forschungsdatenmanagement/veranstaltungen/2026/2026-05-13-Event-FDM-OS-Foerderer-de-DM.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>13. Mai, Biologische Sammlungen vernetzen: Daten, Standards, Zusammenarbeit, online</h2>\n<div class=\"box-event-doc-header-title col-m-8\">\n<p><em>Anton G\u00fcntsch, Leiter des Zentrums f\u00fcr Biodiversit\u00e4tsinformatik und Sammlungsdatenintegration am Botanischen Garten Berlin, gibt Ihnen einen \u00dcberblick \u00fcber das Management und die Vernetzung biologischer Sammlungsdaten im lokalen, nationalen und internationalen Kontext. Am Beispiel des Botanischen Gartens Berlin an der Freien Universit\u00e4t wird die Vielfalt biologischer Sammlungen vorgestellt \u2013 von konservierten Sammlungsexemplaren \u00fcber lebende Sammlungen, Saatgut sowie Gewebe- und DNA-Proben bis hin zu Multimediaobjekten \u2013 und ihre Bedeutung f\u00fcr die biologische Forschung aufgezeigt.</em></p>\n</div>\n<ul>\n<li><strong>Termin: </strong>13.05.2026, 10:00 bis 11:30 Uhr, online</li>\n<li><strong>Organisiert von</strong>: Berlin University Alliance; Referent: Anton G\u00fcntsch (Zentrum f\u00fcr Biodiversit\u00e4tsinformatik und Sammlungsdatenintegration am Botanischen Garten Berlin)</li>\n<li>[<a href=\"https://www.berlin-university-alliance.de/commitments/sharing-resources/shared-resources-center/CARDS-FDM/cards_events/2026-05-13_bio-de.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>18. Mai, Archive unter Druck, Bodo-Uhse-Bibliothek</h2>\n<p><em>Das partizipative Forum ARCHIVE UNTER DRUCK in der Bodo-Uhse-Bibliothek l\u00e4dt am 18.05.2026 von 13:30 bis 15:30 Uhr zu einem praxisnahen Austausch ein. Ausgehend von kurzen Impulsvortr\u00e4gen zur aktuellen Situation von Archiven und anderen Ged\u00e4chtnisorganisationen unter Druck bietet das Forum Raum f\u00fcr Diskussionen, Erfahrungsaustausch und die gemeinsame Frage, wie Archive und engagierte Akteur*innen unterst\u00fctzt und vernetzt werden k\u00f6nnen.</em></p>\n<ul>\n<li><strong>Termin: </strong>18.05.2026, 10:00 bis 11:30 Uhr, Bodo-Uhse-Bibliothek, Erich-Kurz-Str. 9, 10319 Berlin-Lichtenberg</li>\n<li><strong>Organisiert von</strong>: AK Offene Archive, AG Demokratie; Bodo-Uhse-Bibliothek; CORe \u2013 Center for Open and Responsible Research, Berlin University Alliance (BUA); DDF \u2013 Digitales Deutsches Frauenarchiv; und TIB \u2013 Leibniz Informationszentrum Technik und Naturwissenschaften</li>\n<li>[<a href=\"https://www.digitales-deutsches-frauenarchiv.de/blog/archive-unter-druck-einladung-zum-gemeinsamen-forum#no-back\">Information und Anmeldung</a>]</li>\n</ul>\n<hr />\n<h2>+++Das Open Research Office Berlin bei der Bibliocon+++</h2>\n<h3>19. Mai, Offen, aber rechtens! \u2013 Hands-on-Lab zu (urheber-)rechtlichen Fragen bei Open Access und Open Research, Bibliocon Berlin</h3>\n<h3>21. Mai, oa.atlas zum Mitmachen: Chancen, Herausforderungen und neue Features diskutieren, Bibliocon Berlin</h3>\n<p><em>\u201eAnalog trifft Algorithmus\u201c: Das ist das Motto der diesj\u00e4hrigen 114. BiblioCon. Die Konferenz ist eine j\u00e4hrlich stattfindende Konferenz in der Bibliothekswelt und gastiert im Mai 2026 im Berliner Estrel Congress Center. Das Open Research Office Berlin ist an mehreren Sessions beteiligt, f\u00fcr die sich Interessierte ab sofort anmelden k\u00f6nnen. N\u00e4here Information in unserem <a href=\"https://blogs.fu-berlin.de/open-research-berlin/2026/03/04/open-research-office-berlin-bibliocon-2026/\">Blog</a>:</em></p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"iZGiExZo4Q\"><p><a href=\"https://blogs.fu-berlin.de/open-research-berlin/2026/03/04/open-research-office-berlin-bibliocon-2026/\">Das Open Research Office Berlin bei der BiblioCon-Konferenz in Berlin (19.-22. Mai)</a></p></blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8222;Das Open Research Office Berlin bei der BiblioCon-Konferenz in Berlin (19.-22. Mai)&#8220; &#8211; Open Research Blog Berlin\" src=\"https://blogs.fu-berlin.de/open-research-berlin/2026/03/04/open-research-office-berlin-bibliocon-2026/embed/#?secret=XyqgMChxWt#?secret=iZGiExZo4Q\" data-secret=\"iZGiExZo4Q\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"></iframe></p>\n<hr />\n<h2>19.-20. Mai,The Politics &amp; Finances of (Open) Science Reform: A workshop on the socio-economic architecture of the Open Science Movement</h2>\n<p><em>In the planned workshop we would therefore like to ask: Who funds OS? Who benefits from OS financially? How do private and political interests work against the proclaimed idea(l)s of OS? What examples of \u2018OS backsliding\u2019 can we identify already? What is the interaction between OS implementations in research policy \u2014 for instance in the form of Open Innovation agendas (Heimst\u00e4dt &amp; Friesike, 2021; Lund, 2025) \u2014 and the financial realities of OS?</em></p>\n<ul>\n<li><strong>Termin: </strong>19.-20.05.2026, HU Berlin</li>\n<li><strong>Organisiert von</strong>: Robert Merton Zentrum f\u00fcr Wissenschaftsforschung, HU Berlin</li>\n<li>[<a href=\"https://www.rmz.hu-berlin.de/de/termine/workshop-the-politics-finances-of-open-science-reform\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>20. Mai, Workshop Research Data Publication</h2>\n<p><em>Many funding organisations and institutional research data management policies require that you make your data FAIR and as open as possible. This online seminar is aimed at researchers who want to know where and how to publish their research output.</em></p>\n<ul>\n<li><strong>Termin: </strong>20.05.2026, 10:00 bis 12:00 Uhr</li>\n<li><strong>Organisiert von</strong>: Freie Universit\u00e4t Berlin</li>\n<li>[<a href=\"https://www.fu-berlin.de/sites/forschungsdatenmanagement/veranstaltungen/2026/2026-05-20-Workshop-RD-Publication-en-DM.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>28. Mai, Berlin Open Data Day, Festsaal des Roten Rathauses (Berlin)</h2>\n<p><em>Wie werden Daten zum Schl\u00fcssel einer modernen und leistungsf\u00e4higen Verwaltung? Welche strategischen Weichen stellen Bund, L\u00e4nder und Kommunen f\u00fcr eine erfolgreiche digitale Transformation?\u00a0Nutzen Sie wertvolle Einblicke, frische Impulse und ein starkes Open-Data-Netzwerk beim etablierten Berlin Open Data Day \u2013 diesmal mit Perspektiven aus Bund, L\u00e4ndern und Kommunen.</em></p>\n<ul>\n<li><strong>Termin: </strong>28.05.2026, 09:00 bis 16.00 Uhr, Rathausstr. 15, 10178 Berlin</li>\n<li><strong>Organisiert von</strong>: Open Data Verantwortliche der Stadt Berlin, Senat Berlin</li>\n<li>[<a href=\"https://sweapevent.com/b?p=berlinopendataday2026\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>29. Mai, Open Access ohne Lizenzstress: Grundlagen, Fallstricke und L\u00f6sungen, online</h2>\n<p>Was bedeutet es, im Open Access zu ver\u00f6ffentlichen? Wie finde ich ein geeignetes Open-Access-Journal f\u00fcr meinen Artikel? Welche offene Lizenz sollte ich verwenden? Diese und \u00e4hnliche Fragen werden in der von der Bibliothek organisierten Reihe &#8222;Open Access verstehen&#8220; beantwortet. Die Beitr\u00e4ge werden in Kooperation mit der Hochschulbibliothek der ASH und der BHT Berlin organisiert.\u00a0Die Vortr\u00e4ge finden im Online-Format statt und sind f\u00fcr alle offen. Eine Anmeldung ist nicht erforderlich.</p>\n<p>Termin: 08.05.2026, 11:00 bis 11:45 Uhr, online<br />\nOrganisiert von: HTW, ASH und BHT Berlin<br />\n[<a href=\"https://events.htw-berlin.de/forschung/open-access-verstehen/\">Information und Anmeldung</a>]</p>\n<div class=\"entry-content\">\n<p>weiter zu Juni 2026 [folgt in K\u00fcrze]</p>\n</div>\n","doi":"https://doi.org/10.59350/e192q-6y682","funding_references":null,"guid":"https://blogs.fu-berlin.de/open-research-berlin/?p=4025","id":"940ac582-9b66-471f-8e73-73262c5ddb75","image":null,"indexed":true,"indexed_at":1775301362,"language":"de","parent_doi":null,"published_at":1775299535,"reference":[],"registered_at":0,"relationships":[],"rid":"rqrz7-65n69","status":"active","summary":"Unsere monatliche Rubrik zu aktuellen Veranstaltungen rund um Open Research. Anmerkung zu dieser Rubrik: Das Open Research Office Berlin erstellt monatlich eine \u00dcbersicht \u00fcber Termine und Veranstaltungen zu Open Access und Open Research in Berlin bzw. an Berliner Einrichtungen. Der Fokus liegt dabei auf unseren Partnereinrichtungen und auf Veranstaltungen, die sich an die \u00d6ffentlichkeit richten bzw.","tags":["Allgemein","Veranstaltungshinweise"],"title":"Veranstaltungshinweise Mai 2026","updated_at":1775300381,"url":"https://blogs.fu-berlin.de/open-research-berlin/2026/04/04/veranstaltungshinweise-mai-2026/","version":"v1"}},{"document":{"abstract":"Back in 2010, I wrote about early artistic depictions of Brachiosaurus (including Giraffatitan). There, I wrote of the iconic mount MB.R.2181 (then HMN S II): When the mount was completed, shortly before the start of World War II, it was unveiled against a backdrop of Nazi banners.","archive_url":null,"authors":[{"affiliation":[{"id":"https://ror.org/0524sp257","name":"University of Bristol"}],"contributor_roles":[],"family":"Taylor","given":"Mike","url":"https://orcid.org/0000-0002-1003-5675"}],"blog":{"archive_collection":22153,"archive_host":null,"archive_prefix":"https://wayback.archive-it.org/22153/20231105213934/","archive_timestamps":null,"authors":[{"name":"Mike Taylor"}],"canonical_url":null,"category":"earthAndRelatedEnvironmentalSciences","community_id":"0e13541f-417e-46c0-a859-65927249df72","created_at":1675209600,"current_feed_url":null,"description":"SV-POW!  ...  All sauropod vertebrae, except when we're talking about Open Access. ISSN 3033-3695","doi_as_guid":false,"favicon":null,"feed_format":"application/atom+xml","feed_url":"https://svpow.com/feed/atom/","filter":null,"funding":null,"generator":"WordPress.com","generator_raw":"WordPress.com","home_page_url":"https://svpow.com","id":"c6cbbd2e-4675-4680-8a3f-784388009821","indexed":false,"issn":"3033-3695","language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":1729882329,"relative_url":null,"ror":null,"secure":true,"slug":"svpow","status":"active","subfield":"1911","subfield_validated":true,"title":"Sauropod Vertebra Picture of the Week","updated_at":1775375571.615463,"use_api":true,"use_mastodon":false,"user_id":"04d03585-c8bb-40f2-9619-5076a5e0aed2"},"blog_name":"Sauropod Vertebra Picture of the Week","blog_slug":"svpow","content_html":"<p>Back in 2010, I wrote about <a href=\"https://svpow.com/2010/04/08/early-brachiosaurus-art/\">early artistic depictions of <em>Brachiosaurus</em> (including <em>Giraffatitan</em>)</a>. There, I wrote of the iconic mount MB.R.2181 (then HMN S II):</p>\n<blockquote><p>When the mount was completed, shortly before the start of World War II, it was unveiled against a backdrop of Nazi banners. I have not been able to find a photograph of this (and if anyone has one, please do let me know), but I do have this drawing of the event, taken from an Italian magazine and dated 23rd December 1937.</p></blockquote>\n<p>(See that post for the drawing.)</p>\n<p>Recently the historian Ilja Nieuwland (one of the authors <a href=\"https://svpow.com/papers-by-sv-powsketeers/taylor-et-al-2025-on-the-composition-on-the-carnegie-diplodocus/\">on our recent paper on the Carnegie <em>Diplodocus</em></a>, Taylor et al. 2025) sent me two photos of this unveiling, again with swastikas prominent in the background:</p>\n<div data-shortcode=\"caption\" id=\"attachment_25273\" style=\"width: 490px\" class=\"wp-caption alignnone\"><a href=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg\"><img aria-describedby=\"caption-attachment-25273\" data-attachment-id=\"25273\" data-permalink=\"http://svpow.com/2026/04/03/the-nazi-sauropod-giraffatitan-brachiosaurus-brancai-in-1937/haagsche-courant-1937-brachio/\" data-orig-file=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg\" data-orig-size=\"1398,2217\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;,&quot;alt&quot;:&quot;&quot;}\" data-image-title=\"Haagsche Courant 1937 &amp;#8211; Brachio\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg?w=646\" loading=\"lazy\" class=\"size-full wp-image-25273\" src=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg\" alt=\"\" width=\"480\" height=\"761\" srcset=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg?w=480&amp;h=761 480w, https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg?w=960&amp;h=1522 960w, https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg?w=95&amp;h=150 95w, https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg?w=189&amp;h=300 189w, https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg?w=768&amp;h=1218 768w, https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg?w=646&amp;h=1024 646w\" sizes=\"(max-width: 480px) 100vw, 480px\" /></a><p id=\"caption-attachment-25273\" class=\"wp-caption-text\"><strong>EEN MOOIE AANSWINST</strong> \u2014 voor het museum van natuurlijke historie te Berlijn: het skelet van een Brachiosaurus, het grooste voorwereld-lijke landdier ooit gevonden. Het skelet is 11.87 meter hoog.</p></div>\n<p>Surprisingly, perhaps, this is in a Dutch newspaper, <em>Haagsche Courant</em> of 14 December 1937. The caption, which is in Dutch, reads: &#8220;A GREAT ADDITION \u2014 to the Museum of Natural History in Berlin: the skeleton of a Brachiosaurus, the largest prehistoric land animal ever found. The skeleton is 11.87 meters tall.&#8221; Ilja helpfully supplied <a href=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.pdf\">a PDF containing the front page of the newspaper and the page that contained this image</a>.</p>\n<p>The second is similar, but from a different angle that highlights the human skeleton that was placed down by the forefeet for scale:</p>\n<div data-shortcode=\"caption\" id=\"attachment_25277\" style=\"width: 490px\" class=\"wp-caption alignnone\"><a href=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg\"><img aria-describedby=\"caption-attachment-25277\" data-attachment-id=\"25277\" data-permalink=\"http://svpow.com/2026/04/03/the-nazi-sauropod-giraffatitan-brachiosaurus-brancai-in-1937/maasbode-27-nov-1937-p2/\" data-orig-file=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg\" data-orig-size=\"678,1280\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;,&quot;alt&quot;:&quot;&quot;}\" data-image-title=\"Maasbode 27 nov 1937-p2\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;EEN PRAEHISTORISCH MONSTER werd ongeveer zeven jaar geleden door een Duitsch geleerde in Oost-Africa ontdekt. Na moeizamen arbeid is men er in geslaagd het skelet van den brachiosaurus op te bouwen, dat in &amp;#8216;n museum te Berlijn is opgesteld&lt;/p&gt;\n\" data-large-file=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg?w=542\" loading=\"lazy\" class=\"size-full wp-image-25277\" src=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg\" alt=\"\" width=\"480\" height=\"906\" srcset=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg?w=480&amp;h=906 480w, https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg?w=79&amp;h=150 79w, https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg?w=159&amp;h=300 159w, https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg 678w\" sizes=\"(max-width: 480px) 100vw, 480px\" /></a><p id=\"caption-attachment-25277\" class=\"wp-caption-text\">EEN PRAEHISTORISCH MONSTER werd ongeveer zeven jaar geleden door een Duitsch geleerde in Oost-Africa ontdekt. Na moeizamen arbeid is men er in geslaagd het skelet van den brachiosaurus op te bouwen, dat in &#8216;n museum te Berlijn is opgesteld</p></div>\n<p>Again, this is in Dutch, and the filename suggests that the source is a newspaper called <em>Maasbode</em> for 27 November 1937. The caption reads: &#8220;A PREHISTORIC MONSTER was discovered about seven years ago by a German scientist in East Africa. After arduous work, they succeeded in reconstructing the skeleton of the brachiosaurus, which is on display in a museum in Berlin.&#8221;</p>\n<p>I don&#8217;t know about you, but I feel it as a gut-punch when I see this animal, <a href=\"https://svpow.com/2024/11/17/behold-the-glory-of-the-lego-giraffatitan/\">which I deeply love</a>, against a backdrop of Nazi symbols. Gerhard Maier&#8217;s usually very detailed book <em>African Dinosaurs Unearthed</em> (Maier 2003) is uncharacteristically terse about this, saying of the unveiling only this (on page 267):</p>\n<blockquote><p>With swastika banners hanging from the walls as a backdrop, the exciting new exhibit opened in August 1937. A curious public, especially schoolchildren, formed long lines, waiting to see Berlin&#8217;s latest attraction.</p></blockquote>\n<p>I don&#8217;t know to what extent the rising Nazi regime used the brachiosaur mount as a PR event, an advertisement for their national superiority or what have you. (Has anyone written about this?)</p>\n<p>I was thinking about this because I get a daily notification of Wikipedia&#8217;s most-viewed article of the previous 24 hours. In recent times, it&#8217;s mostly been some article about bad news, or a person causing bad news. But a couple of days ago, it was <a href=\"https://en.wikipedia.org/wiki/Artemis_II\">Artemis II</a>, and I remarked on Mastodon how nice it was, just for one day, to have good news as the most read article. And someone quickly replied &#8220;I love space exploration, but having the Trump administration take credit for something like this is the last thing we need.&#8221;</p>\n<p>But here&#8217;s the thing. The Berlin brachiosaur mount has long outlived the Nazis (or at least the OG Nazis). And whatever the current moon mission achieves will long outlive the Trump administration.</p>\n<p>We don&#8217;t really write about politics on this blog. I like that about it, and I&#8217;m guessing most readers do as well. I&#8217;m not going to change that \u2014 the Web is\u00a0<em>full</em> of places to go and read about politics. But I do like the sense that scientific achievements are outside of the particular people who happen to be in power when they happen. The Berlin brachiosaur, and the Artemis II moon mission, are achievements for all humankind.</p>\n<h1>References</h1>\n<ul>\n<li>Maier, Gerhard. 2003. <em>African Dinosaurs Unearthed: The Tendaguru Expeditions</em>. Indiana University Press, Bloomington and Indianapolis, 380 p.</li>\n<li><a href=\"https://www.miketaylor.org.uk/dino/pubs/taylor-et-al-2025/TaylorEtAl2025--history-and-composition-of-the-Carnegie-Diplodocus.pdf\">Taylor, Michael P., Amy C. Henrici, Linsly J. Church, Ilja Nieuwland and Matthew C. Lamanna. 2025. <em>The history and composition of the Carnegie </em>Diplodocus. <em>Annals of the Carnegie Museum</em> <strong>91(1)</strong>:55\u201391. doi:10.2992/007.091.0104</a></li>\n</ul>\n<p>&nbsp;</p>\n<hr />\n<p><a href=\"https://doi.org/10.59350/9d5gk-fm764\">doi:10.59350/9d5gk-fm764</a></p>\n","doi":"https://doi.org/10.59350/9d5gk-fm764","funding_references":null,"guid":"https://svpow.com/?p=25267","id":"108db357-8eeb-461e-91b1-1bc0f0e1131f","image":"https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg","indexed":true,"indexed_at":1775230822,"language":"en","parent_doi":null,"published_at":1775225594,"reference":[{"unstructured":"Maier, Gerhard. 2003. African Dinosaurs Unearthed: The Tendaguru Expeditions. Indiana University Press, Bloomington and Indianapolis, 380 p."},{"id":"https://www.miketaylor.org.uk/dino/pubs/taylor-et-al-2025/TaylorEtAl2025--history-and-composition-of-the-Carnegie-Diplodocus.pdf","unstructured":"Taylor, Michael P., Amy C. Henrici, Linsly J. Church, Ilja Nieuwland and Matthew C. Lamanna. 2025. The history and composition of the Carnegie Diplodocus. Annals of the Carnegie Museum 91(1):55\u201391. https://doi.org/10.2992/007.091.0104"}],"registered_at":0,"relationships":[],"rid":"ya3r2-3sb74","status":"active","summary":"Back in 2010, I wrote about early artistic depictions of\n<em>\n Brachiosaurus\n</em>\n(including\n<em>\n Giraffatitan\n</em>\n). There, I wrote of the iconic mount MB.R.2181 (then HMN S II):  (See that post for the drawing.)  Recently the historian Ilja Nieuwland (one of the authors on our recent paper on the Carnegie\n<em>\n Diplodocus\n</em>\n, Taylor et al. 2025) sent me two photos of this unveiling, again with swastikas prominent in the background:\n<strong>\n EEN\n</strong>","tags":["Brachiosaurids","Giraffatitan","History"],"title":"The Nazi sauropod \u2014 <i>Giraffatitan</i> (= \u201c<i>Brachiosaurus</i>\u201c) <i>brancai</i> in 1937","updated_at":1775227439,"url":"https://svpow.com/2026/04/03/the-nazi-sauropod-giraffatitan-brachiosaurus-brancai-in-1937/","version":"v1"}},{"document":{"abstract":"Unsere monatliche Rubrik zu aktuellen Veranstaltungen rund um Open Research.","archive_url":null,"authors":[{"contributor_roles":[],"family":"Fischer","given":"Georg","url":"https://orcid.org/0000-0001-5620-5759"}],"blog":{"archive_collection":22141,"archive_host":null,"archive_prefix":"https://wayback.archive-it.org/22141/20231105110201/","archive_timestamps":[20231105110201,20240505180741,20241105110207,20250505110216],"authors":null,"canonical_url":null,"category":"otherSocialSciences","community_id":"52aefd81-f405-4349-b080-754395a5d8b2","created_at":1694476800,"current_feed_url":null,"description":null,"doi_as_guid":false,"favicon":"https://rogue-scholar.org/api/communities/52aefd81-f405-4349-b080-754395a5d8b2/logo","feed_format":"application/atom+xml","feed_url":"https://blogs.fu-berlin.de/open-research-berlin/feed/atom/","filter":null,"funding":null,"generator":"WordPress","generator_raw":"WordPress 6.0","home_page_url":"https://blogs.fu-berlin.de/open-research-berlin/","id":"575d6b2d-c555-4fc7-99fb-055a400f9163","indexed":false,"issn":null,"language":"de","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":"https://berlin.social/@openaccess","prefix":"10.59350","registered_at":1729602098,"relative_url":null,"ror":null,"secure":true,"slug":"oaberlin","status":"active","subfield":"1802","subfield_validated":null,"title":"Open Research Office Berlin","updated_at":1775375524.800675,"use_api":true,"use_mastodon":true,"user_id":"383c62ed-0cf6-4dc7-a56c-5b0104f7f10a"},"blog_name":"Open Research Office Berlin","blog_slug":"oaberlin","content_html":"<p>Unsere monatliche Rubrik zu aktuellen Veranstaltungen rund um Open Research.</p>\n<p><!--more--></p>\n<pre>Anmerkung zu dieser Rubrik: Das Open Research Office Berlin erstellt monatlich eine \u00dcbersicht \u00fcber Termine und Veranstaltungen zu Open Access und Open Research in Berlin bzw. an Berliner Einrichtungen. Der Fokus liegt dabei auf unseren Partnereinrichtungen und auf Veranstaltungen, die sich an die \u00d6ffentlichkeit richten bzw. die offen sind f\u00fcr Angeh\u00f6rige der Wissenschafts- und Kulturerbeeinrichtungen in Berlin. Wir erg\u00e4nzen diese Liste gerne (Info bitte via <a href=\"mailto:team@open-research-berlin.de\">Mail</a> ans OROB).</pre>\n<h2>31. M\u00e4rz, Webarchivierung f\u00fcr viele: Expertise und Infrastruktur gemeinschaftlich aufbauen, Berlin</h2>\n<p><em>Jeden Tag geht ein Teil unseres digitalen Kulturerbes unwiederbringlich verloren \u2013 Netzliteratur, Websites, Social-Media-Beitr\u00e4ge und viele weitere Online-Inhalte verschwinden, ohne dass wir es bemerken. Dabei gibt es l\u00e4ngst Wege, dieses Erbe zu bewahren: Gemeinsam mit den Expert:innen Claus-Michael Schlesinger und Mona Ulrich hat die Zentral- und Landesbibliothek Berlin (ZLB) in den letzten zwei Jahren Workshops zu den Tools von Webrecorder veranstaltet, mit denen man Webseiten archivieren kann. Um diese Tools f\u00fcr umf\u00e4ngliche Archivierungsvorhaben zu nutzen, braucht es Ressourcen \u2013 zum Beispiel IT-Ressourcen, die nur sehr wenigen Institutionen zur Verf\u00fcgung stehen. Workshop-Teilnehmer:innen aus kleineren Institutionen und Projekten fragten sich daher immer wieder, wie sie sie langfristig nutzen k\u00f6nnen.</em></p>\n<ul>\n<li><strong>Termin: </strong>31.03.2026, 16:00 bis 18:00 Uhr, Technologiestiftung Berlin, 4. Etage, Grunewaldstr. 61-62, 10825 Berlin</li>\n<li><strong>Organisiert von</strong>: kulturBdigital</li>\n<li>[<a href=\"https://www.kultur-b-digital.de/webarchivierung-fuer-viele-expertise-und-infrastruktur-gemeinschaftlich-aufbauen/\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>13. April, Machine-Learning-Montag I: What the Hype? Eine Einf\u00fchrung in die Grundlagen des maschinellen Lernens f\u00fcr Kulturerbeinstitutionen, online</h2>\n<p><em>Maschinelles Lernen (ML) oder auch \u201eK\u00fcnstliche Intelligenz\u201c (KI) ist weiterhin das gro\u00dfe Thema in fast allen Bereichen des menschlichen Arbeitens. Aber was offerieren diese Werkzeuge abseits des gro\u00dfen Hypes von \u201eschneller, gr\u00f6\u00dfer, besser, einfacher und sch\u00f6ner\u201c und dem damit prognostizierten Durchdringen aller Lebensbereiche?\u00a0Diese digiS-Einf\u00fchrung hat zum Ziel, Nicht-Expert:innen im maschinellen Lernen das n\u00f6tige Hintergrundwissen zu vermitteln, um sich in diesem Diskurs zurechtzufinden und Hype von sinnvoller Anwendung unterscheiden zu k\u00f6nnen.</em></p>\n<ul>\n<li><strong>Termin: </strong>13.04.2026, 10:00 bis 12:30 Uhr</li>\n<li><strong>Organisiert von</strong>: digiS; Referent*innen: Xenia Kitaeva und Marco Klindt (digiS)</li>\n<li>[<a href=\"https://www.digis-berlin.de/machine-learning-montag-am-13-april-what-the-hype/\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>14. April, FDM@BUA: Offboarding Template als Grundlage f\u00fcr Daten- und Wissens\u00fcbergabe in Projekten, online</h2>\n<p><em>Dr. Stefanie Seltmann, Research Data Steward am Berlin Institute of Health, stellt vor, wie sich der Transfer von Forschungsdaten und projektbezogenem Wissen beim Ausscheiden von Projektmitgliedern systematisch gestalten l\u00e4sst.\u00a0Im Mittelpunkt steht ein entwickeltes Offboarding-Template, das als strukturierte Grundlage f\u00fcr Daten- und Wissens\u00fcbergabe dient. Ziel ist es, die Kontinuit\u00e4t in Forschungsprojekten zu sichern, die Qualit\u00e4t der Dokumentation zu verbessern und das Risiko von Datenverlusten zu reduzieren. Das Template ist so konzipiert, dass es flexibel an unterschiedliche Forschungskontexte angepasst und in bestehende institutionelle FDM-Prozesse integriert werden kann.</em></p>\n<ul>\n<li><strong>Termin: </strong>14.04.2026, 10:00 bis 11:30 Uhr, online via Webex</li>\n<li><strong>Organisiert von</strong>: Berlin University Alliance</li>\n<li>[<a href=\"https://www.berlin-university-alliance.de/commitments/sharing-resources/shared-resources-center/CARDS-FDM/cards_events/2026-04-14_offboarding.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>15. April, Datenmanagementpl\u00e4ne und der RDMO-Service von NFDI4Culture, online</h2>\n<p><em>Sie sind digital k\u00fcnstlerisch oder gestalterisch t\u00e4tig und wollen die bei Ihrer Arbeit anfallenden Daten so managen, dass andere damit arbeiten k\u00f6nnen? Sie sind eine Hochschuleinrichtung, die Daten aus studentischen Arbeiten oder wissenschaftlichen Projekten im Bereich der K\u00fcnste entgegennimmt?\u00a0Der Research Data Management Organiser (RDMO) ist ein flexibles und kostenfreies Werkzeug, das Sie beim Management Ihrer Daten und bei der Planung von digitalen Projekten aller Art unterst\u00fctzen kann.</em></p>\n<ul>\n<li><strong>Termin: </strong>15.04.2026, 15:00 bis 17:00 Uhr, online via Webex</li>\n<li><strong>Organisiert von</strong>: Fokusgruppe OA-K\u00fcnste, open-access.network</li>\n<li>[<a href=\"https://open-access.network/vernetzen/digitale-fokusgruppen/fokusgruppe-oa-kuenste#c28672\">Information</a>]</li>\n</ul>\n<h2>16.-30. April, Open Science Hardware Workshops, TU Berlin</h2>\n<p><em>Open Science Hardware (OSH) enables researchers to design, prototype, document, and share custom research tools in a transparent and reproducible way. It is often facilitated by the use of digital manufacturing, which combines computer aided design and computer aided manufacturing software with machines like 3d printers, laser cutter and CNC milling machines.\u00a0In April, several introductory workshops will invite life science researchers and technical staff including the Neurosciene community to explore how digital fabrication and structured documentation can strengthen research practice \u2014 from cost-efficient prototyping, publishable hardware to the strengthening of research communities. No prior experience required.</em></p>\n<ul>\n<li><strong>Termin: </strong>16. bis 30.04.2026, Universit\u00e4tsbibliothek der TU Berlin bzw. Campus der Humboldt-Universit\u00e4t zu Berlin</li>\n<li><strong>Organisiert von</strong>: Berlin University Alliance</li>\n<li>[<a href=\"https://events.tu-berlin.de/de/events/019d2fd3-e17f-73fa-be53-5f672d77b504?scopeFilter%5Bpublicly_visible%5D=true&amp;scopeFilter%5Bhidden_in_lists%5D=false&amp;scopeFilter%5Bended%5D=false&amp;page%5Bnumber%5D=1&amp;page%5Bsize%5D=50&amp;page%5Btotal%5D=9&amp;sort%5B0%5D=-pinned&amp;sort%5B1%5D=start_at&amp;sort%5B2%5D=title\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>20. April, Workshop Open Access in und f\u00fcr Museen, Europa-Universit\u00e4t Frankfurt/Oder</h2>\n<p><em>Anhand von mehreren Anwendungsf\u00e4llen wollen wir kooperative Ans\u00e4tze f\u00fcr Open Access und Open Culture an der Schnittstelle von Kultureinrichtungen, Hochschulen und Open-Access-Publikationsunterst\u00fctzungsinfrastrukturen explorieren und die Entwicklung eines konzeptionellen Rahmens f\u00fcr m\u00f6gliche L\u00f6sungen vorbereiten.\u00a0Die Veranstaltung richtet sich an in diesen Bereichen t\u00e4tigen Professionals.</em></p>\n<ul>\n<li><strong>Termin: </strong>20.04.2026, Europa-Universit\u00e4t Frankfurt/Oder</li>\n<li><strong>Organisiert von</strong>: Europa-Universit\u00e4t Viadrina, Stiftung Kleist-Museum Frankfurt (Oder) und Vernetzungs- und Kompetenzstelle Open Access Brandenburg (VuK)</li>\n<li>[<a href=\"https://open-access-brandenburg.de/workshop-open-access-in-und-fuer-museen-euv_2026/\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>20. April, Wikidata f\u00fcr die Sammlungserschlie\u00dfung, online</h2>\n<p><em><a href=\"https://www.wikidata.org/wiki/Wikidata:Main_Page\">Wikidata</a> ist ein gro\u00dfer, generischer, offener, frei editierbarer Wissensgraph, der Informationen buchst\u00e4blich \u00fcber Gott (<a href=\"http://www.wikidata.org/entity/Q190\">Q190</a>) und die Welt (<a href=\"http://www.wikidata.org/entity/Q2\">Q2</a>) vorh\u00e4lt \u2013 sowie \u00fcber mehr als 120 Millionen andere Entit\u00e4ten (<a href=\"https://www.wikidata.org/wiki/Wikidata:Statistics\">https://www.wikidata.org/wiki/Wikidata:Statistics</a>). F\u00fcr GLAM-Einrichtungen ist das Potential von Wikidata erheblich: In Wikidata lassen sich Informationen zu Objekten, Personen, Orten, Bauwerken und vielem mehr pflegen, und es k\u00f6nnen bei Bedarf neue Datens\u00e4tze erstellt werden. Wikidata ist somit als flexibler ad-hoc-Normdatengenerator eine optimale Erg\u00e4nzung zur Gemeinsamen Normdatei (GND). [&#8230;]\u00a0\u00dcber all diese Dinge werden wir im digiS-Workshop \u201eWikidata f\u00fcr die Sammlungserschlie\u00dfung\u201c sprechen, um auf diese Weise das Potenzial von Wikidata f\u00fcr GLAM-Institutionen und speziell f\u00fcr die Sammlungsdokumentation genauer in den Blick zu nehmen. Selbstverst\u00e4ndlich wird es Raum f\u00fcr Fragen und Diskussionen geben, eine konkrete Einf\u00fchrung in die praktische Arbeit mit Wikidata und den angesprochenen Tools ist f\u00fcr diese Veranstaltung jedoch nicht vorgesehen.</em></p>\n<ul>\n<li><strong>Termin: </strong>20.04.2026, 10:00 bis 11:30 Uhr, online</li>\n<li><strong>Organisiert von</strong>: digiS; Referent: Alexander Winkler (digiS)</li>\n<li>[<a href=\"https://www.digis-berlin.de/workshop-wikidata-fuer-die-sammlungserschliessung-am-20-04/\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>22.-23. April, Train-the-Trainer Forschungsdatenmanagement, FU Berlin</h2>\n<div class=\"editor-content box-event-doc-abstract\">\n<p><em>Kompetenzen im Umgang mit Forschungsdaten sind eine zentrale Grundvoraussetzung f\u00fcr moderne Wissenschaft: Ohne eine gute Dokumentation und Nachhaltung gibt es keine FAIR (Findable, Accessible, Interoperable, Re-usable) Daten. Um diese Kompetenzen an Forschende in vielen F\u00e4chern und Institutionen der Berlin University Alliance zu vermitteln, braucht es ausgebildete Trainer*innen. Das Projekt\u00a0<a href=\"https://www.berlin-university-alliance.de/commitments/sharing-resources/shared-resources-center/CARDS-FDM/index.html\">Collaboratively Advancing Research Data Support</a><a href=\"https://www.berlin-university-alliance.de/commitments/sharing-resources/shared-resources-center/CARDS-FDM/index.html\">(CARDS)</a>bietet daher im April 2026 einen\u00a0<a href=\"https://rti-studio.com/train-the-trainer-workshop-zum-thema-forschungsdatenmanagement/\">Train-the-Trainer Workshop</a>\u00a0zu Forschungsdatenmanagement mit\u00a0<a href=\"https://rti-studio.com/ueber-mich/\">Dr. Katarzyna Biernacka</a>\u00a0an.\u00a0Nach dem zweit\u00e4gigen Workshop werden die Teilnehmenden \u00fcber die notwendigen F\u00e4higkeiten verf\u00fcgen, um eigene Trainings und Beratungen zum Forschungsdatenmanagement in ihrer Einrichtung durchzuf\u00fchren.</em></p>\n</div>\n<ul>\n<li><strong>Termin: </strong>22-23.04.2026, Rostlaube an der Freien Universit\u00e4t Berlin</li>\n<li><strong>Organisiert von</strong>: Berlin University Alliance; Referentin: Katarzyna Biernacka</li>\n<li>[<a href=\"https://www.fu-berlin.de/sites/forschungsdatenmanagement/veranstaltungen/2026/2026-04-22-23-FDMatBUA-Workshop-T-t-T-en-KB.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>23. April, Magnifying Open Science: Insights from the BUA Participatory Research Map, online</h2>\n<p><em>Open Engagement with societal stakeholders is one of the four pillars of the UNESCO Recommendation on Open Science. The Berlin University Alliance Participatory Research Map maps over 90 projects in which researchers collaborate with societal stakeholders. With the Participatory Research Map, we not only want to increase the visibility of participatory research but also explore how different stakeholders and research modes contribute to open science and open knowledge generation.\u00a0In this event, we will present the results of our analysis and discuss with participants how we can collaboratively contribute to magnifying openness in engaging with societal stakeholders.</em></p>\n<ul>\n<li><strong>Termin: </strong>23.04.2026, online</li>\n<li><strong>Organisiert von</strong>: BUA funded project &#8222;Magnifying Open Science&#8220; (Open Research Office Berlin)</li>\n<li>[<a href=\"https://blogs.fu-berlin.de/open-research-berlin/2025/12/18/save-the-date-for-online-event-series-magnifying-open-science/\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>27. April, Machine Learning Montag II: KI und Recht f\u00fcr Kulturerbe-Einrichtungen &#8211; Vortrag und Q&amp;A, online</h2>\n<p><em> F\u00fcr viele Kulturerbe-Einrichtungen stellt sich die Frage, wie der Einsatz von KI in unterschiedlichen Konstellationen rechtlich zu bewerten ist. Da bei der rechtlichen Bewertung noch viele Unsicherheiten bestehen, soll dieser Workshop den aktuellen Stand der Rechtsprechung sowie auch der Gesetzgebung in Hinblick auf KI erl\u00e4utern. Darauf aufbauend wird die Rechtslage bei verschiedenen Anwendungsbereichen in Kulturerbe-Einrichtungen untersucht.</em></p>\n<ul>\n<li><strong>Termin: </strong>27.04.2026, 10:00 bis 12:30 Uhr, online via Zoom</li>\n<li><strong>Organisiert von</strong>: digiS; Referent: Paul Klimpel (iRights.Law)</li>\n<li>[<a href=\"https://www.digis-berlin.de/machine-learning-montag-ii-am-27-april-ki-und-recht-fuer-kulturerbe-einrichtungen-vortrag-und-qa/\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>28. April, Was bringt Open Access meiner Forschung wirklich? &#8211; Ein Realit\u00e4tscheck, online</h2>\n<p><em>Was bedeutet es, im Open Access zu ver\u00f6ffentlichen? Wie finde ich ein geeignetes Open-Access-Journal f\u00fcr meinen Artikel? Welche offene Lizenz sollte ich verwenden? Diese und \u00e4hnliche Fragen werden in der von der Bibliothek organisierten Reihe &#8222;Open Access verstehen&#8220; beantwortet. Die Beitr\u00e4ge werden in Kooperation mit der Hochschulbibliothek der ASH und der BHT Berlin organisiert.\u00a0Die Vortr\u00e4ge finden im Online-Format statt und sind f\u00fcr alle offen. Eine Anmeldung ist nicht erforderlich.</em></p>\n<ul>\n<li><strong>Termin: </strong>28.04.2026, 11:00 bis 11:45 Uhr, online</li>\n<li><strong>Organisiert von</strong>: HTW, ASH und BHT Berlin</li>\n<li>[<a href=\"https://events.htw-berlin.de/forschung/open-access-verstehen/\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>29. April, Workshop Research Data Management in a nutshell, online</h2>\n<p><em>Almost every research project generates or collects digital research data. Researchers face the challenge of not only managing and documenting the data, but also preserving it and making it available for reuse. This online seminar offers a general introduction to essential aspects of research data management.</em></p>\n<ul>\n<li><strong>Termin: </strong>29.04.2026, 09:30 bis 12:00 Uhr, online</li>\n<li><strong>Organisiert von</strong>: Freie Universit\u00e4t Berlin</li>\n<li>[<a href=\"https://www.fu-berlin.de/sites/forschungsdatenmanagement/veranstaltungen/2026/2026-04-29-Workshop-RDM-in-a-nutshell-en-DM.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>30. April, #UPDATE BIB: Open Access zu wissenschaftlichen Publikationen &#8211; Aktuelle Herausforderungen f\u00fcr Bibliotheken, online</h2>\n<p><em>Das Seminar bietet eine \u00fcbersichtliche Einf\u00fchrung in den Stand von Open Access an Bibliotheken und stellt die wichtigsten aktuellen Rahmenbedingungen und Entwicklungen vor. Die Teilnehmer*innen lernen die Grundbegriffe von Open Access kennen und verstehen die technischen, rechtlichen und politischen Rahmenbedingungen freier Verf\u00fcgbarkeit von wissenschaftlichen Publikationen. Die Entwicklungen zu Open Access werden im mit Blick auf verschiedene bibliothekarische Handlungsfelder kontextualisiert, wie Erwerbung/Zugang, Informationskompetenz, Forschungsunterst\u00fctzung, technische Infrastrukturen.</em></p>\n<ul>\n<li><strong>Termin: </strong>30.04.2026, 10:00 bis 12:30 Uhr, online</li>\n<li><strong>Organisiert von</strong>: FU Berlin; Referentin: Christina Riesenweber (HU Berlin)</li>\n<li>[<a href=\"https://veranstaltung.weiterbildung.fu-berlin.de/Veranstaltung/cmx64801e98a27ed.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>30. April, Open Access meets KI \u2013 L\u00f6sungsans\u00e4tze durch CC-Signals, online</h2>\n<p><em>Um <a href=\"https://creativecommons.org/2025/06/25/introducing-cc-signals-a-new-social-contract-for-the-age-of-ai/\">\u201eoffenes Wissen zu bewahren, [\u2026 und] verantwortungsbewusstes KI-Verhalten [zu] f\u00f6rdern, ohne dabei Innovationen einzuschr\u00e4nken\u201c</a>, hat Creative Commons vor kurzem ein neues Modell vorgestellt: CC Signals. Rechteinhaber*innen sollen so die M\u00f6glichkeit haben, zu signalisieren, unter welchen Voraussetzungen ihre Inhalte von KI-Systemen genutzt werden d\u00fcrfen.\u00a0In unserem n\u00e4chsten ENABLE!-Werkstatt-Gespr\u00e4ch wollen wir uns CC Signals n\u00e4her ansehen und mit unseren Referent*innen diskutieren, wie dieses Modell funktioniert und was wir davon erwarten k\u00f6nnen.</em></p>\n<ul>\n<li><strong>Termin: </strong>30.04.2026, 16:00 bis 17:00 Uhr, online</li>\n<li><strong>Organisiert von</strong>: ENABLE! Community</li>\n<li>[<a href=\"https://enable-oa.org/\">Information</a>]</li>\n</ul>\n<p>weiter zu <a href=\"https://blogs.fu-berlin.de/open-research-berlin/2026/04/04/veranstaltungshinweise-mai-2026/\">Mai 2026</a></p>\n","doi":"https://doi.org/10.59350/s4xat-69z93","funding_references":null,"guid":"https://blogs.fu-berlin.de/open-research-berlin/?p=4021","id":"6a3635b0-a652-448e-addb-627b5bf812d3","image":null,"indexed":true,"indexed_at":1775300235,"language":"de","parent_doi":null,"published_at":1775206767,"reference":[],"registered_at":0,"relationships":[],"rid":"vtt21-qgh66","status":"active","summary":"Unsere monatliche Rubrik zu aktuellen Veranstaltungen rund um Open Research. Anmerkung zu dieser Rubrik: Das Open Research Office Berlin erstellt monatlich eine \u00dcbersicht \u00fcber Termine und Veranstaltungen zu Open Access und Open Research in Berlin bzw. an Berliner Einrichtungen. Der Fokus liegt dabei auf unseren Partnereinrichtungen und auf Veranstaltungen, die sich an die \u00d6ffentlichkeit richten bzw.","tags":["Veranstaltungshinweise"],"title":"Veranstaltungshinweise April 2026","updated_at":1775300225,"url":"https://blogs.fu-berlin.de/open-research-berlin/2026/04/03/veranstaltungshinweise-april-2026/","version":"v1"}},{"document":{"abstract":"I am writing this blog with a heavy heart.\u00a0 After 21 years and 2,000 blogs I have taken the decision to \u2018rest\u2019 the website after Easter.\u00a0 My reasons are varied.","archive_url":null,"authors":[{"contributor_roles":[],"family":"Akass","given":"Kim"}],"blog":{"archive_collection":null,"archive_host":null,"archive_prefix":null,"archive_timestamps":null,"authors":null,"canonical_url":null,"category":"mediaAndCommunications","community_id":"d0965544-4413-4b89-aedb-36ae2153c1ac","created_at":1730394736,"current_feed_url":null,"description":"Television Studies Blog","doi_as_guid":false,"favicon":"https://rogue-scholar.org/api/communities/d0965544-4413-4b89-aedb-36ae2153c1ac/logo","feed_format":"application/atom+xml","feed_url":"https://cstonline.net/feed/atom/","filter":null,"funding":null,"generator":"WordPress","generator_raw":"WordPress 6.7.1","home_page_url":"https://cstonline.net/","id":"3e29853c-05ee-479f-aa7d-867ff6dce1e9","indexed":true,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":0,"relative_url":null,"ror":null,"secure":true,"slug":"cstonline","status":"active","subfield":"3315","subfield_validated":null,"title":"CST Online","updated_at":1775375445.954459,"use_api":true,"use_mastodon":false,"user_id":"80307be4-0a5d-4378-a38f-91852e38c1d8"},"blog_name":"CST Online","blog_slug":"cstonline","content_html":"<p style=\"font-weight: 400;\">I am writing this blog with a heavy heart.\u00a0 After 21 years and 2,000 blogs I have taken the decision to \u2018rest\u2019 the website after Easter.\u00a0 My reasons are varied.\u00a0 Since we started this iteration of CSTonline, with my gripe about <a href=\"https://cstonline.net/sky-exclusivity-weve-been-here-before-by-kim-akass/\">Sky Exclusivity </a>and John Ellis\u2019s <a href=\"https://cstonline.net/letter-from-america-by-john-ellis-3/\">letter from America</a>, we have had a steady stream of blogs.\u00a0\u00a0 Some weeks we were inundated and other weeks not so, but we have always received something from someone.</p>\n<p style=\"font-weight: 400;\">The idea of the website was to provide a public, open access forum, for the dissemination of writing about TV, reports from funded projects and just general \u2018this is what I saw this week\u2019.\u00a0 We always said that TV demanded instant responses, we couldn\u2019t always wait for publishers to print our thoughts \u2013 the promise of the internet meant that we could receive a blog and have it out there for reading within a week.\u00a0 Heady days.</p>\n<p style=\"font-weight: 400;\">The problem is that, over the past few years, Higher Education has been undergoing some pretty seismic changes.\u00a0 Redundancies (voluntary or otherwise), lack of funding, heavier workloads for remaining staff and increased demands from students have meant that everyone has less and less time to devote to writing that doesn\u2019t bring some kind of institutional reward.\u00a0 It makes sense that, in this case, with families to attend, books to write and students to teach, coupled with the demands of REF (or the tenure track) and a general sense of overwhelm has resulted in no blogs.</p>\n<p style=\"font-weight: 400;\">Thanks to stalwart bloggers, and a team of committed volunteers, we have managed to keep the website alive but, it has become clear that something has to change.\u00a0 Podcasts are the new (old) blogs and, despite our attempts to keep everyone interested, it is time to admit that we can no longer proceed without regular content.</p>\n<p style=\"font-weight: 400;\">We <a href=\"https://cstonline.net/cst-online-relaunch-by-kim-akass/\">re-launched CSTonline</a> in its present state on 19 February 2011.\u00a0 Early days were exciting and busy.\u00a0 My re-launch blog announced that \u2018We are retaining David Lavery\u2019s column <em>Telegenic</em>, with his insightful and humorous look at all things televisual.\u00a0\u00a0<em>In Primetime</em>\u00a0stays and so do the regularly updated sections \u2013 Calls For Papers, upcoming conferences, workshops and study days (listed monthly), postgraduate funding the (very) occasional job vacancy and my favourite TV story of the week (or sometimes day) complete with moving pictures.\u2019</p>\n<p style=\"font-weight: 400;\">Even someone as prolific as David Lavery, however, found it difficult to keep up with blogging demands and called \u2018Telegenic\u2019 quits after his blog on <em><a href=\"https://cstonline.net/the-state-of-the-american-sitcom-v-modern-family-by-david-lavery/\">Modern Family</a></em>.\u00a0 He <a href=\"https://cstonline.net/?s=Lavery\">continued to blog for us</a> until he sadly died on 30 August 2016.\u00a0 <a href=\"https://cstonline.net/?s=Pixley\">Andrew Pixley</a> has been one of our more prolific bloggers as has <a href=\"https://cstonline.net/?s=Beattie\">Melissa Beattie</a>.\u00a0 I have <a href=\"https://cstonline.net/?s=Akass\">written a few over the years</a> as has the aforementioned <a href=\"https://cstonline.net/?s=Ellis\">John Ellis</a>.\u00a0 <a href=\"https://cstonline.net/?s=Weissmann\">Elke Weissmann</a> has been prolific as well as editing and managing ECREA\u2019s contributions (for which I am grateful). \u00a0We have featured blogs from all over the world about subjects relevant to TV from Public Service Broadcasting to commercial dramas, streaming, cable, networks, social media \u2026 the list goes on.</p>\n<p style=\"font-weight: 400;\">I am sure that the community has much more to say about the state of television.\u00a0 Streaming has up-ended the industry, as has the introduction of AI, the writer\u2019s strikes and the continued (and continual) attack on the BBC. There is always something to say but, unfortunately, not always the time to say it.</p>\n<p style=\"font-weight: 400;\">I continue to be passionate about TV, I love watching, reading about and writing about television.\u00a0 I am sure there are people out there that want to blog, and we will always publish if someone wants to submit something.\u00a0 However, I reluctantly admit that, if I can\u2019t find the time to write a blog, why should I expect others to?</p>\n<p style=\"font-weight: 400;\">I am so very grateful for the amazing support I have had over the years.\u00a0 Debra Ramsay, Lisa Kelly, Sarah Lahm and Ben Keightly have served faithfully (if I have forgotten someone I apologise).\u00a0 I have received institutional support from Royal Holloway and the University of Hertfordshire.\u00a0 The editorial board at <em>Critical Studies in Television</em> have been amazing.\u00a0 This website would never have got off the ground without mediacitizens who freely gave of designers and web hosting.\u00a0 My most grateful thanks go to Tobias Steiner who continues to work hard on the back end of the website.\u00a0 All of this time and hard work has been freely and generously given.</p>\n<p style=\"font-weight: 400;\">The website will remain online \u2013 there is a wealth of television history contained in its massive archive and I do hope you will continue to read and engage with it.</p>\n<p style=\"font-weight: 400;\">But, until the next iteration of the website, we are reluctantly calling time on this endeavour.</p>\n<div style=\"width: 480px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-15775-1\" width=\"480\" height=\"360\" preload=\"metadata\" controls=\"controls\"><source type=\"video/mp4\" src=\"https://cstonline.net/wp-content/uploads/2026/04/YTDown.com_YouTube_Bugs-Bunny-That-s-All-Folks_Media_HeERupuicHE_001_360p.mp4?_=1\" /><a href=\"https://cstonline.net/wp-content/uploads/2026/04/YTDown.com_YouTube_Bugs-Bunny-That-s-All-Folks_Media_HeERupuicHE_001_360p.mp4\">https://cstonline.net/wp-content/uploads/2026/04/YTDown.com_YouTube_Bugs-Bunny-That-s-All-Folks_Media_HeERupuicHE_001_360p.mp4</a></video></div>\n","doi":"https://doi.org/10.59350/149p8-3jh82","funding_references":null,"guid":"https://cstonline.net/?p=15775","id":"37b623ec-0fd6-45c1-b384-536b7142f175","image":"https://cstonline.net/wp-content/uploads/2026/04/Past-Future-image-2021-1024x421-1.jpg","indexed":true,"indexed_at":1775205403,"language":"en","parent_doi":null,"published_at":1775203941,"reference":[],"registered_at":0,"relationships":[],"rid":"c3h28-yep51","status":"active","summary":"I am writing this blog with a heavy heart.\u00a0 After 21 years and 2,000 blogs I have taken the decision to \u2018rest\u2019 the website after Easter.\u00a0 My reasons are varied.\u00a0 Since we started this iteration of CSTonline, with my gripe about Sky Exclusivity and John Ellis\u2019s letter from America, we have had a steady stream of blogs.","tags":["Blogs"],"title":"CSTonline by Kim Akass","updated_at":1775204127,"url":"https://cstonline.net/cstonline-by-kim-akass/","version":"v1"}},{"document":{"abstract":"2 days with up to 100+ papers in 30+ panels, 4 keynote events, lunches and refreshment breaks for both days, optional self-funded conference meal, student rates (and lottery free spaces) and campus accommodation available \u2013 Talbot Campus \u2013 Bournemouth University DEADLINE FOR SUBMISSION 3 May 2026 The Centre for the Study of Conflict, Emotion and [\u2026]","archive_url":null,"authors":[{"contributor_roles":[],"family":"Akass","given":"Kim"}],"blog":{"archive_collection":null,"archive_host":null,"archive_prefix":null,"archive_timestamps":null,"authors":null,"canonical_url":null,"category":"mediaAndCommunications","community_id":"d0965544-4413-4b89-aedb-36ae2153c1ac","created_at":1730394736,"current_feed_url":null,"description":"Television Studies Blog","doi_as_guid":false,"favicon":"https://rogue-scholar.org/api/communities/d0965544-4413-4b89-aedb-36ae2153c1ac/logo","feed_format":"application/atom+xml","feed_url":"https://cstonline.net/feed/atom/","filter":null,"funding":null,"generator":"WordPress","generator_raw":"WordPress 6.7.1","home_page_url":"https://cstonline.net/","id":"3e29853c-05ee-479f-aa7d-867ff6dce1e9","indexed":true,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":0,"relative_url":null,"ror":null,"secure":true,"slug":"cstonline","status":"active","subfield":"3315","subfield_validated":null,"title":"CST Online","updated_at":1775375445.954459,"use_api":true,"use_mastodon":false,"user_id":"80307be4-0a5d-4378-a38f-91852e38c1d8"},"blog_name":"CST Online","blog_slug":"cstonline","content_html":"<div><b>2 days with up to 100+ papers in 30+ panels, 4 keynote events, lunches and refreshment </b><strong>breaks for both days, optional self-funded conference meal, student rates (and lottery free spaces) and campus accommodation available \u2013 </strong><a href=\"https://www.bournemouth.ac.uk/why-bu/facilities-campuses/talbot-campus\"><strong>Talbot Campus \u2013 Bournemouth University</strong></a></div>\n<p style=\"font-weight: 400;\"><strong>DEADLINE FOR SUBMISSION 3 May 2026</strong></p>\n<p style=\"font-weight: 400;\"><a href=\"https://www.bournemouth.ac.uk/research/centres-institutes/centre-study-conflict-emotion-social-justice\">The Centre for the Study of Conflict, Emotion and Social Justice</a>, in the Faculty of Media, Science and Technology at Bournemouth University invites scholarly and practice-based proposals for an in-person conference on media and emotion.</p>\n<p style=\"font-weight: 400;\">As neuroscientist Raymond J. Dolan observes, \u201cemotion provides the principal currency in human relationships as well as the motivational force for what is best and worst in human behaviour\u201d (2002). Within contemporary media production and consumption, emotion often binds us together, at times appearing as a language of intimacy, vulnerability and reflexivity, and at times appearing as a language of division, entitlement and exclusion. Therefore, emotions expressed and evoked through media have attracted sustained scholarly attention across a wide range of disciplines, spanning the humanities, the social sciences, and the natural sciences.</p>\n<p style=\"font-weight: 400;\">Notably, in the era of populism, political leaders deploy emotionally charged narratives, in offering simple answers to complex problems, often with minority groups as the targets of division and abjection.\u00a0Also, techniques of production and representation deploy the language of emotion, in aesthetic and narrative-oriented contexts, and theoretical work is constantly evolving.</p>\n<p style=\"font-weight: 400;\">As Laura U. Marks discussed in her landmark text <em>The Skin of Film</em> (1999), contemporary media offers a creative space for issues of touch, memory and hegemonic challenge, invigorated through a media-based emotional landscape. At the same time Sara Ahmed has theorised in <em>The Cultural Politics of Emotion</em> (2014), that \u2018affective economies\u2019 and \u2018sticky associations\u2019 shape our phenomenological landscapes, defining boundaries for minority voices as much as offering spaces for resistance and reinvention.</p>\n<p style=\"font-weight: 400;\">We invite scholars from any related disciplines and industry practitioners to participate in this conference and share critical perspectives on media and emotion, drawing on their theoretical models, research trajectories or practice-based environments. Our keynote speakers, Kristyn Gorton, Kim Akass and Lisa Blackman, and our Industry keynote panel led by Christa van Raalte (see below), will offer insights into media affects and their intersection with scholarly and practice-based approaches.</p>\n<p style=\"font-weight: 400;\"><strong>AREAS OF INQUIRY (not exhaustive)</strong></p>\n<table style=\"font-weight: 400;\" width=\"662\">\n<tbody>\n<tr>\n<td width=\"662\">\u25cf\u00a0\u00a0\u00a0\u00a0\u00a0 <strong>Emotional states</strong>, such as anger, anomie, confusion, compulsion, contempt, disgust, dissociation, fear, happiness, indifference, joy, longing, nihilism, rage, regret, shame, surprise.</td>\n</tr>\n<tr>\n<td width=\"662\">\u25cf\u00a0\u00a0\u00a0\u00a0\u00a0 <strong>Practice oriented contexts</strong>, such as broadcasting, cinematography, directing, distribution, drama, documentary, editing, journalism, liveness, marketing, streaming, social media, touchscreen technology, workplace.</td>\n</tr>\n<tr>\n<td width=\"662\">\u25cf\u00a0\u00a0\u00a0\u00a0\u00a0 <strong>Political and social worlds</strong>, such as Brexit, Covid-19, citizenship, community, Gaza, disability, ethnicity, inclusivity, nationality, neoliberalism, race, religion, Sudan, Thatcherism, Trump, Ukraine.</p>\n<p>\u25cf\u00a0\u00a0\u00a0\u00a0\u00a0 <strong>Theoretical models</strong>, relating to concepts, such as affect, alienation, behaviour, cognition, community, colonialism, consumption, embodiment, gender, genre, identity, inclusivity, memory, minority, nostalgia, orientalism, otherness, pastiche, post-colonialism, phenomenology, reasoning, regulation, representation, sexuality, surrealism, social realism, trauma.</td>\n</tr>\n</tbody>\n</table>\n<p style=\"font-weight: 400;\"><strong>SUBMIT YOUR PROPOSALS:</strong></p>\n<p style=\"font-weight: 400;\">Please submit abstract proposals of 250 words (max) by the 3 May 2026, using the appropriate links below (as single paper or pre-formed panel):</p>\n<p style=\"font-weight: 400;\"><a href=\"https://forms.office.com/Pages/ResponsePage.aspx?id=VZbi7ZfQ5EK7tfONQn-_uKTV25ijuANLi5dE2tVQ245UQTlTMVo3WjIxOU44MzVRQldYV0hYNUdXTS4u\">Media and Emotion Conference September 2026: SINGLE PAPER PROPOSAL\u00a0\u00a0 \u2013 Fill out form</a></p>\n<p style=\"font-weight: 400;\"><a href=\"https://forms.office.com/Pages/ResponsePage.aspx?id=VZbi7ZfQ5EK7tfONQn-_uKTV25ijuANLi5dE2tVQ245UQjBBMzcxWFVDUDRJMzhaU1dLTVFRWDRXSy4u\">Media and Emotion Conference September 2026: PRE-FORMED PANEL PROPOSAL \u2013 Fill out form</a></p>\n<p style=\"font-weight: 400;\">Decisions will be announced after 15<sup>th</sup> May 2026</p>\n<p style=\"font-weight: 400;\"><strong>NB:</strong> This conference is an in-person event only, with no facility for hybrid presentations.</p>\n<p style=\"font-weight: 400;\"><strong>STUDENTS:</strong></p>\n<p style=\"font-weight: 400;\">We will also offer<strong> post</strong><strong>graduate researchers</strong> the opportunity to enter a lottery to win a <strong>registration fee waiver</strong> (with five spaces available).</p>\n<p style=\"font-weight: 400;\"><strong>REGISTRATION &amp; ACCOMMODATION</strong></p>\n<p style=\"font-weight: 400;\"><strong>Registration fee: </strong>including refreshments and lunch for two days:</p>\n<p style=\"font-weight: 400;\">\u00a3140 (students, part time employment)</p>\n<p style=\"font-weight: 400;\">\u00a3170 (full time employment)</p>\n<p style=\"font-weight: 400;\"><strong>Conference evening</strong> meal will be available under a separate invitation, at own cost.</p>\n<p style=\"font-weight: 400;\"><strong>On site campus accommodation </strong>will be available at \u00a375 for three nights (fixed price), plus \u00a325 for each additional night (over the preceding weekend)</p>\n<p style=\"font-weight: 400;\"><strong>Local hotels available</strong> at reduced conference rates.</p>\n<p style=\"font-weight: 400;\"><strong>CONFIRMED KEYNOTES: </strong><strong>\u00a0</strong></p>\n<p style=\"font-weight: 400;\"><a href=\"https://www.gold.ac.uk/media-communications/staff/blackman/\"><strong>Lisa Blackman </strong>(Professor in Media and Communications \u2013 Goldsmiths University)</a> &#8211; whose work includes:</p>\n<ul>\n<li><em>Grey Media: A Psychopolitics of Deception</em> (Punctum Books 2026).</li>\n<li><em>Haunted Data: Affect, Transmedia, Weird Science</em> (Bloomsbury 2019).</li>\n</ul>\n<p style=\"font-weight: 400;\"><strong>DECEIT AND DECEPTION:</strong> Lisa will explore media and emotion through the concept of \u2018grey media\u2019, a term which brings into alignment the long histories of apparatuses of deceit and deception which have a distinct mediality, linking the gaslighting of emotional abuse, information warfare and AI Deception.</p>\n<p style=\"font-weight: 400;\"><a href=\"https://ahc.leeds.ac.uk/arts-humanities-cultures/staff/2910/professor-kristyn-gorton\"><strong>Kristyn Gorton (Professor of Film and Television \u2013 University of Leeds)</strong></a> \u00a0-\u2013 whose work includes:</p>\n<ul>\n<li><em>Emotion Online: Theorising Affect on the Internet</em> (Palgrave 2013).</li>\n<li><em>Media Audiences: Television, Meaning and Emotion</em> (Edinburgh University Press, 2009).</li>\n</ul>\n<p style=\"font-weight: 400;\"><strong>EMPATHY AND INTIMACY:</strong>\u00a0 This paper returns to Kristyn\u2019s earlier work (as above) and engages with recent work on &#8217;empathy&#8217; and &#8216;intimacy&#8217; to reflect on the development of the field and the ways in which television constructs emotion. Kristyn will draw on examples from serial melodrama which use excess to mark out spaces for viewers to work through narratives of social justice and change. The paper will also consider how the production cultures impact and inform the affective landscape of these stories.</p>\n<p style=\"font-weight: 400;\"><strong>Kim Akass</strong> (Professor of Radio Television and Film) &#8211; whose work includes:</p>\n<ul>\n<li><em>Mothers on American Television: From Here to Maternity</em> (Manchester University Press 2023).</li>\n</ul>\n<p style=\"font-weight: 400;\"><strong>RAGE AND MOTHERHOOD</strong>: Since the overturn of Roe vs Wade in June 2022 and the resulting ban on abortion in 13 states (so far), is it surprising that we are seeing so much female rage on our screens? From postpartum psychosis in <em>Die My Love</em> (Lynne Ramsay, 2025) to <em>If I Had Legs, I Would Kick You</em> (Mary Bronstein, 2025) maternal rage is, well, all the rage. In this paper Kim will explore how female rage has emerged as a theme in film and TV and asks whether this is due to an increase in women behind the scenes or a reaction to punitive legislation against women\u2019s reproductive rights.</p>\n<p style=\"font-weight: 400;\"><a href=\"https://staffprofiles.bournemouth.ac.uk/display/cvanraalte\"><strong>Christa van Raalte</strong> (Associate Professor of Film and Television \u2013 Bournemouth University)</a> \u2013 whose work includes:</p>\n<ul>\n<li>The Good Manager in TV: Tales for the Twenty-first Century, in <em>Creative Industries Journal </em>(2024), (with Wallis, R.).</li>\n<li>More Than Just a Few \u2018Bad Apples\u2019: The Need for a Risk Management Approach to the Problem of Workplace Bullying in the UK\u2019s Television Industry, in <em>Creative Industries Journal </em>(2023), (with Wallis, R. and Pekalski, D.).</li>\n</ul>\n<p style=\"font-weight: 400;\"><strong>TV INDUSTRY PANEL: THE ECONOMICS OF EMOTION</strong>:\u00a0 Christa will also bring together a range of industry practitioners, considering how emotion works as a commodity for creativity, in artistic and workplace contexts. What are the safeguarding standards when creators, collaborators and audiences engage with productions that frame emotional media? How might media producers negotiate the polarising emotional landscape and ethical broadcasting standards when creating content?</p>\n<p style=\"font-weight: 400;\"><strong>We are looking forward to your submissions!!</strong></p>\n<p style=\"font-weight: 400;\"><strong>Conference organisers:</strong> Christopher Pullen, Catalin Brylla &amp; Savvas Voutyras of</p>\n<p style=\"font-weight: 400;\"><a href=\"https://www.bournemouth.ac.uk/research/centres-institutes/centre-study-conflict-emotion-social-justice\">The Centre for the Study of Conflict, Emotion and Social Justice</a></p>\n<p style=\"font-weight: 400;\">Bournemouth University, Faculty of Media, Science and Technology, Talbot Campus, Fern Barrow Poole, BH12 5BB.</p>\n<p style=\"font-weight: 400;\"><strong>Conference email contact: </strong><a href=\"mailto:cpullen@bournemouth.ac.uk\">cpullen@bournemouth.ac.uk</a></p>\n","doi":"https://doi.org/10.59350/zmmp8-n8w87","funding_references":null,"guid":"https://cstonline.net/?p=15784","id":"9895a0b3-b02a-44f4-b87b-fa8655fb8712","image":"https://cstonline.net/wp-content/uploads/2026/04/1773843427481.jpeg","indexed":true,"indexed_at":1775205402,"language":"en","parent_doi":null,"published_at":1775203256,"reference":[],"registered_at":0,"relationships":[],"rid":"64rbw-1zn97","status":"active","summary":"<b>\n 2 days with up to 100+ papers in 30+ panels, 4 keynote events, lunches and refreshment\n</b>\n<strong>\n breaks for both days, optional self-funded conference meal, student rates (and lottery free spaces) and campus accommodation available \u2013\n</strong>\n<strong>\n Talbot Campus \u2013 Bournemouth University\n</strong>\n<strong>\n DEADLINE FOR SUBMISSION 3 May 2026\n</strong>\nThe Centre for the Study of Conflict, Emotion and Social Justice, in the Faculty of Media,","tags":["CFPs","CFPs Conferences"],"title":"CFP: MEDIA AND EMOTION CONFERENCE \u2013 7-8 SEPTEMBER 2026","updated_at":1775203966,"url":"https://cstonline.net/cfp-media-and-emotion-conference-7-8-september-2026/","version":"v1"}}],"items":[{"abstract":null,"archive_url":null,"authors":[],"blog":{"archive_collection":null,"archive_host":null,"archive_prefix":null,"archive_timestamps":null,"authors":null,"canonical_url":null,"category":"socialScience","community_id":"6db161d5-9161-49cf-ab79-f33ad128ed24","created_at":1734126057,"current_feed_url":null,"description":"r-dcm blog","doi_as_guid":false,"favicon":null,"feed_format":"application/rss+xml","feed_url":"https://r-dcm.org/rss.xml","filter":null,"funding":null,"generator":"Quarto","generator_raw":"Quarto 1.6.39","home_page_url":"https://r-dcm.org","id":"5822f383-190a-4c32-9937-86ee8fc75254","indexed":true,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":0,"relative_url":null,"ror":null,"secure":true,"slug":"r_dcm","status":"active","subfield":"1803","subfield_validated":null,"title":"r-dcm blog","updated_at":1775375532.831312,"use_api":null,"use_mastodon":false,"user_id":"943e7faa-bd06-4044-80a5-9fef5df8ccdb"},"blog_name":"r-dcm blog","blog_slug":"r_dcm","content_html":"<section class=\"level2\" id=\"introduction\"><h2 class=\"anchored\" data-anchor-id=\"introduction\">Introduction</h2>\n<p>How do you specify and estimate a diagnostic classification model (DCM) using measr? In this article, we will walk you through the steps. We start with data for building the model, learn how to specify DCMs that make different assumptions about the data, and explore how to estimate the model with <a href=\"https://mc-stan.org\"><em>Stan</em></a>.</p>\n<p>To use code in this article, you will need to install the following packages: <a href=\"https://dcmdata.r-dcm.org\">dcmdata</a>, <a href=\"https://measr.r-dcm.org\">measr</a>, and <a href=\"https://mc-stan.org/rstan/\">rstan</a>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb1\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org\">measr</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for model specification and estimation</span></span>\n<span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># Helper packages</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmdata.r-dcm.org\">dcmdata</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for example data set</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/rstan/\">rstan</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for estimation backend</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level2\" id=\"rapid-online-assessment-of-reading-and-phonological-awareness-roar-pa-data\"><h2 class=\"anchored\" data-anchor-id=\"rapid-online-assessment-of-reading-and-phonological-awareness-roar-pa-data\">Rapid Online Assessment of Reading and Phonological Awareness (ROAR-PA) data</h2>\n<p>Let\u2019s use data from the ROAR-PA <span class=\"citation\" data-cites=\"roarpa\">(Gijbels et al., 2024)</span> to learn how to specify and estimate a DCM with measr. The ROAR-PA data is available in the dcmdata package, and contains responses to 57 items from 272 respondents.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb2\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_data</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 272 \u00d7 58</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;       id fsm_01 fsm_04 fsm_05 fsm_06 fsm_07 fsm_08 fsm_10 fsm_11 fsm_12 fsm_14</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;  &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1   161      0      1      1      1      1      0      0      1      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2   226      0      1      0      1      0      0      1      0      1      0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3   103      0      1      0      1      0      0      0      0      0      0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4     7      1      1      0      0      1      0      0      0      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5   185      1      1      1      1      1      1      1      1      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6   129      1      1      1      0      1      1      0      0      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7   181      1      1      1      1      1      1      1      1      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8    36      1      1      1      1      1      1      1      1      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9   206      1      1      1      1      1      1      1      1      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10   257      1      1      1      1      1      1      1      1      1      1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 262 more rows</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 47 more variables: fsm_15 &lt;int&gt;, fsm_16 &lt;int&gt;, fsm_17 &lt;int&gt;, fsm_18 &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   fsm_21 &lt;int&gt;, fsm_22 &lt;int&gt;, fsm_23 &lt;int&gt;, fsm_24 &lt;int&gt;, fsm_25 &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   lsm_01 &lt;int&gt;, lsm_02 &lt;int&gt;, lsm_04 &lt;int&gt;, lsm_05 &lt;int&gt;, lsm_06 &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   lsm_07 &lt;int&gt;, lsm_08 &lt;int&gt;, lsm_10 &lt;int&gt;, lsm_11 &lt;int&gt;, lsm_13 &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   lsm_15 &lt;int&gt;, lsm_16 &lt;int&gt;, lsm_17 &lt;int&gt;, lsm_18 &lt;int&gt;, lsm_19 &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   lsm_20 &lt;int&gt;, lsm_21 &lt;int&gt;, lsm_22 &lt;int&gt;, lsm_24 &lt;int&gt;, del_01 &lt;int&gt;, \u2026</span></span></code></pre></div></div>\n</div>\n<p>In addition to our response data, a DCM also requires a Q-matrix. A Q-matrix contains one row per item, and one column per attribute (plus an optional column of item identifiers). A value of 1 indicates that the item measures the attribute, and a value of 0 indicates the item does not measure the attribute. In our Q-matrix, we can see that the item identifiers in the in the rows (<code>item</code>) correspond to the column names of the data. Additionally, we see that there are three attributes measured by this assessment: <code>lsm</code>, <code>del</code>, and <code>fsm</code>. These refer to the first sound made (<code>fsm</code>), last sound made (<code>lsm</code>), and deletion (<code>del</code>) elements of phonological awareness.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb3\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_qmatrix</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 57 \u00d7 4</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    item     lsm   del   fsm</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;  &lt;int&gt; &lt;int&gt; &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 fsm_01     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 fsm_04     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 fsm_05     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 fsm_06     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 fsm_07     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 fsm_08     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 fsm_10     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 fsm_11     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 fsm_12     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 fsm_14     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 47 more rows</span></span></code></pre></div></div>\n</div>\n<p>Our task is to determine which attributes each respondent is proficient on, given their item responses. For more information on the data set, see <code><a href=\"https://dcmdata.r-dcm.org/reference/roarpa.html\">?roarpa</a></code> and <span class=\"citation\" data-cites=\"roarpa\">Gijbels et al. (2024)</span>.</p>\n</section><section class=\"level2\" id=\"specify-a-dcm\"><h2 class=\"anchored\" data-anchor-id=\"specify-a-dcm\">Specify a DCM</h2>\n<p>A DCM model specification has three primary components: the Q-matrix, a measurement model, and a structural model. Given these three components, we can create a model specification with <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb4\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_spec</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_spec</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; A loglinear cognitive diagnostic model (LCDM) measuring 3 attributes</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; with 57 items.</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attributes:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"lsm\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"del\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"fsm\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attribute structure:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   Unconstrained</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Prior distributions:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   intercept ~ normal(0, 2)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   maineffect ~ lognormal(0, 1)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   `Vc` ~ dirichlet(1, 1, 1)</span></span></code></pre></div></div>\n</div>\n<p>The Q-matrix, as we described, defines which items measure each attribute. In addition the the Q-matrix itself, we must also tell <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code> which column within the Q-matrix contains the item identifiers. If there is no item identifier, then <code>identifier</code> can be left as <code>NULL</code> (the default). In our ROAR-PA specification, we can see that each of our three attributes is measured by 19 items. The ROAR-PA Q-matrix is a simple structure, meaning that each item measures only one attribute.</p>\n<p>At a high level, the measurement model describes how attributes interact with each other on specific items. If an item measures two attributes, how do we expect a respondent to perform if they possess only one of the attributes? Are the attributes compensatory, meaning that proficiency on either is sufficient to answer the item correctly, or noncompensatory, and proficiency on both attributes is required in order to provide a correct response? The choice of measurement model dictates these relationships.</p>\n<p>The structural model describes relationships between proficiency on the attributes. Is proficiency on one attribute independent of proficiency on another, or is proficiency correlated? It\u2019s also possible that some attributes may represent prerequisite knowledge such that respondents must demonstrate proficiency before they can demonstrate proficiency of other attributes. The structural model is used to define these relationships.</p>\n<p>We\u2019ll explore both measurement and structural models in more detail in the next sections.</p>\n<section class=\"level3\" id=\"measurement-models\"><h3 class=\"anchored\" data-anchor-id=\"measurement-models\">Measurement models</h3>\n<p>measr provides functionality for seven DCM measurement models: the six core models identified by <span class=\"citation\" data-cites=\"rupp-dcm\">Rupp et al. (2010)</span> and a general model that subsumes the other models. A full description of these models is beyond the scope of what we are covering here. However, we will provide a high-level overview the types of models and offer referenes for further details on each.</p>\n<p>The general DCM supported by the measr is the loglinear cognitive diagnostic model <span class=\"citation\" data-cites=\"lcdm lcdm-handbook\">(LCDM; Henson et al., 2009; Henson &amp; Templin, 2019)</span>. This is the most flexible model that allows each item to have unique interactions between attributes, estimating separate main effects and interaction effects for all possible attribute combinations. You can think of the LCDM as the \u201csaturated model\u201d that all other DCMs are constrained versions of. That is, by placing constraints on the LCDM parameters, you can achieve models equivalent to the other core models.</p>\n<p>Under the umbrella of the LCDM are the six core DCMs, which generally fall into two categories: non-compensatory (also called conjunctive) and compensatory (disjunctive). When using a non-compensatory model, attributes function like prerequisites or requirements, and missing an attribute creates a specific deficit that other attributes cannot overcome. In other words, with non-compensatory models, performance is constrained by the weakest link. In this category, measr supports the deterministic input, noisy \u201cand\u201d gate model <span class=\"citation\" data-cites=\"dina\">(DINA; <span class=\"nocase\">de la Torre &amp; Douglas</span>, 2004)</span>; the noisy-input, deterministic \u201cand\u201d gate model <span class=\"citation\" data-cites=\"nida\">(NIDA; Junker &amp; Sijtsma, 2001)</span>; and the non-compensatory reparameterized unified model <span class=\"citation\" data-cites=\"ncrum\">(NC-RUM; DiBello et al., 1995)</span>. On the other hand, when compensatory models, attributes function like independent skills that accumulate, and having more attributes can partially or fully compensate for missing others. Thus, performance improves as you gain more attributes. In the compensatory category, measr supports the deterministic input, noisy \u201cor\u201d gate model <span class=\"citation\" data-cites=\"dino\">(DINO; Templin &amp; Henson, 2006)</span>; the noisy-input, deterministic \u201cor\u201d gate model <span class=\"citation\" data-cites=\"nido\">(NIDO; Templin, 2006)</span>; and the compensatory reparameterized unified model <span class=\"citation\" data-cites=\"crum\">(C-RUM; Hartz, 2002)</span>.</p>\n<p>Each of these measurement models can be estimated with measr by supplying the respective measurement model function, as shown in Table\u00a01, to the <code>measurement_model</code> argument of <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"cell quarto-float quarto-figure quarto-figure-center anchored\" data-layout-align=\"center\" id=\"tbl-meas-models\">\n<figure class=\"quarto-float quarto-float-tbl figure\"><figcaption class=\"quarto-float-caption-top quarto-float-caption quarto-float-tbl\" id=\"tbl-meas-models-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nTable\u00a01: Measurement models supported by measr\n</figcaption><div aria-describedby=\"tbl-meas-models-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<div class=\"cell-output-display\">\n<div id=\"ojumdzikhq\" style=\"padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;\">\n<style>@import url(\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap\");\n#ojumdzikhq table {\n  font-family: 'Open Sans', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n#ojumdzikhq thead, #ojumdzikhq tbody, #ojumdzikhq tfoot, #ojumdzikhq tr, #ojumdzikhq td, #ojumdzikhq th {\n  border-style: none;\n}\n\n#ojumdzikhq p {\n  margin: 0;\n  padding: 0;\n}\n\n#ojumdzikhq .gt_table {\n  display: table;\n  border-collapse: collapse;\n  line-height: normal;\n  margin-left: auto;\n  margin-right: auto;\n  color: #333333;\n  font-size: 16px;\n  font-weight: normal;\n  font-style: normal;\n  background-color: #FFFFFF;\n  width: auto;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #A8A8A8;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 1px;\n  border-bottom-color: #A8A8A8;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_caption {\n  padding-top: 4px;\n  padding-bottom: 4px;\n}\n\n#ojumdzikhq .gt_title {\n  color: #333333;\n  font-size: 125%;\n  font-weight: initial;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-color: #FFFFFF;\n  border-bottom-width: 0;\n}\n\n#ojumdzikhq .gt_subtitle {\n  color: #333333;\n  font-size: 85%;\n  font-weight: initial;\n  padding-top: 3px;\n  padding-bottom: 5px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-color: #FFFFFF;\n  border-top-width: 0;\n}\n\n#ojumdzikhq .gt_heading {\n  background-color: #FFFFFF;\n  text-align: left;\n  border-bottom-color: #FFFFFF;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_bottom_border {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_col_headings {\n  border-top-style: solid;\n  border-top-width: 3px;\n  border-top-color: #FFFFFF;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_col_heading {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 6px;\n  padding-left: 5px;\n  padding-right: 5px;\n  overflow-x: hidden;\n}\n\n#ojumdzikhq .gt_column_spanner_outer {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  padding-top: 0;\n  padding-bottom: 0;\n  padding-left: 4px;\n  padding-right: 4px;\n}\n\n#ojumdzikhq .gt_column_spanner_outer:first-child {\n  padding-left: 0;\n}\n\n#ojumdzikhq .gt_column_spanner_outer:last-child {\n  padding-right: 0;\n}\n\n#ojumdzikhq .gt_column_spanner {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 5px;\n  overflow-x: hidden;\n  display: inline-block;\n  width: 100%;\n}\n\n#ojumdzikhq .gt_spanner_row {\n  border-bottom-style: hidden;\n}\n\n#ojumdzikhq .gt_group_heading {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  text-align: left;\n}\n\n#ojumdzikhq .gt_empty_group_heading {\n  padding: 0.5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: middle;\n}\n\n#ojumdzikhq .gt_from_md > :first-child {\n  margin-top: 0;\n}\n\n#ojumdzikhq .gt_from_md > :last-child {\n  margin-bottom: 0;\n}\n\n#ojumdzikhq .gt_row {\n  padding-top: 3px;\n  padding-bottom: 3px;\n  padding-left: 5px;\n  padding-right: 5px;\n  margin: 10px;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  overflow-x: hidden;\n}\n\n#ojumdzikhq .gt_stub {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#ojumdzikhq .gt_stub_row_group {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 100%;\n  font-weight: initial;\n  text-transform: inherit;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n  vertical-align: top;\n}\n\n#ojumdzikhq .gt_row_group_first td {\n  border-top-width: 2px;\n}\n\n#ojumdzikhq .gt_row_group_first th {\n  border-top-width: 2px;\n}\n\n#ojumdzikhq .gt_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#ojumdzikhq .gt_first_summary_row {\n  border-top-style: solid;\n  border-top-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_first_summary_row.thick {\n  border-top-width: 2px;\n}\n\n#ojumdzikhq .gt_last_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_grand_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#ojumdzikhq .gt_first_grand_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-style: double;\n  border-top-width: 6px;\n  border-top-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_last_grand_summary_row_top {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: double;\n  border-bottom-width: 6px;\n  border-bottom-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_striped {\n  background-color: rgba(128, 128, 128, 0.05);\n}\n\n#ojumdzikhq .gt_table_body {\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_footnotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_footnote {\n  margin: 0px;\n  font-size: 90%;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#ojumdzikhq .gt_sourcenotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 0px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 0px;\n  border-right-color: #D3D3D3;\n}\n\n#ojumdzikhq .gt_sourcenote {\n  font-size: 12px;\n  padding-top: 10px;\n  padding-bottom: 10px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#ojumdzikhq .gt_left {\n  text-align: left;\n}\n\n#ojumdzikhq .gt_center {\n  text-align: center;\n}\n\n#ojumdzikhq .gt_right {\n  text-align: right;\n  font-variant-numeric: tabular-nums;\n}\n\n#ojumdzikhq .gt_font_normal {\n  font-weight: normal;\n}\n\n#ojumdzikhq .gt_font_bold {\n  font-weight: bold;\n}\n\n#ojumdzikhq .gt_font_italic {\n  font-style: italic;\n}\n\n#ojumdzikhq .gt_super {\n  font-size: 65%;\n}\n\n#ojumdzikhq .gt_footnote_marks {\n  font-size: 75%;\n  vertical-align: 0.4em;\n  position: initial;\n}\n\n#ojumdzikhq .gt_asterisk {\n  font-size: 100%;\n  vertical-align: 0;\n}\n\n#ojumdzikhq .gt_indent_1 {\n  text-indent: 5px;\n}\n\n#ojumdzikhq .gt_indent_2 {\n  text-indent: 10px;\n}\n\n#ojumdzikhq .gt_indent_3 {\n  text-indent: 15px;\n}\n\n#ojumdzikhq .gt_indent_4 {\n  text-indent: 20px;\n}\n\n#ojumdzikhq .gt_indent_5 {\n  text-indent: 25px;\n}\n\n#ojumdzikhq .katex-display {\n  display: inline-flex !important;\n  margin-bottom: 0.75em !important;\n}\n\n#ojumdzikhq div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {\n  height: 0px !important;\n}\n</style>\n<table class=\"gt_table\" data-quarto-bootstrap=\"false\" data-quarto-disable-processing=\"false\" style=\"table-layout:fixed;width:0px;\">\n<colgroup>\n<col style=\"width:155px;\"/>\n<col style=\"width:500px;\"/>\n<col style=\"width:80px;\"/>\n</colgroup>\n<thead><tr class=\"gt_col_headings\">\n<th class=\"gt_col_heading gt_columns_bottom_border gt_left\" colspan=\"1\" id=\"model\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">model</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_left\" colspan=\"1\" id=\"description\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">description</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_left\" colspan=\"1\" id=\"measr\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">measr</th>\n</tr></thead>\n<tbody class=\"gt_table_body\">\n<tr class=\"gt_group_heading_row\">\n<th class=\"gt_empty_group_heading\" colspan=\"3\" scope=\"colgroup\" style=\"background-color: #023047; color: #FFFFFF; border-left-width: 0px; border-left-style: solid; border-left-color: #000000; border-right-width: 0px; border-right-style: solid; border-right-color: #000000; border-top-width: 0px; border-top-style: solid; border-top-color: #000000; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: #000000;\"></th>\n</tr>\n<tr class=\"gt_row_group_first\">\n<td class=\"gt_row gt_left\" headers=\"NA model\" style=\"background-color: #FFFFFF;\">LCDM</td>\n<td class=\"gt_row gt_left\" headers=\"NA description\" style=\"background-color: #FFFFFF;\">General and flexible, subsumes other models</td>\n<td class=\"gt_row gt_left\" headers=\"NA measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YGxjZG0oKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm()</a></code></span></span></td>\n</tr>\n<tr class=\"gt_group_heading_row\">\n<th class=\"gt_group_heading\" colspan=\"3\" id=\"Non-compensatory\" scope=\"colgroup\" style=\"background-color: #023047; color: #FFFFFF; border-left-width: 0px; border-left-style: solid; border-left-color: #000000; border-right-width: 0px; border-right-style: solid; border-right-color: #000000; border-top-width: 0px; border-top-style: solid; border-top-color: #000000; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: #000000;\">Non-compensatory</th>\n</tr>\n<tr class=\"gt_row_group_first\">\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory model\" style=\"background-color: #FFFFFF;\">DINA</td>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory description\" style=\"background-color: #FFFFFF;\">All attributes must be present</td>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YGRpbmEoKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">dina()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory model\" style=\"background-color: #FFFFFF;\">NIDA</td>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory description\" style=\"background-color: #FFFFFF;\">Attributes have multiplicative penalties equal across items</td>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YG5pZGEoKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">nida()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory model\" style=\"background-color: #FFFFFF;\">NC-RUM</td>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory description\" style=\"background-color: #FFFFFF;\">Attributes have multiplicative penalites that vary across items</td>\n<td class=\"gt_row gt_left\" headers=\"Non-compensatory measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YG5jcnVtKClg\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">ncrum()</a></code></span></span></td>\n</tr>\n<tr class=\"gt_group_heading_row\">\n<th class=\"gt_group_heading\" colspan=\"3\" id=\"Compensatory\" scope=\"colgroup\" style=\"background-color: #023047; color: #FFFFFF; border-left-width: 0px; border-left-style: solid; border-left-color: #000000; border-right-width: 0px; border-right-style: solid; border-right-color: #000000; border-top-width: 0px; border-top-style: solid; border-top-color: #000000; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: #000000;\">Compensatory</th>\n</tr>\n<tr class=\"gt_row_group_first\">\n<td class=\"gt_row gt_left\" headers=\"Compensatory model\" style=\"background-color: #FFFFFF;\">DINO</td>\n<td class=\"gt_row gt_left\" headers=\"Compensatory description\" style=\"background-color: #FFFFFF;\">Any one attribute must be present</td>\n<td class=\"gt_row gt_left\" headers=\"Compensatory measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YGRpbm8oKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">dino()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"Compensatory model\" style=\"background-color: #FFFFFF;\">NIDO</td>\n<td class=\"gt_row gt_left\" headers=\"Compensatory description\" style=\"background-color: #FFFFFF;\">Attributes are additive and equal across items</td>\n<td class=\"gt_row gt_left\" headers=\"Compensatory measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YG5pZG8oKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">nido()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"Compensatory model\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">C-RUM</td>\n<td class=\"gt_row gt_left\" headers=\"Compensatory description\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">Attributes are additive and vary across items</td>\n<td class=\"gt_row gt_left\" headers=\"Compensatory measr\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\"><span data-qmd-base64=\"YGNydW0oKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">crum()</a></code></span></span></td>\n</tr>\n</tbody>\n</table>\n</div>\n</div>\n</div>\n</figure>\n</div>\n</div>\n</section><section class=\"level3\" id=\"structural-models\"><h3 class=\"anchored\" data-anchor-id=\"structural-models\">Structural models</h3>\n<p>measr provides functionality for five structural models. The structural model describes the joint distribution of attribute profiles in the population. Different structural models make different assumptions about how attributes relate to each other.</p>\n<p>The most general option is the unconstrained model <span class=\"citation\" data-cites=\"rupp-dcm\">(Rupp et al., 2010)</span>. This model places no constraints on the relationships between attributes. Each of the 2<sup><em>A</em></sup> possible attribute profiles (where <em>A</em> is the number of attributes) has its own freely estimated base rate parameter. Because all profiles are freely estimated, this is a saturated structural model.</p>\n<p>The independent model <span class=\"citation\" data-cites=\"independent\">(Lee, 2017)</span> assumes that attributes are completely unrelated. Proficiency on one attribute tells you nothing about proficiency on another. Under this model, each attribute has its own proficiency base rate, and the probability of any profile is simply the product of the individual attribute base rates (or their complements for non-proficiency).</p>\n<p>The loglinear model <span class=\"citation\" data-cites=\"loglinear\">(<span class=\"nocase\">Xu &amp; von Davier</span>, 2008)</span> uses a log-linear parameterization with main effects and interactions. When specifying a loglinear model, we can use the <code>max_interaction</code> argument to control the high-level interactions to include. When <code>max_interaction</code> is set to the number of attributes (the default), the loglinear model is equivalent to the unconstrained model. When <code>max_interaction = 1</code>, only main effects are included, which is equivalent to the independent model. Intermediate values allow you to model some degree of attribute dependence without fully saturating the structural model.</p>\n<p>The remaining two structural models incorporate attribute hierarchies. In these models, proficiency on some attributes may be a prerequisite for proficiency on others. The hierarchical DCM <span class=\"citation\" data-cites=\"hdcm\">(HDCM; Templin &amp; Bradshaw, 2014)</span> enforces strict attribute prerequisites. Attribute profiles that violate the specified hierarchy are excluded entirely from the model, meaning their base rates are fixed to zero. In contrast, the Bayesian network model <span class=\"citation\" data-cites=\"bayesnet\">(Hu &amp; Templin, 2020)</span> implements a softer version of the hierarchy. All attribute profiles remain possible, but profiles that are inconsistent with the hierarchy are estimated to be less likely. Both models require a <code>hierarchy</code> argument that defines the attribute relationships using dagitty-style syntax, such as <code>\"att1 -&gt; att2 -&gt; att3\"</code>. For more details on specifying attribute hierarchies, see the <a href=\"https://r-dcm.org/start/specify//../../start/hierarchies/\">Define Attribute Relationships</a> article.</p>\n<p>Each of these structural models can be estimated with measr by supplying the respective structural model function, as shown in Table\u00a02, to the <code>structural_model</code> argument of <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"cell quarto-float quarto-figure quarto-figure-center anchored\" data-layout-align=\"center\" id=\"tbl-strc-models\">\n<figure class=\"quarto-float quarto-float-tbl figure\"><figcaption class=\"quarto-float-caption-top quarto-float-caption quarto-float-tbl\" id=\"tbl-strc-models-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nTable\u00a02: Structural models supported by measr\n</figcaption><div aria-describedby=\"tbl-strc-models-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<div class=\"cell-output-display\">\n<div id=\"wdwlwaheej\" style=\"padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;\">\n<style>@import url(\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap\");\n#wdwlwaheej table {\n  font-family: 'Open Sans', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n#wdwlwaheej thead, #wdwlwaheej tbody, #wdwlwaheej tfoot, #wdwlwaheej tr, #wdwlwaheej td, #wdwlwaheej th {\n  border-style: none;\n}\n\n#wdwlwaheej p {\n  margin: 0;\n  padding: 0;\n}\n\n#wdwlwaheej .gt_table {\n  display: table;\n  border-collapse: collapse;\n  line-height: normal;\n  margin-left: auto;\n  margin-right: auto;\n  color: #333333;\n  font-size: 16px;\n  font-weight: normal;\n  font-style: normal;\n  background-color: #FFFFFF;\n  width: auto;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #A8A8A8;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 1px;\n  border-bottom-color: #A8A8A8;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_caption {\n  padding-top: 4px;\n  padding-bottom: 4px;\n}\n\n#wdwlwaheej .gt_title {\n  color: #333333;\n  font-size: 125%;\n  font-weight: initial;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-color: #FFFFFF;\n  border-bottom-width: 0;\n}\n\n#wdwlwaheej .gt_subtitle {\n  color: #333333;\n  font-size: 85%;\n  font-weight: initial;\n  padding-top: 3px;\n  padding-bottom: 5px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-color: #FFFFFF;\n  border-top-width: 0;\n}\n\n#wdwlwaheej .gt_heading {\n  background-color: #FFFFFF;\n  text-align: left;\n  border-bottom-color: #FFFFFF;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_bottom_border {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_col_headings {\n  border-top-style: solid;\n  border-top-width: 3px;\n  border-top-color: #FFFFFF;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_col_heading {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 6px;\n  padding-left: 5px;\n  padding-right: 5px;\n  overflow-x: hidden;\n}\n\n#wdwlwaheej .gt_column_spanner_outer {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  padding-top: 0;\n  padding-bottom: 0;\n  padding-left: 4px;\n  padding-right: 4px;\n}\n\n#wdwlwaheej .gt_column_spanner_outer:first-child {\n  padding-left: 0;\n}\n\n#wdwlwaheej .gt_column_spanner_outer:last-child {\n  padding-right: 0;\n}\n\n#wdwlwaheej .gt_column_spanner {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 5px;\n  overflow-x: hidden;\n  display: inline-block;\n  width: 100%;\n}\n\n#wdwlwaheej .gt_spanner_row {\n  border-bottom-style: hidden;\n}\n\n#wdwlwaheej .gt_group_heading {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  text-align: left;\n}\n\n#wdwlwaheej .gt_empty_group_heading {\n  padding: 0.5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: middle;\n}\n\n#wdwlwaheej .gt_from_md > :first-child {\n  margin-top: 0;\n}\n\n#wdwlwaheej .gt_from_md > :last-child {\n  margin-bottom: 0;\n}\n\n#wdwlwaheej .gt_row {\n  padding-top: 3px;\n  padding-bottom: 3px;\n  padding-left: 5px;\n  padding-right: 5px;\n  margin: 10px;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  overflow-x: hidden;\n}\n\n#wdwlwaheej .gt_stub {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#wdwlwaheej .gt_stub_row_group {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 100%;\n  font-weight: initial;\n  text-transform: inherit;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n  vertical-align: top;\n}\n\n#wdwlwaheej .gt_row_group_first td {\n  border-top-width: 2px;\n}\n\n#wdwlwaheej .gt_row_group_first th {\n  border-top-width: 2px;\n}\n\n#wdwlwaheej .gt_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#wdwlwaheej .gt_first_summary_row {\n  border-top-style: solid;\n  border-top-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_first_summary_row.thick {\n  border-top-width: 2px;\n}\n\n#wdwlwaheej .gt_last_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_grand_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#wdwlwaheej .gt_first_grand_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-style: double;\n  border-top-width: 6px;\n  border-top-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_last_grand_summary_row_top {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: double;\n  border-bottom-width: 6px;\n  border-bottom-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_striped {\n  background-color: rgba(128, 128, 128, 0.05);\n}\n\n#wdwlwaheej .gt_table_body {\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_footnotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_footnote {\n  margin: 0px;\n  font-size: 90%;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#wdwlwaheej .gt_sourcenotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 0px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 0px;\n  border-right-color: #D3D3D3;\n}\n\n#wdwlwaheej .gt_sourcenote {\n  font-size: 12px;\n  padding-top: 10px;\n  padding-bottom: 10px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#wdwlwaheej .gt_left {\n  text-align: left;\n}\n\n#wdwlwaheej .gt_center {\n  text-align: center;\n}\n\n#wdwlwaheej .gt_right {\n  text-align: right;\n  font-variant-numeric: tabular-nums;\n}\n\n#wdwlwaheej .gt_font_normal {\n  font-weight: normal;\n}\n\n#wdwlwaheej .gt_font_bold {\n  font-weight: bold;\n}\n\n#wdwlwaheej .gt_font_italic {\n  font-style: italic;\n}\n\n#wdwlwaheej .gt_super {\n  font-size: 65%;\n}\n\n#wdwlwaheej .gt_footnote_marks {\n  font-size: 75%;\n  vertical-align: 0.4em;\n  position: initial;\n}\n\n#wdwlwaheej .gt_asterisk {\n  font-size: 100%;\n  vertical-align: 0;\n}\n\n#wdwlwaheej .gt_indent_1 {\n  text-indent: 5px;\n}\n\n#wdwlwaheej .gt_indent_2 {\n  text-indent: 10px;\n}\n\n#wdwlwaheej .gt_indent_3 {\n  text-indent: 15px;\n}\n\n#wdwlwaheej .gt_indent_4 {\n  text-indent: 20px;\n}\n\n#wdwlwaheej .gt_indent_5 {\n  text-indent: 25px;\n}\n\n#wdwlwaheej .katex-display {\n  display: inline-flex !important;\n  margin-bottom: 0.75em !important;\n}\n\n#wdwlwaheej div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {\n  height: 0px !important;\n}\n</style>\n<table class=\"gt_table\" data-quarto-bootstrap=\"false\" data-quarto-disable-processing=\"false\" style=\"table-layout:fixed;width:0px;\">\n<colgroup>\n<col style=\"width:130px;\"/>\n<col style=\"width:475px;\"/>\n<col style=\"width:150px;\"/>\n</colgroup>\n<thead><tr class=\"gt_col_headings\">\n<th class=\"gt_col_heading gt_columns_bottom_border gt_left\" colspan=\"1\" id=\"model\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">model</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_left\" colspan=\"1\" id=\"description\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">description</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_left\" colspan=\"1\" id=\"measr\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">measr</th>\n</tr></thead>\n<tbody class=\"gt_table_body\">\n<tr>\n<td class=\"gt_row gt_left\" headers=\"model\" style=\"background-color: #FFFFFF;\">Unconstrained</td>\n<td class=\"gt_row gt_left\" headers=\"description\" style=\"background-color: #FFFFFF;\">General and flexible, subsumes other models</td>\n<td class=\"gt_row gt_left\" headers=\"measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YHVuY29uc3RyYWluZWQoKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"model\" style=\"background-color: #FFFFFF;\">Independent</td>\n<td class=\"gt_row gt_left\" headers=\"description\" style=\"background-color: #FFFFFF;\">Attributes are independent of each other</td>\n<td class=\"gt_row gt_left\" headers=\"measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YGluZGVwZW5kZW50KClg\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">independent()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"model\" style=\"background-color: #FFFFFF;\">Loglinear</td>\n<td class=\"gt_row gt_left\" headers=\"description\" style=\"background-color: #FFFFFF;\">Can be constrained to only include certain interaction levels</td>\n<td class=\"gt_row gt_left\" headers=\"measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YGxvZ2xpbmVhcigpYA==\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">loglinear()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"model\" style=\"background-color: #FFFFFF;\">HDCM</td>\n<td class=\"gt_row gt_left\" headers=\"description\" style=\"background-color: #FFFFFF;\">Hard constraints on profiles based on attribute dependencies</td>\n<td class=\"gt_row gt_left\" headers=\"measr\" style=\"background-color: #FFFFFF;\"><span data-qmd-base64=\"YGhkY20oKWA=\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">hdcm()</a></code></span></span></td>\n</tr>\n<tr>\n<td class=\"gt_row gt_left\" headers=\"model\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">BayesNet</td>\n<td class=\"gt_row gt_left\" headers=\"description\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">Soft constraints on profiles based on attribute dependencies</td>\n<td class=\"gt_row gt_left\" headers=\"measr\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\"><span data-qmd-base64=\"YGJheWVzbmV0KClg\"><span class=\"gt_from_md\"><code><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">bayesnet()</a></code></span></span></td>\n</tr>\n</tbody>\n</table>\n</div>\n</div>\n</div>\n</figure>\n</div>\n</div>\n</section><section class=\"level3\" id=\"prior-distributions\"><h3 class=\"anchored\" data-anchor-id=\"prior-distributions\">Prior distributions</h3>\n<p>A final aspect of the DCM specification that we have not yet talked about is the definition of the model priors. Take another look at our specifciation object. We can see that there are prior distribution defined for each type of parameter in our model.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb5\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_spec</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; A loglinear cognitive diagnostic model (LCDM) measuring 3 attributes</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; with 57 items.</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attributes:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"lsm\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"del\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"fsm\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attribute structure:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   Unconstrained</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Prior distributions:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   intercept ~ normal(0, 2)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   maineffect ~ lognormal(0, 1)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   `Vc` ~ dirichlet(1, 1, 1)</span></span></code></pre></div></div>\n</div>\n<p>Every parameter in a DCM specification is assigned a prior distribution that encodes our beliefs about plausible parameter values before observing any data. measr provides sensible defaults, but you can also customize priors to reflect domain knowledge or to implement more informative constraints.</p>\n<p>To view the default priors for a given measurement and structural model combination, use <code><a href=\"https://dcmstan.r-dcm.org/reference/default_dcm_priors.html\">default_dcm_priors()</a></code>. In our example, we have specified an LCDM with an unconstrained structural model. Plugging those two components in, we see the same priors that we saw in our specification object.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb6\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/default_dcm_priors.html\">default_dcm_priors</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 4 \u00d7 3</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   type        coefficient prior                      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;       &lt;chr&gt;       &lt;chr&gt;                      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 intercept   &lt;NA&gt;        normal(0, 2)               </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 maineffect  &lt;NA&gt;        lognormal(0, 1)            </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 interaction &lt;NA&gt;        normal(0, 2)               </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 structural  Vc          dirichlet(rep_vector(1, C))</span></span></code></pre></div></div>\n</div>\n<p>However, different choices of measurement and structural models will result in different parameters being included, and therefore different prior distributions. For example, specifying a DINA measurement model with and independent structural model has a completely different set of parameters.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb7\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/default_dcm_priors.html\">default_dcm_priors</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">dina</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">independent</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 3 \u00d7 3</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   type       coefficient prior      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;      &lt;chr&gt;       &lt;chr&gt;      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 slip       &lt;NA&gt;        beta(5, 25)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 guess      &lt;NA&gt;        beta(5, 25)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 structural &lt;NA&gt;        beta(1, 1)</span></span></code></pre></div></div>\n</div>\n<p>You can see which parameter types and specific coefficients are available for your model using <code><a href=\"https://dcmstan.r-dcm.org/reference/get_parameters.html\">get_parameters()</a></code>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb8\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/get_parameters.html\">get_parameters</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_qmatrix</span>, identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 114 \u00d7 4</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    item   type       attributes coefficient</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;  &lt;chr&gt;      &lt;chr&gt;      &lt;chr&gt;      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 fsm_01 intercept  &lt;NA&gt;       l1_0       </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 fsm_01 maineffect fsm        l1_13      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 fsm_04 intercept  &lt;NA&gt;       l2_0       </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 fsm_04 maineffect fsm        l2_13      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 fsm_05 intercept  &lt;NA&gt;       l3_0       </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 fsm_05 maineffect fsm        l3_13      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 fsm_06 intercept  &lt;NA&gt;       l4_0       </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 fsm_06 maineffect fsm        l4_13      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 fsm_07 intercept  &lt;NA&gt;       l5_0       </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 fsm_07 maineffect fsm        l5_13      </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 104 more rows</span></span></code></pre></div></div>\n</div>\n<p>To customize priors, use the <code><a href=\"https://dcmstan.r-dcm.org/reference/prior.html\">prior()</a></code> function. The <code>type</code> argument specifies which parameter type the prior applies to, and the optional <code>coefficient</code> argument can target a specific parameter within that type. Custom priors can be passed to <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code> via the <code>priors</code> argument. Any parameter types not covered by a custom prior will retain their default values.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb9\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">my_priors</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/prior.html\">prior</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">normal</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, type <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"intercept\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/prior.html\">prior</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">lognormal</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.5</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, type <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"maineffect\"</span>, coefficient <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"l1_13\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  priors <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">my_priors</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; A loglinear cognitive diagnostic model (LCDM) measuring 3 attributes</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; with 57 items.</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attributes:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"lsm\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"del\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"fsm\" (19 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attribute structure:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   Unconstrained</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Prior distributions:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   `l1_13` ~ lognormal(0, 0.5)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   intercept ~ normal(0, 1)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   maineffect ~ lognormal(0, 1)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   `Vc` ~ dirichlet(1, 1, 1)</span></span></code></pre></div></div>\n</div>\n</section></section><section class=\"level2\" id=\"estimate-a-model-specification\"><h2 class=\"anchored\" data-anchor-id=\"estimate-a-model-specification\">Estimate a model specification</h2>\n<p>Once we have a model specification, we can estimate it using <code><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate()</a></code>. This function takes a specification object (created by <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code>), along with the response data and the name of the column in the data that contains respondent identifiers.</p>\n<p>The <code>method</code> argument controls how the model is estimated. Options include <code>\"optim\"</code> for point estimation using Stan\u2019s optimizer, <code>\"mcmc\"</code> for full Markov chain Monte Carlo sampling, <code>\"variational\"</code> for variational inference, and <code>\"pathfinder\"</code> (available only when using the cmdstanr backend). Full MCMC provides the most complete picture of the posterior distribution, but takes the longest to run. The optimizer is the fastest option and is useful for quick analyses, but does not provide a full posterior distribution.</p>\n<p>The <code>backend</code> argument specifies which Stan interface to use for estimation: <code>\"rstan\"</code> or <code>\"cmdstanr\"</code> to use the <a href=\"https://mc-stan.org/rstan/\">rstan</a> or <a href=\"https://mc-stan.org/cmdstanr/\">cmdstanr</a> package, respetively. The <code>file</code> argument allows you to save the estimated model to disk so that it does not need to be re-estimated if you re-run the script. Any additional arguments are passed directly to the backend\u2019s estimation function (e.g., <code>chains</code>, <code>iter</code>, and <code>warmup</code> for MCMC estimation when using the <code>\"rstan\"</code> backend).</p>\n<p>For this example, we use the optimizer with rstan, which provides fast point estimates of the model parameters.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb10\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_lcdm</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  dcm_spec <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_spec</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"id\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"optim\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"rstan\"</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"roarpa-lcdm-uncst-rstn\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</div>\n<section class=\"level3\" id=\"respondent-proficiency-estimates\"><h3 class=\"anchored\" data-anchor-id=\"respondent-proficiency-estimates\">Respondent proficiency estimates</h3>\n<p>After estimating a model, we typically want to know which attributes each respondent has mastered. The <code><a href=\"https://measr.r-dcm.org/reference/score.html\">score()</a></code> function calculates respondent proficiency estimates from a fitted model. It returns a list with two elements: <code>class_probabilities</code>, which contains the probability that each respondent belongs to each possible attribute profile, and <code>attribute_probabilities</code>, which contains the marginal probability that each respondent is proficient on each individual attribute.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb11\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_scores</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/score.html\">score</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_lcdm</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_scores</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $class_probabilities</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 2,176 \u00d7 3</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    id    class   probability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt; &lt;chr&gt;         &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 161   [0,0,0]   2.59 e- 1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 161   [1,0,0]   2.25 e-10</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 161   [0,1,0]   7.41 e- 1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 161   [0,0,1]   1.10 e- 7</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 161   [1,1,0]   7.97 e- 9</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 161   [1,0,1]   1.29 e-15</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 161   [0,1,1]   2.35 e- 6</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 161   [1,1,1]   2.14 e-13</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 226   [0,0,0]   1.000e+ 0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 226   [1,0,0]   6.68 e-11</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 2,166 more rows</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $attribute_probabilities</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 816 \u00d7 3</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    id    attribute probability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt; &lt;chr&gt;           &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 161   lsm          8.20e- 9</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 161   del          7.41e- 1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 161   fsm          2.46e- 6</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 226   lsm          6.68e-11</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 226   del          5.08e-10</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 226   fsm          1.19e- 7</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 103   lsm          2.42e-13</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 103   del          3.79e- 6</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 103   fsm          2.62e-14</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 7     lsm          2.15e-15</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 806 more rows</span></span></code></pre></div></div>\n</div>\n<p>In practice, we often want to convert these probabilities into binary proficiency classifications. A common approach is to use a threshold of .5, classifying a respondent as proficient on an attribute if their estimated probability of proficiency exceeds .5. The choice of threshold matters and can be adjusted based on the intended use of the results.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb12\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyverse.tidyverse.org\">tidyverse</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">roarpa_scores</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">attribute_probabilities</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>probability <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/integer.html\">as.integer</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">probability</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&gt;</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">.5</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/pivot_wider.html\">pivot_wider</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>names_from <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">attribute</span>, values_from <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">probability</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 272 \u00d7 4</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    id      lsm   del   fsm</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 161       0     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 226       0     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 103       0     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 7         0     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 185       1     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 129       0     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 181       1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 36        1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 206       1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 257       1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 262 more rows</span></span></code></pre></div></div>\n</div>\n</section></section><section class=\"level2\" id=\"wrapping-up\"><h2 class=\"anchored\" data-anchor-id=\"wrapping-up\">Wrapping up</h2>\n<p>We now have an estimate of proficiency for each respondent on each of the attribute measured by the ROAR-PA. However, before we report these result it\u2019s important to evaluate the quality of the model. We need to ensure that the model fits well and provides accurate classifications. That is the focus of the <a href=\"https://r-dcm.org/start/specify//../../start/evaluate/\">Evaluate Model Performance</a> article.</p>\n</section><div class=\"default\" id=\"quarto-appendix\"><section class=\"level2 appendix\" id=\"session-info\"><h2 class=\"anchored quarto-appendix-heading\">Session information</h2><div class=\"quarto-appendix-contents\">\n<div class=\"cell\" data-layout-align=\"center\">\n<pre><code>#&gt; \u2500 Session info \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  version      R version 4.5.2 (2025-10-31)\n#&gt;  language     (EN)\n#&gt;  date         2026-04-04\n#&gt;  pandoc       3.9\n#&gt;  quarto       1.9.24\n#&gt;  Stan (rstan) 2.37.0\n#&gt; \n#&gt; \u2500 Packages \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  package          version     date (UTC) source\n#&gt;  bridgesampling   1.2-1       2025-11-19 CRAN (R 4.5.2)\n#&gt;  dcmdata          0.2.0       2026-03-10 CRAN (R 4.5.2)\n#&gt;  dcmstan          0.1.0       2025-11-24 CRAN (R 4.5.2)\n#&gt;  dplyr            1.2.0       2026-02-03 CRAN (R 4.5.2)\n#&gt;  forcats          1.0.1       2025-09-25 CRAN (R 4.5.0)\n#&gt;  ggplot2          4.0.2       2026-02-03 CRAN (R 4.5.2)\n#&gt;  loo              2.9.0.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  lubridate        1.9.5       2026-02-04 CRAN (R 4.5.2)\n#&gt;  measr            2.0.0.9000  2026-03-21 Github (r-dcm/measr@475bc50)\n#&gt;  posterior        1.6.1.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  purrr            1.2.1       2026-01-09 CRAN (R 4.5.2)\n#&gt;  readr            2.2.0       2026-02-19 CRAN (R 4.5.2)\n#&gt;  rlang            1.1.7       2026-01-09 CRAN (R 4.5.2)\n#&gt;  rstan            2.36.0.9000 2025-09-26 https://stan-dev.r-universe.dev (R 4.5.1)\n#&gt;  stringr          1.6.0       2025-11-04 CRAN (R 4.5.0)\n#&gt;  tibble           3.3.1       2026-01-11 CRAN (R 4.5.2)\n#&gt;  tidyr            1.3.2       2025-12-19 CRAN (R 4.5.2)\n#&gt; \n#&gt; \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500</code></pre>\n</div>\n</div></section><section class=\"quarto-appendix-contents\" id=\"quarto-bibliography\"><h2 class=\"anchored quarto-appendix-heading\">References</h2><div class=\"references csl-bib-body hanging-indent\" data-entry-spacing=\"0\" data-line-spacing=\"2\" id=\"refs\">\n<div class=\"csl-entry\" id=\"ref-dina\">\n<span class=\"nocase\">de la Torre, J., &amp; Douglas, J. A.</span> (2004). Higher-order latent trait models for cognitive diagnosis. <em>Psychometrika</em>, <em>69</em>(3), 333\u2013353. <a href=\"https://doi.org/10.1007/BF02295640\">https://doi.org/10.1007/BF02295640</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-ncrum\">\nDiBello, L. V., Stout, W. F., &amp; Roussos, L. (1995). Unified cognitive psychometric assessment likelihood-based classification techniques. In P. D. Nichols, S. F. Chipman, &amp; R. L. Brennan (Eds.), <em>Cognitively diagnostic assessment</em> (pp. 361\u2013390). Erlbaum.\n</div>\n<div class=\"csl-entry\" id=\"ref-roarpa\">\nGijbels, L., Burkhardt, A., Ma, W. A., &amp; Yeatman, J. D. (2024). Rapid online assessment of reading and phonological awareness <span>(ROAR-PA)</span>. <em>Scientific Reports</em>, <em>14</em>, Article 10249. <a href=\"https://doi.org/10.1038/s41598-024-60834-9\">https://doi.org/10.1038/s41598-024-60834-9</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-crum\">\nHartz, S. M. (2002). <em>A <span>Bayesian</span> framework for the unified model for assessing cognitive abilities: <span>Blending</span> theory with practicality</em> (Publication No. 3044108). <span>[Doctoral thesis, University of Illinois at Urbana-Champaign]. ProQuest Dissertations and Theses Global</span>.\n</div>\n<div class=\"csl-entry\" id=\"ref-lcdm-handbook\">\nHenson, R. A., &amp; Templin, J. L. (2019). Loglinear cognitive diagnostic model (<span>LCDM</span>). In <span class=\"nocase\">M. von Davier &amp; Y.-S. Lee (Eds.)</span>, <em>Handbook of diagnostic classification models</em> (pp. 171\u2013185). Springer International Publishing. <a href=\"https://doi.org/10.1007/978-3-030-05584-4_8\">https://doi.org/10.1007/978-3-030-05584-4_8</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-lcdm\">\nHenson, R. A., Templin, J. L., &amp; Willse, J. T. (2009). Defining a family of cognitive diagnosis models using log-linear models with latent variables. <em>Psychometrika</em>, <em>74</em>(2), 191\u2013210. <a href=\"https://doi.org/10.1007/s11336-008-9089-5\">https://doi.org/10.1007/s11336-008-9089-5</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-bayesnet\">\nHu, B., &amp; Templin, J. (2020). Using diagnostic classification models to validate attribute hierarchies and evaluate model fit in <span>Bayesian</span> networks. <em>Multivariate Behavioral Research</em>, <em>55</em>(2), 300\u2013311. <a href=\"https://doi.org/10.1080/00273171.2019.1632165\">https://doi.org/10.1080/00273171.2019.1632165</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-nida\">\nJunker, B. W., &amp; Sijtsma, K. (2001). Cognitive assessment models with few assumptions, and connections with nonparametric item response theory. <em>Applied Psychological Measurement</em>, <em>25</em>(3), 258\u2013272. <a href=\"https://doi.org/10.1177/01466210122032064\">https://doi.org/10.1177/01466210122032064</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-independent\">\nLee, S. Y. (2017, June 27). <em>Cognitive diagnosis model: <span>DINA</span> model with independent attributes</em>. Stan. <a href=\"https://mc-stan.org/learn-stan/case-studies/dina_independent.html\">https://mc-stan.org/learn-stan/case-studies/dina_independent.html</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-rupp-dcm\">\nRupp, A. A., Templin, J., &amp; Henson, R. A. (2010). <em>Diagnostic measurement: <span>Theory</span>, methods, and applications</em>. <span>Guilford Press</span>.\n</div>\n<div class=\"csl-entry\" id=\"ref-nido\">\nTemplin, J. (2006). <em><span>CDM</span> user\u2019s guide</em> [Unpublished manuscript]. Department of Psychology, University of Kansas.\n</div>\n<div class=\"csl-entry\" id=\"ref-hdcm\">\nTemplin, J., &amp; Bradshaw, L. (2014). Hierarchical diagnostic classification models: <span>A</span> family of models for estimating and testing attribute hierarchies. <em>Psychometrika</em>, <em>79</em>(2), 317\u2013339. <a href=\"https://doi.org/10.1007/s11336-013-9362-0\">https://doi.org/10.1007/s11336-013-9362-0</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-dino\">\nTemplin, J., &amp; Henson, R. A. (2006). Measurement of psychological disorders using cognitive diagnosis models. <em>Psychological Methods</em>, <em>11</em>(3), 287\u2013305. <a href=\"https://doi.org/10.1037/1082-989X.11.3.287\">https://doi.org/10.1037/1082-989X.11.3.287</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-loglinear\">\n<span class=\"nocase\">Xu, X., &amp; von Davier, M.</span> (2008). <em>Fitting the structured general diagnostic model to <span>NAEP</span> data</em> (Nos. RR-08-27). Educational Testing Service. <a href=\"https://files.eric.ed.gov/fulltext/EJ1111272.pdf\">https://files.eric.ed.gov/fulltext/EJ1111272.pdf</a>\n</div>\n</div></section></div>","doi":"https://doi.org/10.59350/2667p-wrq64","funding_references":null,"guid":"https://r-dcm.org/start/specify/","id":"aea44852-cc0d-4946-b107-6a19c98f47a8","image":null,"indexed":true,"indexed_at":1775360510,"language":"en","parent_doi":null,"published_at":1775357296,"reference":[{"id":"https://doi.org/10.1007/BF02295640","unstructured":"\nde la Torre, J., & Douglas, J. A. (2004). Higher-order latent trait models for cognitive diagnosis. Psychometrika, 69(3), 333\u2013353. https://doi.org/10.1007/BF02295640\n"},{"unstructured":"\nDiBello, L. V., Stout, W. F., & Roussos, L. (1995). Unified cognitive psychometric assessment likelihood-based classification techniques. In P. D. Nichols, S. F. Chipman, & R. L. Brennan (Eds.), Cognitively diagnostic assessment (pp. 361\u2013390). Erlbaum.\n"},{"id":"https://doi.org/10.1038/s41598-024-60834-9","unstructured":"\nGijbels, L., Burkhardt, A., Ma, W. A., & Yeatman, J. D. (2024). Rapid online assessment of reading and phonological awareness (ROAR-PA). Scientific Reports, 14, Article 10249. https://doi.org/10.1038/s41598-024-60834-9\n"},{"unstructured":"\nHartz, S. M. (2002). A Bayesian framework for the unified model for assessing cognitive abilities: Blending theory with practicality (Publication No. 3044108). [Doctoral thesis, University of Illinois at Urbana-Champaign]. ProQuest Dissertations and Theses Global.\n"},{"id":"https://doi.org/10.1007/978-3-030-05584-4_8","unstructured":"\nHenson, R. A., & Templin, J. L. (2019). Loglinear cognitive diagnostic model (LCDM). In M. von Davier & Y.-S. Lee (Eds.), Handbook of diagnostic classification models (pp. 171\u2013185). Springer International Publishing. https://doi.org/10.1007/978-3-030-05584-4_8\n"},{"id":"https://doi.org/10.1007/s11336-008-9089-5","unstructured":"\nHenson, R. A., Templin, J. L., & Willse, J. T. (2009). Defining a family of cognitive diagnosis models using log-linear models with latent variables. Psychometrika, 74(2), 191\u2013210. https://doi.org/10.1007/s11336-008-9089-5\n"},{"id":"https://doi.org/10.1080/00273171.2019.1632165","unstructured":"\nHu, B., & Templin, J. (2020). Using diagnostic classification models to validate attribute hierarchies and evaluate model fit in Bayesian networks. Multivariate Behavioral Research, 55(2), 300\u2013311. https://doi.org/10.1080/00273171.2019.1632165\n"},{"id":"https://doi.org/10.1177/01466210122032064","unstructured":"\nJunker, B. W., & Sijtsma, K. (2001). Cognitive assessment models with few assumptions, and connections with nonparametric item response theory. Applied Psychological Measurement, 25(3), 258\u2013272. https://doi.org/10.1177/01466210122032064\n"},{"id":"https://mc-stan.org/learn-stan/case-studies/dina_independent.html","unstructured":"\nLee, S. Y. (2017, June 27). Cognitive diagnosis model: DINA model with independent attributes. Stan. https://mc-stan.org/learn-stan/case-studies/dina_independent.html\n"},{"unstructured":"\nRupp, A. A., Templin, J., & Henson, R. A. (2010). Diagnostic measurement: Theory, methods, and applications. Guilford Press.\n"},{"unstructured":"\nTemplin, J. (2006). CDM user\u2019s guide [Unpublished manuscript]. Department of Psychology, University of Kansas.\n"},{"id":"https://doi.org/10.1007/s11336-013-9362-0","unstructured":"\nTemplin, J., & Bradshaw, L. (2014). Hierarchical diagnostic classification models: A family of models for estimating and testing attribute hierarchies. Psychometrika, 79(2), 317\u2013339. https://doi.org/10.1007/s11336-013-9362-0\n"},{"id":"https://doi.org/10.1037/1082-989X.11.3.287","unstructured":"\nTemplin, J., & Henson, R. A. (2006). Measurement of psychological disorders using cognitive diagnosis models. Psychological Methods, 11(3), 287\u2013305. https://doi.org/10.1037/1082-989X.11.3.287\n"},{"id":"https://files.eric.ed.gov/fulltext/EJ1111272.pdf","unstructured":"\nXu, X., & von Davier, M. (2008). Fitting the structured general diagnostic model to NAEP data (Nos. RR-08-27). Educational Testing Service. https://files.eric.ed.gov/fulltext/EJ1111272.pdf\n"}],"registered_at":0,"relationships":[],"rid":"enneg-wn621","status":"active","summary":"Introduction   How do you specify and estimate a diagnostic classification model (DCM) using measr? In this article, we will walk you through the steps. We start with data for building the model, learn how to specify DCMs that make different assumptions about the data, and explore how to estimate the model with\n<em>\n Stan\n</em>\n.  To use code in this article, you will need to install the following packages: dcmdata, measr, and rstan.","tags":[],"title":"Specify a diagnostic model","updated_at":1775357296,"url":"https://r-dcm.org/start/specify/","version":"v1"},{"abstract":null,"archive_url":null,"authors":[],"blog":{"archive_collection":null,"archive_host":null,"archive_prefix":null,"archive_timestamps":null,"authors":null,"canonical_url":null,"category":"socialScience","community_id":"6db161d5-9161-49cf-ab79-f33ad128ed24","created_at":1734126057,"current_feed_url":null,"description":"r-dcm blog","doi_as_guid":false,"favicon":null,"feed_format":"application/rss+xml","feed_url":"https://r-dcm.org/rss.xml","filter":null,"funding":null,"generator":"Quarto","generator_raw":"Quarto 1.6.39","home_page_url":"https://r-dcm.org","id":"5822f383-190a-4c32-9937-86ee8fc75254","indexed":true,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":0,"relative_url":null,"ror":null,"secure":true,"slug":"r_dcm","status":"active","subfield":"1803","subfield_validated":null,"title":"r-dcm blog","updated_at":1775375532.831312,"use_api":null,"use_mastodon":false,"user_id":"943e7faa-bd06-4044-80a5-9fef5df8ccdb"},"blog_name":"r-dcm blog","blog_slug":"r_dcm","content_html":"<section class=\"level2\" id=\"introduction\"><h2 class=\"anchored\" data-anchor-id=\"introduction\">Introduction</h2>\n<p>Each of the previous <a href=\"https://r-dcm.org/start/case-study//../../start/\">Get Started</a> articles has focused on introducing one component of analyzing data using diagnostic classification models (DCMs). In this article we\u2019ll combine everything we\u2019ve learned to explore a data set and answer substantive questions.</p>\n<p>To use code in this article, you will need to install the following packages: <a href=\"https://dcmdata.r-dcm.org\">dcmdata</a>, <a href=\"https://measr.r-dcm.org\">measr</a>, and <a href=\"https://mc-stan.org/rstan/\">rstan</a>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb1\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org\">measr</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for model estimation and evaluation</span></span>\n<span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># Helper packages</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmdata.r-dcm.org\">dcmdata</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for example data set</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/rstan/\">rstan</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for estimation backend</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level2\" id=\"pathways-for-instructionally-embedded-assessment-pie-data\"><h2 class=\"anchored\" data-anchor-id=\"pathways-for-instructionally-embedded-assessment-pie-data\">Pathways for Instructionally Embedded Assessment (PIE) data</h2>\n<p>We\u2019ll use data from the Pathways for Instructionally Embedded Assessment <span class=\"citation\" data-cites=\"pie-ft\">(PIE; Accessible Teaching, Learning, and Assessment Systems, 2025)</span> field test to explore attribute hierarchies. The PIE field test data is available in dcmdata, and contains responses to 15 items from 172 students.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb2\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_data</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 172 \u00d7 16</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    student `00592` `14415` `56400` `64967` `06238` `10231` `54596` `96748`</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;     &lt;int&gt;   &lt;int&gt;   &lt;int&gt;   &lt;int&gt;   &lt;int&gt;   &lt;int&gt;   &lt;int&gt;   &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 8978593       1       1       1       1       1       0       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 5231294       1       1       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 3681220       1       1       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 7763384       1       0       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 1913897       1       1       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 0692477       1       1       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 6961042       1       1       0       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 4241777       1       1       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 3068583       1       1       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 6607413       1       1       1       1       1       1       1       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 162 more rows</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 7 more variables: `97634` &lt;int&gt;, `13080` &lt;int&gt;, `27971` &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   `56741` &lt;int&gt;, `63088` &lt;int&gt;, `81175` &lt;int&gt;, `88063` &lt;int&gt;</span></span></code></pre></div></div>\n</div>\n<p>The corresponding Q-matrix maps each item three attributes. The three attributes represent successive levels along a Grade 5 mathematics learning pathway for repeating and numeric patterns <span class=\"citation\" data-cites=\"pie-pathways\">(Kim et al., 2024)</span>. Level 1 (L1) skills relate to recognizing the order of elements in a repeating pattern. Level 2 (L2) skills represent organizing two numeric patterns in a table. Level 3 (L3) skills are the ability to translate two numeric patterns into ordered pairs and represent the learning target for this pathway.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb3\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_qmatrix</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 15 \u00d7 4</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    task     L1    L2    L3</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 00592     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 14415     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 56400     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 64967     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 06238     0     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 10231     0     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 54596     0     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 96748     0     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 97634     0     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 13080     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 11 27971     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 12 56741     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 13 63088     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 14 81175     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 15 88063     0     0     1</span></span></code></pre></div></div>\n</div>\n<p>These skills develop in a natural order: you need to recognize pattern structure before you can organize patterns in a table, and organizing them in a table precedes translating them into coordinate pairs. This gives us a clear linear progression: <code>L1 -&gt; L2 -&gt; L3</code>. For more information on the data set, see <code><a href=\"https://dcmdata.r-dcm.org/reference/pie.html\">?pie</a></code> and <span class=\"citation\" data-cites=\"pie-ft\">Accessible Teaching, Learning, and Assessment Systems (2025)</span>.</p>\n<p>For a quick summary of the data, we can calculate the proportion of students that answered each question correctly (i.e., the item <em>p</em>-values).</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb4\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyverse.tidyverse.org\">tidyverse</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_data</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/summarise.html\">summarize</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/across.html\">across</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">-</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">student</span>, \\<span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">x</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/mean.html\">mean</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">x</span>, na.rm <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">TRUE</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/pivot_longer.html\">pivot_longer</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyselect.r-lib.org/reference/everything.html\">everything</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, names_to <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"task\"</span>, values_to <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pvalue\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 15 \u00d7 2</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    task  pvalue</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;  &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 00592  0.987</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 14415  0.948</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 56400  0.662</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 64967  0.948</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 06238  0.948</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 10231  0.948</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 54596  0.961</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 96748  0.857</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 97634  0.987</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 13080  0.364</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 11 27971  0.416</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 12 56741  0.403</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 13 63088  0.416</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 14 81175  0.242</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 15 88063  0.126</span></span></code></pre></div></div>\n</div>\n<p>We can then join the item <em>p</em>-values with the Q-matrix to get a sense of which attributes are the most difficult. Overall, most of the Level 1 and Level 2 items have relatively high <em>p</em>-values, with most items having a <em>p</em>-value greater than .8, whereas the Level 3 items appear more difficult, with all Level 3 <em>p</em>-values less than .5.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb5\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_data</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/summarise.html\">summarize</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/across.html\">across</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">-</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">student</span>, \\<span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">x</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/mean.html\">mean</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">x</span>, na.rm <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">TRUE</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/pivot_longer.html\">pivot_longer</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyselect.r-lib.org/reference/everything.html\">everything</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, names_to <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"task\"</span>, values_to <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pvalue\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate-joins.html\">left_join</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_qmatrix</span>, <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/join_by.html\">join_by</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">task</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/pivot_longer.html\">pivot_longer</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">L1</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">L2</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">L3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    names_to <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"attribute\"</span>,</span>\n<span>    values_to <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"measured\"</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/filter.html\">filter</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">measured</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">==</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/summarise.html\">summarize</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    measures <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/paste.html\">paste</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://stringr.tidyverse.org/reference/case.html\">str_to_title</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">attribute</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, collapse <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"/\\n\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    .by <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">task</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pvalue</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    measures <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/factor.html\">factor</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>      <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">measures</span>,</span>\n<span>      levels <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"L1\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"L2\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"L3\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>      labels <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Level 1\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Level 2\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Level 3\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>    <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pvalue</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">measures</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_point.html\">geom_point</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">measures</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    position <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/position_jitter.html\">position_jitter</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>height <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.2</span>, width <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, seed <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1213</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    size <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">4</span>,</span>\n<span>    show.legend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">FALSE</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/scale_manual.html\">scale_color_manual</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    values <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"#023047\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"#D7263D\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"#8ECAE6\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"#219EBC\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"#F3D3BD\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"#000000\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/expand_limits.html\">expand_limits</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/scale_continuous.html\">scale_x_continuous</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>breaks <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/seq.html\">seq</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/labs.html\">labs</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Item *p*-value\"</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Measured attributes\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"Scatter plot showing item p-values on the x-axis and attribute combinations from the Q-matrix on the y-axis.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-pvalue-plot\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-pvalue-plot-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"Scatter plot showing item p-values on the x-axis and attribute combinations from the Q-matrix on the y-axis.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/case-study/index_files/figure-html/fig-pvalue-plot-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-pvalue-plot-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a01: Item <em>p</em>-values by pathway level.\n</figcaption></figure>\n</div>\n</div>\n</div>\n</section><section class=\"level2\" id=\"model-estimation\"><h2 class=\"anchored\" data-anchor-id=\"model-estimation\">Model estimation</h2>\n<p>Now that we have a feel for our data, we will estimate a DCM. As we saw in <a href=\"https://r-dcm.org/start/case-study//../../start/specify/\">Specify a Diagnostic Model</a>, we can create a DCM specification with <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code>. We\u2019ll start by estimating a loglinear cognitive diagnostic model (LCDM) with an unconstrained structural model. The LCDM is a general diagnostic model that allows for different attribute relationships on items (e.g., compensatory, non-compensatory) and subsumes many other types of DCMs <span class=\"citation\" data-cites=\"lcdm lcdm-handbook\">(Henson et al., 2009; Henson &amp; Templin, 2019)</span>. The unconstrained structural model places no constraints on the attribute relationships. Our theory indicates that there is a linear progression among the attributes, but it\u2019s not a bad idea to start with fewer contrains and work our down to a simpler model.</p>\n<p>As in the <a href=\"https://r-dcm.org/start/case-study//../../start/evaluate/\">Evaluate Model Performance</a> article, we want to estimate the model using MCMC so that we have the full range of model fit methods available to us. We can customize how the MCMC process is executed with <a href=\"https://mc-stan.org/rstan/\">rstan</a>. For this example, we specified 4 chains, each with 2,000 warmup iterations and 500 retained iterations for 2,500 iterations total. This results in a total posterior distribution of 2,000 samples for each parameter (i.e., 500 iterations from each of the 4 chains).</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb6\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_spec</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"task\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_lcdm</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_spec</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"student\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"mcmc\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"rstan\"</span>,</span>\n<span>  chains <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">4</span>,</span>\n<span>  iter <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2500</span>,</span>\n<span>  warmup <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2000</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pie-lcdm-uncst-rstn\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</div>\n<p>Now that we\u2019ve estimated a model, let\u2019s examine the output. There are three types of information we\u2019ll examine: structural parameters, item parameters, and student proficiency.</p>\n<section class=\"level3\" id=\"structural-parameters\"><h3 class=\"anchored\" data-anchor-id=\"structural-parameters\">Structural parameters</h3>\n<p>The structural parameters define the base rate of membership in each of attribute profiles. Because the PIE data consists of 3 dichotomous attributes, there are a total of 2<sup>3</sup> = 8 possible profiles, or classes. We can view the possible profiles using <code><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract()</a></code>, which extracts different aspects of a model estimated with measr. The order of the attributes in the profiles corresponds to the order the attributes were listed in the Q-matrix used to estimate the model. This means that attributes 1, 2, and 3 correspond to morphosyntactic, cohesive, and lexical rules, respectively.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb7\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_classes</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_lcdm</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"classes\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_classes</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 8 \u00d7 4</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   class      L1    L2    L3</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;   &lt;int&gt; &lt;int&gt; &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 [0,0,0]     0     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 [1,0,0]     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 [0,1,0]     0     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 [0,0,1]     0     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 5 [1,1,0]     1     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 6 [1,0,1]     1     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 7 [0,1,1]     0     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 8 [1,1,1]     1     1     1</span></span></code></pre></div></div>\n</div>\n<p>We can also extract the estimated structural parameters themselves using <code><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract()</a></code>. For structural parameters, we see the <code>class</code>, or the attribute profile, and the estimated proportion of students in that class with a measure of error (the standard deviation of the posterior). For example, nearly 9% of students are estimated to not be proficient on any of the pathway levels (class 1), and 31% are estimated to proficient on just pathway levels 1 and 2 (class 5).</p>\n<p>Also note that some classes</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb8\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">structural_parameters</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_lcdm</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"strc_param\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">structural_parameters</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 8 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   class      L1    L2    L3       estimate</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;   &lt;int&gt; &lt;int&gt; &lt;int&gt;     &lt;rvar[1d]&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 [0,0,0]     0     0     0  0.089 \u00b1 0.066</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 [1,0,0]     1     0     0  0.095 \u00b1 0.082</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 [0,1,0]     0     1     0  0.133 \u00b1 0.107</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 [0,0,1]     0     0     1  0.051 \u00b1 0.047</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 5 [1,1,0]     1     1     0  0.314 \u00b1 0.134</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 6 [1,0,1]     1     0     1  0.130 \u00b1 0.078</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 7 [0,1,1]     0     1     1  0.070 \u00b1 0.058</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 8 [1,1,1]     1     1     1  0.118 \u00b1 0.078</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level3\" id=\"item-parameters\"><h3 class=\"anchored\" data-anchor-id=\"item-parameters\">Item parameters</h3>\n<p>The item parameters define the log-odds of a student in each class providing a correct response. We can again extract our estimated item parameters using <code><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract()</a></code>. Here, the <code>estimate</code> column reports estimated value for each parameter and a measure of the associated error (i.e., the standard deviation of the posterior distribution). For example, task 00592 has two parameters, as it measures two attributes:</p>\n<ol type=\"1\">\n<li>An intercept, which represents the log-odds of providing a correct response for a student who is not proficient on the attribute this item measures (i.e., Level 1).</li>\n<li>A main effect for Level 1 skills, which represents the increase in the log-odds of providing a correct response for a student who is proficient on that attribute.</li>\n</ol>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb9\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">item_parameters</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_lcdm</span>, what <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item_param\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">item_parameters</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 30 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    task  type       attributes coefficient      estimate</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt; &lt;chr&gt;      &lt;chr&gt;      &lt;chr&gt;          &lt;rvar[1d]&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 00592 intercept  &lt;NA&gt;       l1_0          3.07 \u00b1 0.98</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 00592 maineffect L1         l1_11         2.78 \u00b1 2.94</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 14415 intercept  &lt;NA&gt;       l2_0          1.80 \u00b1 0.91</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 14415 maineffect L1         l2_11         3.03 \u00b1 2.92</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 56400 intercept  &lt;NA&gt;       l3_0         -0.36 \u00b1 0.87</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 56400 maineffect L1         l3_11         1.89 \u00b1 1.77</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 64967 intercept  &lt;NA&gt;       l4_0          1.94 \u00b1 0.79</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 64967 maineffect L1         l4_11         2.49 \u00b1 2.53</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 06238 intercept  &lt;NA&gt;       l5_0          2.25 \u00b1 0.70</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 06238 maineffect L2         l5_12         1.55 \u00b1 1.92</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 20 more rows</span></span></code></pre></div></div>\n</div>\n</section></section><section class=\"level2\" id=\"model-evaluation\"><h2 class=\"anchored\" data-anchor-id=\"model-evaluation\">Model evaluation</h2>\n<p>A fully Bayesian estimation allows us to evaluate model fit using posterior predictive model checks (PPMCs). Specifically, measr supports a PPMC of the overall raw score distribution as described by <span class=\"citation\" data-cites=\"park2015\">Park et al. (2015)</span> and <span class=\"citation\" data-cites=\"thompson-bayes\">Thompson (2019)</span>. For each of the replicated data sets, we calculate the number of students with each raw score (i.e., the number of correct responses). This can be done using <code><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc()</a></code>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb10\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_lcdm</span>, model_fit <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"raw_score\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $ppmc_raw_score</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 1 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   obs_chisq ppmc_mean `2.5%` `97.5%`    ppp</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;       &lt;dbl&gt;     &lt;dbl&gt;  &lt;dbl&gt;   &lt;dbl&gt;  &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1      36.9      17.1   4.80    41.9 0.0455</span></span></code></pre></div></div>\n</div>\n<p>In the output, the posterior predictive <em>p</em>-value (<em>ppp</em>) is small (&lt;.05), indicating poor fit. To unpack what this really means, let\u2019s visualize the PPMC. In the following figure, the blue bars show the credible intervals for the number of students we would expect to see at each raw score point, given our estimated model parameters. The red dots and line indicate the number of students that were observed at each raw score point in our observed data (<code>pie_ft_data</code>). For example, the model expects there to be between about 0 and 20 students with a total score of 7. In the observed data, there were 2 students with a total score of 7. In general, the model does a fairly good job of capturing the observed data. However, there are several places where the observed values fall close to the edge of the expected distribution. So even though the model doesn\u2019t miss anywhere by a lot, the accumulation of small misses leads to poor fit.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb11\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/\">ggdist</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_scores</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_data</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/pivot_longer.html\">pivot_longer</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>cols <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">-</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"student\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/summarise.html\">summarize</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>raw_score <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/sum.html\">sum</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">value</span>, na.rm <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">TRUE</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, .by <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">student</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/count.html\">count</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/complete.html\">complete</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>raw_score <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">:</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">15</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/list.html\">list</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>n <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0L</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span></span>\n<span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_lcdm</span>, model_fit <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"raw_score\"</span>, return_draws <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2000</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://purrr.tidyverse.org/reference/pluck.html\">pluck</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"ppmc_raw_score\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/select.html\">select</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">rawscore_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/unnest.html\">unnest</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">rawscore_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/unnest.html\">unnest</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_scores</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/reference/stat_interval.html\">stat_interval</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">n</span>, color_ramp <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes_eval.html\">after_stat</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">level</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    point_interval <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"mean_qi\"</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    linewidth <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">5</span>,</span>\n<span>    show.legend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">FALSE</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_path.html\">geom_line</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_scores</span>,</span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">n</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_point.html\">geom_point</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_scores</span>,</span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">n</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Observed Data\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    shape <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">21</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    size <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/reference/scale_colour_ramp.html\">scale_color_ramp_discrete</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    from <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"white\"</span>,</span>\n<span>    range <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.2</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    breaks <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.5</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.8</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.95</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    labels <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">~</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/sprintf.html\">sprintf</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"%0.2f\"</span>, <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/numeric.html\">as.numeric</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">.x</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/scale_manual.html\">scale_fill_manual</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>values <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/scale_continuous.html\">scale_x_continuous</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>breaks <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/seq.html\">seq</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">15</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, expand <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">scale_y_comma</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/labs.html\">labs</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Raw score\"</span>,</span>\n<span>    y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Students\"</span>,</span>\n<span>    color_ramp <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Credible Interval\"</span>,</span>\n<span>    fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">NULL</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/guides.html\">guides</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/guide_legend.html\">guide_legend</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>override.aes <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/list.html\">list</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>size <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"Line plot showing the observed number of students at each raw score point, superimposed over an interval showing the expected number of students at each score point according to the estimated model.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-rawscore-dist\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-rawscore-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"Line plot showing the observed number of students at each raw score point, superimposed over an interval showing the expected number of students at each score point according to the estimated model.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/case-study/index_files/figure-html/fig-rawscore-dist-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-rawscore-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a02: Posterior predictive check for the raw score distribution.\n</figcaption></figure>\n</div>\n</div>\n</div>\n<p>In summary, the raw score PPMC indicates poor fit of our estimated LCDM to the observed data. This is not unexpected, given that some classes are very small. Recall from our discussion of the estimated structural parameters that there are three classes that combine to include less than 4% of all students. When classes are this small, parameter estimates can be unstable, leading to poor model fit <span class=\"citation\" data-cites=\"hdcm wang2021\">(e.g., Templin &amp; Bradshaw, 2014; Wang &amp; Lu, 2021)</span>.</p>\n</section><section class=\"level2\" id=\"adding-attribute-structure\"><h2 class=\"anchored\" data-anchor-id=\"adding-attribute-structure\">Adding attribute structure</h2>\n<p>Model fit can often occur if there are small classes, causing parameter estimates to be unstable <span class=\"citation\" data-cites=\"hdcm wang2021\">(e.g., Templin &amp; Bradshaw, 2014; Wang &amp; Lu, 2021)</span>. In our LCDM model, there are class that have small base rate estimates, and which are also inconsistent with the ordering of the levels in the learning pathway. For example, classes [0,0,1] and [0,1,1] have relatively low base rates and represent profiles where students are proficient on Levels 2 and/or 3 without first demonstrating proficiency of Level 1.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb12\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">structural_parameters</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 8 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   class      L1    L2    L3       estimate</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;   &lt;int&gt; &lt;int&gt; &lt;int&gt;     &lt;rvar[1d]&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 [0,0,0]     0     0     0  0.089 \u00b1 0.066</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 [1,0,0]     1     0     0  0.095 \u00b1 0.082</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 [0,1,0]     0     1     0  0.133 \u00b1 0.107</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 [0,0,1]     0     0     1  0.051 \u00b1 0.047</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 5 [1,1,0]     1     1     0  0.314 \u00b1 0.134</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 6 [1,0,1]     1     0     1  0.130 \u00b1 0.078</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 7 [0,1,1]     0     1     1  0.070 \u00b1 0.058</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 8 [1,1,1]     1     1     1  0.118 \u00b1 0.078</span></span></code></pre></div></div>\n</div>\n<p>We can estimate a new model that encodes our proposed hierarchy. Specifically, we\u2019ll estimate a model that uses a Bayesian Network for the structural model. As we discussed in the <a href=\"https://r-dcm.org/start/case-study//../../start/hierarchies/\">Define Attribute Relationships</a> article, the BayesNet puts soft constraints on the possible profiles. All profiles are still allowed, but students are pushed toward the profiles that are consistent with our proposed linear hierarchy of the pathway levels.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb13\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">bayesnet_spec</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"task\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">bayesnet</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"L1 -&gt; L2 -&gt; L3\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_bayesnet</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">bayesnet_spec</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_ft_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"student\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"mcmc\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"rstan\"</span>,</span>\n<span>  chains <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">4</span>,</span>\n<span>  iter <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2500</span>,</span>\n<span>  warmup <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2000</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pie-lcdm-bayesnet-rstn\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</div>\n<p>Figure\u00a03 shows the estimated base rates of each profile under the original unconstrained and BayesNet model. As expected, we see fewer students in the unexpected profiles (e.g., [0,1,0], [0,0,1]) and more students in profiles [1,1,0] and [1,1,1].</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb14\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/bind_rows.html\">bind_rows</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">structural_parameters</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>estimate <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/posterior/reference/rvar-summaries-over-draws.html\">E</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">estimate</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Unconstrained\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/select.html\">select</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">model</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">estimate</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_bayesnet</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"strc_param\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>estimate <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/posterior/reference/rvar-summaries-over-draws.html\">E</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">estimate</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"BayesNet\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/select.html\">select</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">model</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">estimate</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>class <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://forcats.tidyverse.org/reference/fct_inorder.html\">fct_inorder</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">estimate</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_bar.html\">geom_col</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">model</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, position <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/position_dodge.html\">position_dodge</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, width <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.5</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">scale_fill_okabeito</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>limits <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Unconstrained\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"BayesNet\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/labs.html\">labs</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Base rate\"</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Profile\"</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">NULL</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"Bar chart showing class base rats on the x-axis and profiles on the y-axis.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-strc-compare\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-strc-compare-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"Bar chart showing class base rats on the x-axis and profiles on the y-axis.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/case-study/index_files/figure-html/fig-strc-compare-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-strc-compare-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a03: Base rates for the unconstrained and BayesNet structural models.\n</figcaption></figure>\n</div>\n</div>\n</div>\n<section class=\"level3\" id=\"structure-evaluation\"><h3 class=\"anchored\" data-anchor-id=\"structure-evaluation\">Structure evaluation</h3>\n<p>Let\u2019s see how the new structural model has affected model fit. We\u2019ll once again check the raw score PPMC. With the BayesNet structural model, we see much better fit, with a <em>ppp</em> value of 0.232.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb15\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_bayesnet</span>, model_fit <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"raw_score\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $ppmc_raw_score</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 1 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   obs_chisq ppmc_mean `2.5%` `97.5%`   ppp</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;       &lt;dbl&gt;     &lt;dbl&gt;  &lt;dbl&gt;   &lt;dbl&gt; &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1      20.2      16.8   4.87    54.6 0.232</span></span></code></pre></div></div>\n</div>\n<p>We can also use model comparisons and leave-one-out cross validation (LOO) to evaluate the hierarchy imposed by the BayesNet. Here, we see that the BayesNet is the preferred model, although the difference between the models is negligible. This is what we would hope to see. Imposing the hierarchy has not hurt model fit, and the fewer parameters of the BayesNet makes it preferred.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb16\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/loo/reference/loo_compare.html\">loo_compare</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_lcdm</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_bayesnet</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;              elpd_diff se_diff</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; pie_bayesnet  0.0       0.0   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; pie_lcdm     -1.7       1.4</span></span></code></pre></div></div>\n</div>\n<p>Finally, we can also examine classification reliability for the BayesNet model. Under the BayesNet hierarchy, all three pathway levels have high levels of both classification accuracy and consistency, indicating that we can have confidence in the classifications made by the model.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb17\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pie_bayesnet</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"classification_reliability\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 3 \u00d7 3</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   attribute accuracy consistency</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;        &lt;dbl&gt;       &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 L1           0.868       0.971</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 L2           0.906       0.981</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 L3           0.924       0.864</span></span></code></pre></div></div>\n</div>\n</section></section><section class=\"level2\" id=\"wrapping-up\"><h2 class=\"anchored\" data-anchor-id=\"wrapping-up\">Wrapping up</h2>\n<p>In this case study, we estimated an LCDM to analyze the PIE field test data. From the model evalution, we saw that model fit indices indicated that the LCDM does not do a great job of representing the observed data. This was likely due to dependencies among the attributes that were ignored by the unconstrained structural model. To address this issue, we fit another model where the stuctural model was parameterized as a Bayesian Network with a defined linear hierarchy of the pathway levels. The model with the BayesNet structural model showed improved absolute model fit, was the preferred model by the LOO, and demonstrated high levels of classification accuracy and consistency. Thus, we have strong technical evidence that this model would be sufficient for reporting student proficiency on the measured attributes.</p>\n</section><div class=\"default\" id=\"quarto-appendix\"><section class=\"level2 appendix\" id=\"session-info\"><h2 class=\"anchored quarto-appendix-heading\">Session information</h2><div class=\"quarto-appendix-contents\">\n<div class=\"cell\" data-layout-align=\"center\">\n<pre><code>#&gt; \u2500 Session info \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  version      R version 4.5.2 (2025-10-31)\n#&gt;  language     (EN)\n#&gt;  date         2026-04-04\n#&gt;  pandoc       3.9\n#&gt;  quarto       1.9.24\n#&gt;  Stan (rstan) 2.37.0\n#&gt; \n#&gt; \u2500 Packages \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  package          version     date (UTC) source\n#&gt;  bridgesampling   1.2-1       2025-11-19 CRAN (R 4.5.2)\n#&gt;  dcmdata          0.2.0       2026-03-10 CRAN (R 4.5.2)\n#&gt;  dcmstan          0.1.0       2025-11-24 CRAN (R 4.5.2)\n#&gt;  dplyr            1.2.0       2026-02-03 CRAN (R 4.5.2)\n#&gt;  forcats          1.0.1       2025-09-25 CRAN (R 4.5.0)\n#&gt;  ggplot2          4.0.2       2026-02-03 CRAN (R 4.5.2)\n#&gt;  loo              2.9.0.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  lubridate        1.9.5       2026-02-04 CRAN (R 4.5.2)\n#&gt;  measr            2.0.0.9000  2026-03-21 Github (r-dcm/measr@475bc50)\n#&gt;  posterior        1.6.1.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  purrr            1.2.1       2026-01-09 CRAN (R 4.5.2)\n#&gt;  readr            2.2.0       2026-02-19 CRAN (R 4.5.2)\n#&gt;  rlang            1.1.7       2026-01-09 CRAN (R 4.5.2)\n#&gt;  rstan            2.36.0.9000 2025-09-26 https://stan-dev.r-universe.dev (R 4.5.1)\n#&gt;  stringr          1.6.0       2025-11-04 CRAN (R 4.5.0)\n#&gt;  tibble           3.3.1       2026-01-11 CRAN (R 4.5.2)\n#&gt;  tidyr            1.3.2       2025-12-19 CRAN (R 4.5.2)\n#&gt; \n#&gt; \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500</code></pre>\n</div>\n</div></section><section class=\"quarto-appendix-contents\" id=\"quarto-bibliography\"><h2 class=\"anchored quarto-appendix-heading\">References</h2><div class=\"references csl-bib-body hanging-indent\" data-entry-spacing=\"0\" data-line-spacing=\"2\" id=\"refs\">\n<div class=\"csl-entry\" id=\"ref-pie-ft\">\nAccessible Teaching, Learning, and Assessment Systems. (2025). <em>PIE assessment design and development</em>. University of Kansas. <a href=\"https://pie.atlas4learning.org/sites/default/files/documents/resources/PIE_Assessment_Design_Development_Technical_Report.pdf\">https://pie.atlas4learning.org/sites/default/files/documents/resources/PIE_Assessment_Design_Development_Technical_Report.pdf</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-lcdm-handbook\">\nHenson, R. A., &amp; Templin, J. L. (2019). Loglinear cognitive diagnostic model (<span>LCDM</span>). In <span class=\"nocase\">M. von Davier &amp; Y.-S. Lee (Eds.)</span>, <em>Handbook of diagnostic classification models</em> (pp. 171\u2013185). Springer International Publishing. <a href=\"https://doi.org/10.1007/978-3-030-05584-4_8\">https://doi.org/10.1007/978-3-030-05584-4_8</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-lcdm\">\nHenson, R. A., Templin, J. L., &amp; Willse, J. T. (2009). Defining a family of cognitive diagnosis models using log-linear models with latent variables. <em>Psychometrika</em>, <em>74</em>(2), 191\u2013210. <a href=\"https://doi.org/10.1007/s11336-008-9089-5\">https://doi.org/10.1007/s11336-008-9089-5</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-pie-pathways\">\nKim, E. M., Nash, B., &amp; Swinburne Romine, R. (2024). <em>Pathways for instructionally embedded assessment (<span>PIE</span>): <span>Developing</span> learning pathways for the <span>PIE</span> assessment system</em>. University of Kansas; Accessible Teaching, Learning,; Assessment Systems. <a href=\"https://pie.atlas4learning.org/sites/default/files/documents/resources/Developing_Learning_Pathways_for_the_PIE_Assessment_System.pdf\">https://pie.atlas4learning.org/sites/default/files/documents/resources/Developing_Learning_Pathways_for_the_PIE_Assessment_System.pdf</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-park2015\">\nPark, J. Y., Johnson, M. S., &amp; Lee, Y.-S. (2015). Posterior predictive model checks for cognitive diagnostic models. <em>International Journal of Quantitative Research in Education</em>, <em>2</em>(3\u20134), 244\u2013264. <a href=\"https://doi.org/10.1504/IJQRE.2015.071738\">https://doi.org/10.1504/IJQRE.2015.071738</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-hdcm\">\nTemplin, J., &amp; Bradshaw, L. (2014). Hierarchical diagnostic classification models: <span>A</span> family of models for estimating and testing attribute hierarchies. <em>Psychometrika</em>, <em>79</em>(2), 317\u2013339. <a href=\"https://doi.org/10.1007/s11336-013-9362-0\">https://doi.org/10.1007/s11336-013-9362-0</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-thompson-bayes\">\nThompson, W. J. (2019). <em>Bayesian psychometrics for diagnostic assessments: <span>A</span> proof of concept</em> (Research Report Nos. No. 19-01). <span>University of Kansas; Accessible Teaching, Learning, and Assessment Systems</span>. <a href=\"https://doi.org/10.35542/osf.io/jzqs8\">https://doi.org/10.35542/osf.io/jzqs8</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-wang2021\">\nWang, C., &amp; Lu, J. (2021). Learning attribute hierarchies from data: Two exploratory approaches. <em>Journal of Educational and Behavioral Statistics</em>, <em>46</em>(1), 58\u201384. <a href=\"https://doi.org/10.3102/1076998620931094\">https://doi.org/10.3102/1076998620931094</a>\n</div>\n</div></section></div>","doi":"https://doi.org/10.59350/c2f8e-18m08","funding_references":null,"guid":"https://r-dcm.org/start/case-study/","id":"c94fe4f4-f8fe-49c1-8795-5d8ca0cee408","image":"https://r-dcm.org/start/case-study/index_files/figure-html/fig-pvalue-plot-1.png","indexed":true,"indexed_at":1775360512,"language":"en","parent_doi":null,"published_at":1775357296,"reference":[{"id":"https://pie.atlas4learning.org/sites/default/files/documents/resources/PIE_Assessment_Design_Development_Technical_Report.pdf","unstructured":"\nAccessible Teaching, Learning, and Assessment Systems. (2025). PIE assessment design and development. University of Kansas. https://pie.atlas4learning.org/sites/default/files/documents/resources/PIE_Assessment_Design_Development_Technical_Report.pdf\n"},{"id":"https://doi.org/10.1007/978-3-030-05584-4_8","unstructured":"\nHenson, R. A., & Templin, J. L. (2019). Loglinear cognitive diagnostic model (LCDM). In M. von Davier & Y.-S. Lee (Eds.), Handbook of diagnostic classification models (pp. 171\u2013185). Springer International Publishing. https://doi.org/10.1007/978-3-030-05584-4_8\n"},{"id":"https://doi.org/10.1007/s11336-008-9089-5","unstructured":"\nHenson, R. A., Templin, J. L., & Willse, J. T. (2009). Defining a family of cognitive diagnosis models using log-linear models with latent variables. Psychometrika, 74(2), 191\u2013210. https://doi.org/10.1007/s11336-008-9089-5\n"},{"id":"https://pie.atlas4learning.org/sites/default/files/documents/resources/Developing_Learning_Pathways_for_the_PIE_Assessment_System.pdf","unstructured":"\nKim, E. M., Nash, B., & Swinburne Romine, R. (2024). Pathways for instructionally embedded assessment (PIE): Developing learning pathways for the PIE assessment system. University of Kansas; Accessible Teaching, Learning,; Assessment Systems. https://pie.atlas4learning.org/sites/default/files/documents/resources/Developing_Learning_Pathways_for_the_PIE_Assessment_System.pdf\n"},{"id":"https://doi.org/10.1504/IJQRE.2015.071738","unstructured":"\nPark, J. Y., Johnson, M. S., & Lee, Y.-S. (2015). Posterior predictive model checks for cognitive diagnostic models. International Journal of Quantitative Research in Education, 2(3\u20134), 244\u2013264. https://doi.org/10.1504/IJQRE.2015.071738\n"},{"id":"https://doi.org/10.1007/s11336-013-9362-0","unstructured":"\nTemplin, J., & Bradshaw, L. (2014). Hierarchical diagnostic classification models: A family of models for estimating and testing attribute hierarchies. Psychometrika, 79(2), 317\u2013339. https://doi.org/10.1007/s11336-013-9362-0\n"},{"id":"https://doi.org/10.35542/osf.io/jzqs8","unstructured":"\nThompson, W. J. (2019). Bayesian psychometrics for diagnostic assessments: A proof of concept (Research Report Nos. No. 19-01). University of Kansas; Accessible Teaching, Learning, and Assessment Systems. https://doi.org/10.35542/osf.io/jzqs8\n"},{"id":"https://doi.org/10.3102/1076998620931094","unstructured":"\nWang, C., & Lu, J. (2021). Learning attribute hierarchies from data: Two exploratory approaches. Journal of Educational and Behavioral Statistics, 46(1), 58\u201384. https://doi.org/10.3102/1076998620931094\n"}],"registered_at":0,"relationships":[],"rid":"sqkzc-wjq83","status":"active","summary":"Introduction   Each of the previous Get Started articles has focused on introducing one component of analyzing data using diagnostic classification models (DCMs). In this article we\u2019ll combine everything we\u2019ve learned to explore a data set and answer substantive questions. To use code in this article, you will need to install the following packages: dcmdata, measr, and rstan.","tags":[],"title":"A diagnostic assessment case study","updated_at":1775357296,"url":"https://r-dcm.org/start/case-study/","version":"v1"},{"abstract":null,"archive_url":null,"authors":[],"blog":{"archive_collection":null,"archive_host":null,"archive_prefix":null,"archive_timestamps":null,"authors":null,"canonical_url":null,"category":"socialScience","community_id":"6db161d5-9161-49cf-ab79-f33ad128ed24","created_at":1734126057,"current_feed_url":null,"description":"r-dcm blog","doi_as_guid":false,"favicon":null,"feed_format":"application/rss+xml","feed_url":"https://r-dcm.org/rss.xml","filter":null,"funding":null,"generator":"Quarto","generator_raw":"Quarto 1.6.39","home_page_url":"https://r-dcm.org","id":"5822f383-190a-4c32-9937-86ee8fc75254","indexed":true,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":0,"relative_url":null,"ror":null,"secure":true,"slug":"r_dcm","status":"active","subfield":"1803","subfield_validated":null,"title":"r-dcm blog","updated_at":1775375532.831312,"use_api":null,"use_mastodon":false,"user_id":"943e7faa-bd06-4044-80a5-9fef5df8ccdb"},"blog_name":"r-dcm blog","blog_slug":"r_dcm","content_html":"<section class=\"level2\" id=\"introduction\"><h2 class=\"anchored\" data-anchor-id=\"introduction\">Introduction</h2>\n<p>We\u2019ve seen how to specify and estimate a model, and what it looks like when a model doesn\u2019t perform well. One of the most productive places to start when something seems off is the structural model. The structural model controls the assumptions your DCM makes about how attributes relate to each other. By default, the unconstrained model makes no assumptions at all and every possible attribute profile is freely estimated. That flexibility is a virtue when you have no prior theory about attribute relationships. However, if there are profiles that are rarely observed, attempting to estimate the base rates and item parameters associated with those profiles can result in issues with model fit <span class=\"citation\" data-cites=\"hdcm wang2021\">(Templin &amp; Bradshaw, 2014; Wang &amp; Lu, 2021)</span>. When the nature of the domain suggests that proficiency on one skill is required before another can develop, you can encode, and test, that theory directly in the model. In this article we\u2019ll learn how to do exactly that with attribute hierarchies.</p>\n<p>To use code in this article, you will need to install the following packages: <a href=\"https://mc-stan.org/cmdstanr/\">cmdstanr</a>, <a href=\"https://dcmdata.r-dcm.org\">dcmdata</a>, and <a href=\"https://measr.r-dcm.org\">measr</a>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb1\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org\">measr</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for model estimation and evaluation</span></span>\n<span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># Helper packages</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmdata.r-dcm.org\">dcmdata</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for example data set</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/cmdstanr/\">cmdstanr</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for estimation backend</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level2\" id=\"examination-for-the-certificate-of-proficiency-in-english-ecpe-data\"><h2 class=\"anchored\" data-anchor-id=\"examination-for-the-certificate-of-proficiency-in-english-ecpe-data\">Examination for the Certificate of Proficiency in English (ECPE) data</h2>\n<p>To demonstrate how to specify heirarhcies with measr, we\u2019ll use the ECPE data. The ECPE data has been widely used in the DCM research literature, and was the inspiration used by <span class=\"citation\" data-cites=\"hdcm\">Templin &amp; Bradshaw (2014)</span> for their development of the hierarchcial DCM. The ECPE data measures three attributes related to rules of the English language. In total, the data set contains responses to 28 items from 2,922 respondents.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb2\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_data</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 2,922 \u00d7 29</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    resp_id    E1    E2    E3    E4    E5    E6    E7    E8    E9   E10   E11</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;      &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1       1     1     1     1     0     1     1     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2       2     1     1     1     1     1     1     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3       3     1     1     1     1     1     1     0     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4       4     1     1     1     1     1     1     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5       5     1     1     1     1     1     1     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6       6     1     1     1     1     1     1     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7       7     1     1     1     1     1     1     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8       8     0     1     1     1     1     1     0     1     1     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9       9     1     1     1     1     1     1     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10      10     1     1     1     1     0     0     1     1     1     1     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 2,912 more rows</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 17 more variables: E12 &lt;int&gt;, E13 &lt;int&gt;, E14 &lt;int&gt;, E15 &lt;int&gt;, E16 &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   E17 &lt;int&gt;, E18 &lt;int&gt;, E19 &lt;int&gt;, E20 &lt;int&gt;, E21 &lt;int&gt;, E22 &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   E23 &lt;int&gt;, E24 &lt;int&gt;, E25 &lt;int&gt;, E26 &lt;int&gt;, E27 &lt;int&gt;, E28 &lt;int&gt;</span></span></code></pre></div></div>\n</div>\n<p>In addition to the response data, we also have a Q-matrix defining which items measure each of the 3 attributes. These attributes represent knowledge of differnt rules of the English language:</p>\n<ul>\n<li>Lexical: vocabulary (e.g., word choices, idioms)</li>\n<li>Cohesive: connection (e.g., pronouns, conjunctions, transitions)</li>\n<li>Morphosyntactic: grammar (e.g., prefixes and suffixes, tense, verb conjugations)</li>\n</ul>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb3\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_qmatrix</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 28 \u00d7 4</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    item_id morphosyntactic cohesive lexical</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;             &lt;int&gt;    &lt;int&gt;   &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 E1                    1        1       0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 E2                    0        1       0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 E3                    1        0       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 E4                    0        0       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 E5                    0        0       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 E6                    0        0       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 E7                    1        0       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 E8                    0        1       0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 E9                    0        0       1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 E10                   1        0       0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 18 more rows</span></span></code></pre></div></div>\n</div>\n<p>For more information on the data, see <code><a href=\"https://dcmdata.r-dcm.org/reference/ecpe.html\">?ecpe</a></code>.</p>\n</section><section class=\"level2\" id=\"when-attributes-have-order\"><h2 class=\"anchored\" data-anchor-id=\"when-attributes-have-order\">When attributes have order</h2>\n<p>Without any hierarchy, the number of possible attribute profiles grows exponentially with the number of attributes. With three attributes, there are 2<sup>3</sup> = 8 possible profiles that represent every combination of proficiency and non-proficiency across the three attributes.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"cell quarto-float quarto-figure quarto-figure-center anchored\" data-layout-align=\"center\" id=\"tbl-unconstrained-profiles\">\n<figure class=\"quarto-float quarto-float-tbl figure\"><figcaption class=\"quarto-float-caption-top quarto-float-caption quarto-float-tbl\" id=\"tbl-unconstrained-profiles-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nTable\u00a01: All possible attribute profiles under an unconstrained structural model\n</figcaption><div aria-describedby=\"tbl-unconstrained-profiles-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<div class=\"cell-output-display\">\n<div id=\"rwiajevbsk\" style=\"padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;\">\n<style>@import url(\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap\");\n#rwiajevbsk table {\n  font-family: 'Open Sans', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n#rwiajevbsk thead, #rwiajevbsk tbody, #rwiajevbsk tfoot, #rwiajevbsk tr, #rwiajevbsk td, #rwiajevbsk th {\n  border-style: none;\n}\n\n#rwiajevbsk p {\n  margin: 0;\n  padding: 0;\n}\n\n#rwiajevbsk .gt_table {\n  display: table;\n  border-collapse: collapse;\n  line-height: normal;\n  margin-left: auto;\n  margin-right: auto;\n  color: #333333;\n  font-size: 16px;\n  font-weight: normal;\n  font-style: normal;\n  background-color: #FFFFFF;\n  width: auto;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #A8A8A8;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 1px;\n  border-bottom-color: #A8A8A8;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_caption {\n  padding-top: 4px;\n  padding-bottom: 4px;\n}\n\n#rwiajevbsk .gt_title {\n  color: #333333;\n  font-size: 125%;\n  font-weight: initial;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-color: #FFFFFF;\n  border-bottom-width: 0;\n}\n\n#rwiajevbsk .gt_subtitle {\n  color: #333333;\n  font-size: 85%;\n  font-weight: initial;\n  padding-top: 3px;\n  padding-bottom: 5px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-color: #FFFFFF;\n  border-top-width: 0;\n}\n\n#rwiajevbsk .gt_heading {\n  background-color: #FFFFFF;\n  text-align: left;\n  border-bottom-color: #FFFFFF;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_bottom_border {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_col_headings {\n  border-top-style: solid;\n  border-top-width: 3px;\n  border-top-color: #FFFFFF;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_col_heading {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 6px;\n  padding-left: 5px;\n  padding-right: 5px;\n  overflow-x: hidden;\n}\n\n#rwiajevbsk .gt_column_spanner_outer {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  padding-top: 0;\n  padding-bottom: 0;\n  padding-left: 4px;\n  padding-right: 4px;\n}\n\n#rwiajevbsk .gt_column_spanner_outer:first-child {\n  padding-left: 0;\n}\n\n#rwiajevbsk .gt_column_spanner_outer:last-child {\n  padding-right: 0;\n}\n\n#rwiajevbsk .gt_column_spanner {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 5px;\n  overflow-x: hidden;\n  display: inline-block;\n  width: 100%;\n}\n\n#rwiajevbsk .gt_spanner_row {\n  border-bottom-style: hidden;\n}\n\n#rwiajevbsk .gt_group_heading {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  text-align: left;\n}\n\n#rwiajevbsk .gt_empty_group_heading {\n  padding: 0.5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: middle;\n}\n\n#rwiajevbsk .gt_from_md > :first-child {\n  margin-top: 0;\n}\n\n#rwiajevbsk .gt_from_md > :last-child {\n  margin-bottom: 0;\n}\n\n#rwiajevbsk .gt_row {\n  padding-top: 3px;\n  padding-bottom: 3px;\n  padding-left: 5px;\n  padding-right: 5px;\n  margin: 10px;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  overflow-x: hidden;\n}\n\n#rwiajevbsk .gt_stub {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#rwiajevbsk .gt_stub_row_group {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 100%;\n  font-weight: initial;\n  text-transform: inherit;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n  vertical-align: top;\n}\n\n#rwiajevbsk .gt_row_group_first td {\n  border-top-width: 2px;\n}\n\n#rwiajevbsk .gt_row_group_first th {\n  border-top-width: 2px;\n}\n\n#rwiajevbsk .gt_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#rwiajevbsk .gt_first_summary_row {\n  border-top-style: solid;\n  border-top-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_first_summary_row.thick {\n  border-top-width: 2px;\n}\n\n#rwiajevbsk .gt_last_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_grand_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#rwiajevbsk .gt_first_grand_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-style: double;\n  border-top-width: 6px;\n  border-top-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_last_grand_summary_row_top {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: double;\n  border-bottom-width: 6px;\n  border-bottom-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_striped {\n  background-color: rgba(128, 128, 128, 0.05);\n}\n\n#rwiajevbsk .gt_table_body {\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_footnotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_footnote {\n  margin: 0px;\n  font-size: 90%;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#rwiajevbsk .gt_sourcenotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 0px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 0px;\n  border-right-color: #D3D3D3;\n}\n\n#rwiajevbsk .gt_sourcenote {\n  font-size: 12px;\n  padding-top: 10px;\n  padding-bottom: 10px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#rwiajevbsk .gt_left {\n  text-align: left;\n}\n\n#rwiajevbsk .gt_center {\n  text-align: center;\n}\n\n#rwiajevbsk .gt_right {\n  text-align: right;\n  font-variant-numeric: tabular-nums;\n}\n\n#rwiajevbsk .gt_font_normal {\n  font-weight: normal;\n}\n\n#rwiajevbsk .gt_font_bold {\n  font-weight: bold;\n}\n\n#rwiajevbsk .gt_font_italic {\n  font-style: italic;\n}\n\n#rwiajevbsk .gt_super {\n  font-size: 65%;\n}\n\n#rwiajevbsk .gt_footnote_marks {\n  font-size: 75%;\n  vertical-align: 0.4em;\n  position: initial;\n}\n\n#rwiajevbsk .gt_asterisk {\n  font-size: 100%;\n  vertical-align: 0;\n}\n\n#rwiajevbsk .gt_indent_1 {\n  text-indent: 5px;\n}\n\n#rwiajevbsk .gt_indent_2 {\n  text-indent: 10px;\n}\n\n#rwiajevbsk .gt_indent_3 {\n  text-indent: 15px;\n}\n\n#rwiajevbsk .gt_indent_4 {\n  text-indent: 20px;\n}\n\n#rwiajevbsk .gt_indent_5 {\n  text-indent: 25px;\n}\n\n#rwiajevbsk .katex-display {\n  display: inline-flex !important;\n  margin-bottom: 0.75em !important;\n}\n\n#rwiajevbsk div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {\n  height: 0px !important;\n}\n</style>\n<table class=\"gt_table\" data-quarto-bootstrap=\"false\" data-quarto-disable-processing=\"false\" style=\"table-layout:fixed;width:0px;\">\n<colgroup>\n<col style=\"width:115px;\"/>\n<col style=\"width:160px;\"/>\n<col style=\"width:100px;\"/>\n<col style=\"width:100px;\"/>\n</colgroup>\n<thead><tr class=\"gt_col_headings\">\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"profile\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Profile ID</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"morphosyntactic\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Morphosyntactic</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"cohesive\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Cohesive</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"lexical\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Lexical</th>\n</tr></thead>\n<tbody class=\"gt_table_body\">\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">0</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">2</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">0</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">3</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">0</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">4</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">1</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">5</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">0</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">6</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">1</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">7</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">1</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">8</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">1</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div>\n</div>\n</figure>\n</div>\n</div>\n<p>Some of these profiles may be theoretically impossible given what we know about the domain. Consider a respondent who is proficient on morphosyntactic but not lexical skills. Under the theory that lexical skills are foundational, this profile shouldn\u2019t exist. An individual cannot apply morphosyntactic skills without first being able to apply lexical skills.</p>\n<p>A hierarchy lets us encode this constraint. The hierarchy reduces the eight unconstrained profiles down to four valid ones: [0,0,0], [0,0,1], [0,1,1] and [1,1,1]. Each valid profile represents a step along a developmental ladder, and no one skips a rung.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"cell quarto-float quarto-figure quarto-figure-center anchored\" data-layout-align=\"center\" id=\"tbl-hdcm-profiles\">\n<figure class=\"quarto-float quarto-float-tbl figure\"><figcaption class=\"quarto-float-caption-top quarto-float-caption quarto-float-tbl\" id=\"tbl-hdcm-profiles-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nTable\u00a02: Valid attribute profiles under the hypothesized hierarchy\n</figcaption><div aria-describedby=\"tbl-hdcm-profiles-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<div class=\"cell-output-display\">\n<div id=\"uzfjusnfvk\" style=\"padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;\">\n<style>@import url(\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap\");\n#uzfjusnfvk table {\n  font-family: 'Open Sans', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n#uzfjusnfvk thead, #uzfjusnfvk tbody, #uzfjusnfvk tfoot, #uzfjusnfvk tr, #uzfjusnfvk td, #uzfjusnfvk th {\n  border-style: none;\n}\n\n#uzfjusnfvk p {\n  margin: 0;\n  padding: 0;\n}\n\n#uzfjusnfvk .gt_table {\n  display: table;\n  border-collapse: collapse;\n  line-height: normal;\n  margin-left: auto;\n  margin-right: auto;\n  color: #333333;\n  font-size: 16px;\n  font-weight: normal;\n  font-style: normal;\n  background-color: #FFFFFF;\n  width: auto;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #A8A8A8;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 1px;\n  border-bottom-color: #A8A8A8;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_caption {\n  padding-top: 4px;\n  padding-bottom: 4px;\n}\n\n#uzfjusnfvk .gt_title {\n  color: #333333;\n  font-size: 125%;\n  font-weight: initial;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-color: #FFFFFF;\n  border-bottom-width: 0;\n}\n\n#uzfjusnfvk .gt_subtitle {\n  color: #333333;\n  font-size: 85%;\n  font-weight: initial;\n  padding-top: 3px;\n  padding-bottom: 5px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-color: #FFFFFF;\n  border-top-width: 0;\n}\n\n#uzfjusnfvk .gt_heading {\n  background-color: #FFFFFF;\n  text-align: left;\n  border-bottom-color: #FFFFFF;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_bottom_border {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_col_headings {\n  border-top-style: solid;\n  border-top-width: 3px;\n  border-top-color: #FFFFFF;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_col_heading {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 6px;\n  padding-left: 5px;\n  padding-right: 5px;\n  overflow-x: hidden;\n}\n\n#uzfjusnfvk .gt_column_spanner_outer {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  padding-top: 0;\n  padding-bottom: 0;\n  padding-left: 4px;\n  padding-right: 4px;\n}\n\n#uzfjusnfvk .gt_column_spanner_outer:first-child {\n  padding-left: 0;\n}\n\n#uzfjusnfvk .gt_column_spanner_outer:last-child {\n  padding-right: 0;\n}\n\n#uzfjusnfvk .gt_column_spanner {\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: bottom;\n  padding-top: 5px;\n  padding-bottom: 5px;\n  overflow-x: hidden;\n  display: inline-block;\n  width: 100%;\n}\n\n#uzfjusnfvk .gt_spanner_row {\n  border-bottom-style: hidden;\n}\n\n#uzfjusnfvk .gt_group_heading {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  text-align: left;\n}\n\n#uzfjusnfvk .gt_empty_group_heading {\n  padding: 0.5px;\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  vertical-align: middle;\n}\n\n#uzfjusnfvk .gt_from_md > :first-child {\n  margin-top: 0;\n}\n\n#uzfjusnfvk .gt_from_md > :last-child {\n  margin-bottom: 0;\n}\n\n#uzfjusnfvk .gt_row {\n  padding-top: 3px;\n  padding-bottom: 3px;\n  padding-left: 5px;\n  padding-right: 5px;\n  margin: 10px;\n  border-top-style: solid;\n  border-top-width: 1px;\n  border-top-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 1px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 1px;\n  border-right-color: #D3D3D3;\n  vertical-align: middle;\n  overflow-x: hidden;\n}\n\n#uzfjusnfvk .gt_stub {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 80%;\n  font-weight: bolder;\n  text-transform: uppercase;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#uzfjusnfvk .gt_stub_row_group {\n  color: #333333;\n  background-color: #FFFFFF;\n  font-size: 100%;\n  font-weight: initial;\n  text-transform: inherit;\n  border-right-style: solid;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n  padding-left: 5px;\n  padding-right: 5px;\n  vertical-align: top;\n}\n\n#uzfjusnfvk .gt_row_group_first td {\n  border-top-width: 2px;\n}\n\n#uzfjusnfvk .gt_row_group_first th {\n  border-top-width: 2px;\n}\n\n#uzfjusnfvk .gt_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#uzfjusnfvk .gt_first_summary_row {\n  border-top-style: solid;\n  border-top-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_first_summary_row.thick {\n  border-top-width: 2px;\n}\n\n#uzfjusnfvk .gt_last_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_grand_summary_row {\n  color: #333333;\n  background-color: #FFFFFF;\n  text-transform: inherit;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#uzfjusnfvk .gt_first_grand_summary_row {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-top-style: double;\n  border-top-width: 6px;\n  border-top-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_last_grand_summary_row_top {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  padding-left: 5px;\n  padding-right: 5px;\n  border-bottom-style: double;\n  border-bottom-width: 6px;\n  border-bottom-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_striped {\n  background-color: rgba(128, 128, 128, 0.05);\n}\n\n#uzfjusnfvk .gt_table_body {\n  border-top-style: solid;\n  border-top-width: 2px;\n  border-top-color: #D3D3D3;\n  border-bottom-style: solid;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_footnotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 2px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 2px;\n  border-right-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_footnote {\n  margin: 0px;\n  font-size: 90%;\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#uzfjusnfvk .gt_sourcenotes {\n  color: #333333;\n  background-color: #FFFFFF;\n  border-bottom-style: none;\n  border-bottom-width: 2px;\n  border-bottom-color: #D3D3D3;\n  border-left-style: none;\n  border-left-width: 0px;\n  border-left-color: #D3D3D3;\n  border-right-style: none;\n  border-right-width: 0px;\n  border-right-color: #D3D3D3;\n}\n\n#uzfjusnfvk .gt_sourcenote {\n  font-size: 12px;\n  padding-top: 10px;\n  padding-bottom: 10px;\n  padding-left: 5px;\n  padding-right: 5px;\n}\n\n#uzfjusnfvk .gt_left {\n  text-align: left;\n}\n\n#uzfjusnfvk .gt_center {\n  text-align: center;\n}\n\n#uzfjusnfvk .gt_right {\n  text-align: right;\n  font-variant-numeric: tabular-nums;\n}\n\n#uzfjusnfvk .gt_font_normal {\n  font-weight: normal;\n}\n\n#uzfjusnfvk .gt_font_bold {\n  font-weight: bold;\n}\n\n#uzfjusnfvk .gt_font_italic {\n  font-style: italic;\n}\n\n#uzfjusnfvk .gt_super {\n  font-size: 65%;\n}\n\n#uzfjusnfvk .gt_footnote_marks {\n  font-size: 75%;\n  vertical-align: 0.4em;\n  position: initial;\n}\n\n#uzfjusnfvk .gt_asterisk {\n  font-size: 100%;\n  vertical-align: 0;\n}\n\n#uzfjusnfvk .gt_indent_1 {\n  text-indent: 5px;\n}\n\n#uzfjusnfvk .gt_indent_2 {\n  text-indent: 10px;\n}\n\n#uzfjusnfvk .gt_indent_3 {\n  text-indent: 15px;\n}\n\n#uzfjusnfvk .gt_indent_4 {\n  text-indent: 20px;\n}\n\n#uzfjusnfvk .gt_indent_5 {\n  text-indent: 25px;\n}\n\n#uzfjusnfvk .katex-display {\n  display: inline-flex !important;\n  margin-bottom: 0.75em !important;\n}\n\n#uzfjusnfvk div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {\n  height: 0px !important;\n}\n</style>\n<table class=\"gt_table\" data-quarto-bootstrap=\"false\" data-quarto-disable-processing=\"false\" style=\"table-layout:fixed;width:0px;\">\n<colgroup>\n<col style=\"width:115px;\"/>\n<col style=\"width:160px;\"/>\n<col style=\"width:100px;\"/>\n<col style=\"width:100px;\"/>\n</colgroup>\n<thead><tr class=\"gt_col_headings\">\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"profile\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Profile ID</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"morphosyntactic\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Morphosyntactic</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"cohesive\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Cohesive</th>\n<th class=\"gt_col_heading gt_columns_bottom_border gt_center\" colspan=\"1\" id=\"lexical\" rowspan=\"1\" scope=\"col\" style=\"color: #023047; text-align: center; vertical-align: middle; font-weight: bold; border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #023047;\">Lexical</th>\n</tr></thead>\n<tbody class=\"gt_table_body\">\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">0</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">4</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">1</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"background-color: #FFFFFF;\">7</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"background-color: #FFFFFF;\">0</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"background-color: #FFFFFF;\">1</td>\n</tr>\n<tr>\n<td class=\"gt_row gt_center\" headers=\"profile\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">8</td>\n<td class=\"gt_row gt_center\" headers=\"morphosyntactic\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"cohesive\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">1</td>\n<td class=\"gt_row gt_center\" headers=\"lexical\" style=\"border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; background-color: #FFFFFF;\">1</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div>\n</div>\n</figure>\n</div>\n</div>\n<p>We can visualize this structure as a directed acyclic graph (DAG), where an arrow from attribute A to attribute B means that proficiency on A is required before proficiency on B.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb4\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyverse.tidyverse.org\">tidyverse</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://www.dagitty.net\">dagitty</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://github.com/r-causal/ggdag\">ggdag</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; Attaching package: 'ggdag'</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; The following object is masked from 'package:stats':</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;     filter</span></span>\n<span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dag</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/pkg/dagitty/man/dagitty.html\">dagitty</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"dag { Lexical -&gt; Cohesive -&gt; Morphosyntactic }\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/pkg/dagitty/man/coordinates.html\">coordinates</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dag</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/list.html\">list</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>Lexical <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span>, Cohesive <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span>, Morphosyntactic <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>Lexical <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span>, Cohesive <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span>, Morphosyntactic <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://r-causal.github.io/ggdag/reference/tidy_dagitty.html\">tidy_dagitty</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dag</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/across.html\">across</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">name</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">to</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">~</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://stringr.tidyverse.org/reference/str_replace.html\">str_replace</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">.x</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Morphosyntactic\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Morpho-\\nsyntactic\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">x</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">y</span>, xend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">xend</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">-</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.06</span>, yend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">yend</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://r-causal.github.io/ggdag/reference/node_point.html\">geom_dag_node</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>, size <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">30</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://r-causal.github.io/ggdag/reference/geom_dag_text.html\">geom_dag_text</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>, size <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">4</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://r-causal.github.io/ggdag/reference/geom_dag_edges.html\">geom_dag_edges</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">x</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.06</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    edge_color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    edge_width <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span>,</span>\n<span>    arrow_directed <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">grid</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/grid/arrow.html\">arrow</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>length <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">grid</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/grid/unit.html\">unit</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">7</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pt\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, type <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"closed\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/scale_continuous.html\">scale_y_continuous</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>expand <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">FALSE</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggtheme.html\">theme_void</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/theme.html\">theme</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>plot.margin <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/element.html\">margin</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"A directed acyclic graph showing three nodes: L1, L2, and L3, connected left to right by arrows indicating the prerequisite ordering of the ECPE hierarchy.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-hierarchy-dag\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-hierarchy-dag-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"A directed acyclic graph showing three nodes: L1, L2, and L3, connected left to right by arrows indicating the prerequisite ordering of the ECPE hierarchy.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/hierarchies/index_files/figure-html/fig-hierarchy-dag-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-hierarchy-dag-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a01: The ECPE hierarchy as a directed acyclic graph.\n</figcaption></figure>\n</div>\n</div>\n</div>\n</section><section class=\"level2\" id=\"hierarchies-in-structural-models\"><h2 class=\"anchored\" data-anchor-id=\"hierarchies-in-structural-models\">Hierarchies in structural models</h2>\n<p>Two structural models implement attribute hierarchies, and they differ in how strictly they enforce it.</p>\n<p>The hierarchical DCM <span class=\"citation\" data-cites=\"hdcm\">(HDCM; Templin &amp; Bradshaw, 2014)</span> is strict. Profiles that violate the hierarchy are excluded from the model entirely by fixing their base rates to zero. This is demonstrated in Table\u00a02, where only profiles consistent with the proposed hierarchy are included. If a respondent\u2019s true profile is theoretically impossible, the model cannot assign them to it. Instead, they will be assigned to the nearest valid profile.</p>\n<p>The Bayesian network model <span class=\"citation\" data-cites=\"bayesnet\">(BayesNet; Hu &amp; Templin, 2020)</span> is softer. All profiles remain possible, but profiles that are inconsistent with the hierarchy are estimated to be less likely. Rather than fixing probabilities to zero, the BayesNet structural model uses the hierarchy to inform the prior distribution over profiles. A respondent whose responses look most consistent with an \u201cimpossible\u201d profile will still be assigned a non-zero probability for that profile, but the model will push that probability down.</p>\n<p>The choice between them depends on how much you trust your theory. If you\u2019re confident the hierarchy is real and complete, HDCM gives you a parsimonious model that\u2019s easy to interpret. If you want to test the hierarchy rather than assume it, BayesNet lets the data push back.</p>\n<section class=\"level3\" id=\"specifying-a-hierarchical-structural-model\"><h3 class=\"anchored\" data-anchor-id=\"specifying-a-hierarchical-structural-model\">Specifying a hierarchical structural model</h3>\n<p>For measr, hierarchies are specified with a string that describes the attribute relationships using a DAG-like syntax. Attributes are connected using the <code>-&gt;</code> operator. The <code>-&gt;</code> defines parent-child relationships in the hierarchy string. Parent attributes are prerequisites for child attributes. That is, you must possess or be proficient on the parent before you can acquire the child.</p>\n<p>For our ECPE hierarchy, we can define the attribute relationships as <code>\"lexical -&gt; cohesive -&gt; morphosyntactic\"</code>. We could also write the two relationships separately: <code>\"lexical -&gt; cohesive; cohesive -&gt; morphosyntactic\"</code>. For a simple linear hierarchy, a single chain is the most readable form. However, nonlinear hierarchies may require the relationships to be defined as multiple linear relationships that connect together in various ways. To see examples of different hierarchies and how to specify them using the DAG syntax, check out the <a href=\"https://dcmstan.r-dcm.org/articles/attribute-hierarchies.html\">attribute hierarchies vignette</a> in the <a href=\"https://dcmstan.r-dcm.org\">dcmstan</a> package.</p>\n<p>Our hierarchy string can then be passed to <code><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">hdcm()</a></code> or <code><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">bayesnet()</a></code> as the structural model in <code><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify()</a></code>. Both take a <code>hierarchy</code> argument where we can define the hierarchy using a DAG-like syntax.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb5\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item_id\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">hdcm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>hierarchy <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"lexical -&gt; cohesive -&gt; morphosyntactic\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; A loglinear cognitive diagnostic model (LCDM) measuring 3 attributes</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; with 28 items.</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attributes:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"morphosyntactic\" (13 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"cohesive\" (6 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2022 \"lexical\" (18 items)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Attribute structure:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   Hierarchical diagnostic classification model (HDCM),</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   with structure:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   lexical -&gt; cohesive -&gt; morphosyntactic</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Prior distributions:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   intercept ~ normal(0, 2)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   maineffect ~ lognormal(0, 1)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   interaction ~ normal(0, 2)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   `Vc` ~ dirichlet(1, 1, 1)</span></span></code></pre></div></div>\n</div>\n<p>The hierarchy must be a directed <em>acyclic</em> graph. You cannot have a cycle where attribute A is a prerequisite for B, and then B is also a prerequisite for A. All of the attributes in the hierarchy must also match the attribute names in the <code>qmatrix</code>. If you specify a cyclical graph or use an unknown attribute name, you\u2019ll receive an error.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb6\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># A cycle: lexical requires cohesive, cohesive requires lexical</span></span>\n<span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item_id\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">hdcm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"lexical -&gt; cohesive -&gt; lexical\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; Error in `hdcm()`:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; ! `hierarchy` must not be cyclical</span></span>\n<span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># Incorrect attribute name: \"lexical_rules\" instead of \"lexical\"</span></span>\n<span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item_id\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">hdcm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"lexical_rules -&gt; cohesive -&gt; morphosyntactic\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; Error in `dcm_specify()`:</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; ! `hdcm(\"lexical_rules -&gt; cohesive -&gt; morphosyntactic\")` must</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   only include attributes in a hierarchy present in the Q-matrix</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; \u2139 Extra attributes: \"lexical_rules\"</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level3\" id=\"estimating-hierarchical-models\"><h3 class=\"anchored\" data-anchor-id=\"estimating-hierarchical-models\">Estimating hierarchical models</h3>\n<p>Once we create our DCM specification with the hierarchy, we can use that specification within <code><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate()</a></code> just like we normally do. Here we\u2019ll estimate both an HDCM and a BayesNet model using <a href=\"https://mc-stan.org/cmdstanr/\">cmdstanr</a> and the Pathfinder algorithm <span class=\"citation\" data-cites=\"pathfinder\">(Zhang et al., 2022)</span>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb7\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_hdcm</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_qmatrix</span>,</span>\n<span>    identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item_id\"</span>,</span>\n<span>    measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">hdcm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"lexical -&gt; cohesive -&gt; morphosyntactic\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"resp_id\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pathfinder\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"cmdstanr\"</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"ecpe-lcdm-hdcm-cmds\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_bayesnet</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_qmatrix</span>,</span>\n<span>    identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item_id\"</span>,</span>\n<span>    measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">bayesnet</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"lexical -&gt; cohesive -&gt; morphosyntactic\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"resp_id\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pathfinder\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"cmdstanr\"</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"epce-lcdm-bayesnet-cmds\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</div>\n<p>If we look at the respondent proficiency estimates, we see that we still get a proficiency estimate for each student on each attribute (<code>$attribute_probabilities</code>), but in the class probabilities, we only see the classes that are allowed by the specification (<code>$class_probabilities</code>).</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb8\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/score.html\">score</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_hdcm</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $class_probabilities</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 11,688 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    resp_id class   probability     `2.5%`    `97.5%`</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;   &lt;chr&gt;         &lt;dbl&gt;      &lt;dbl&gt;      &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 1       [0,0,0]  0.00000803 0.00000664 0.00000951</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 1       [0,0,1]  0.00168    0.00154    0.00198   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 1       [0,1,1]  0.00260    0.00215    0.00302   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 1       [1,1,1]  0.996      0.995      0.996     </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 2       [0,0,0]  0.00000645 0.00000444 0.00000869</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 2       [0,0,1]  0.00498    0.00373    0.00554   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 2       [0,1,1]  0.00259    0.00214    0.00300   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 2       [1,1,1]  0.992      0.992      0.994     </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 3       [0,0,0]  0.00000597 0.00000439 0.00000777</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 3       [0,0,1]  0.00276    0.00192    0.00374   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 11,678 more rows</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $attribute_probabilities</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 8,766 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    resp_id attribute       probability `2.5%` `97.5%`</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;   &lt;chr&gt;                 &lt;dbl&gt;  &lt;dbl&gt;   &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 1       morphosyntactic       0.996  0.995   0.996</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 1       cohesive              0.998  0.998   0.998</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 1       lexical               1.000  1.000   1.000</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 2       morphosyntactic       0.992  0.992   0.994</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 2       cohesive              0.995  0.994   0.996</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 2       lexical               1.000  1.000   1.000</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 3       morphosyntactic       0.979  0.973   0.985</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 3       cohesive              0.997  0.996   0.998</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 3       lexical               1.000  1.000   1.000</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 4       morphosyntactic       0.997  0.997   0.997</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 8,756 more rows</span></span></code></pre></div></div>\n</div>\n<p>We can also see how the choice of structural model impacts respondent estimates by examining the estimated model base rates. The base rates represent the proportion of respondents estimated to have each profile. For comparison purposes, let\u2019s also estimate a model with an unconstrained structural model.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb9\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_lcdm</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_qmatrix</span>,</span>\n<span>    identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item_id\"</span>,</span>\n<span>    measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"resp_id\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"pathfinder\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"cmdstanr\"</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"ecpe-lcdm-uncst-cmds\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</div>\n<p>In Figure\u00a02, we see the difference between the HDCM and the BayesNet. In the HDCM, the base rate is 0 for any of the profiles that are inconsistent with the defined hierarchy (e.g., [0,1,0]), whereas the BayesNet has non-zero base rates for all profiles. However, notice that the base rate for the BayesNet is much lower for the inconsistent profiles than what is seen in the unconstrained model. So the BayesNet is pushing respondents toward the profiles that are consistent with our specified attribute relationships, but those profiles are not a strict requirement as with the HDCM.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb10\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/bind_rows.html\">bind_rows</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_lcdm</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"strc_param\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, strc <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Unconstrained\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_bayesnet</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"strc_param\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, strc <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"BayesNet\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/measr_extract.html\">measr_extract</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_hdcm</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"strc_param\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, strc <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"HDCM\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/select.html\">select</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">strc</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">estimate</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/mutate.html\">mutate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    class <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://forcats.tidyverse.org/reference/fct_inorder.html\">fct_inorder</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    strc <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/factor.html\">factor</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">strc</span>, levels <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Unconstrained\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"BayesNet\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"HDCM\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/complete.html\">complete</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">strc</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/list.html\">list</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>estimate <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">posterior</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/posterior/reference/rvar.html\">rvar</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/posterior/reference/rvar-summaries-over-draws.html\">E</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">estimate</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://forcats.tidyverse.org/reference/fct_rev.html\">fct_rev</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">class</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://forcats.tidyverse.org/reference/fct_rev.html\">fct_rev</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">strc</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_bar.html\">geom_col</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    position <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/position_dodge.html\">position_dodge2</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>preserve <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"single\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    width <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.7</span>,</span>\n<span>    na.rm <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">TRUE</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">scale_fill_okabeito</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    order <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    breaks <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Unconstrained\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"BayesNet\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"HDCM\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/labs.html\">labs</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Profile\"</span>, x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Estimated Base Rate\"</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Structural Model\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"A grouped horizontal bar chart showing estimated profile base rates for each of the eight attribute profiles under three structural models: Unconstrained, BayesNet, and HDCM. Profiles are listed along the y-axis and estimated base rates along the x-axis.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-model-base-rates\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-model-base-rates-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"A grouped horizontal bar chart showing estimated profile base rates for each of the eight attribute profiles under three structural models: Unconstrained, BayesNet, and HDCM. Profiles are listed along the y-axis and estimated base rates along the x-axis.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/hierarchies/index_files/figure-html/fig-model-base-rates-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-model-base-rates-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a02: Estimated profile base rates for each structural model\n</figcaption></figure>\n</div>\n</div>\n</div>\n</section></section><section class=\"level2\" id=\"evaluating-hierarchical-structures\"><h2 class=\"anchored\" data-anchor-id=\"evaluating-hierarchical-structures\">Evaluating hierarchical structures</h2>\n<p>To this point, we\u2019ve focused on how to encode attribute relationships into our DCM specifications. However, in the DCM framework, these relationships are also testable hypotheses. <span class=\"citation\" data-cites=\"dcm-maps\">Thompson &amp; Nash (2022)</span> demonstrated how we can evaluate a proposed attribute hierarchy using the model fit tools we learned about in the <a href=\"https://r-dcm.org/start/hierarchies//../../start/evaluate/\">Evaluate Model Performance</a> article.</p>\n<p>Specifically, we can use relative fit comparisons to directly compare the models. As in our previous case study, we\u2019ll use leave-one-out cross validation <span class=\"citation\" data-cites=\"loo-waic\">(LOO; Vehtari et al., 2017)</span> for our model comparisons. The model with the highest expected log predictive density (ELPD) is listed first. A difference that is large relative to its standard error <span class=\"citation\" data-cites=\"bengio2004\">(roughly more than 2.5 times; Bengio &amp; Brandvalet, 2004)</span> provides strong evidence for preferring one model over another.</p>\n<p>If the hierarchical models show comparable ELPD to the unconstrained model, the hierarchy is consistent with the data: the simpler, theoretically motivated model fits as well as the fully flexible one. This is the ideal outcome when you have good domain theory. The defined attribute relationships reduce model complexity without sacrificing predictive accuracy. If the unconstrained model dominates clearly, the attribute relationships may be too restrictive, and some theoretically \u201cimpossible\u201d profiles may actually be present in the data.</p>\n<p>As we would expect to see if our theory of a linear hierarchy is correct, unconstrained LCDM, BayesNet, and HDCM have similar ELPD values (difference within the standard error). Because all the model have approximately equal fit, we would probably prefer the HDCM, as that is the simplest of the three models.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb11\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/loo/reference/loo_compare.html\">loo_compare</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_lcdm</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_bayesnet</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ecpe_hdcm</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;               elpd_diff se_diff</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; ecpe_bayesnet  0.0       0.0   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; ecpe_lcdm     -0.3       6.3   </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; ecpe_hdcm     -6.3       8.6</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level2\" id=\"wrapping-up\"><h2 class=\"anchored\" data-anchor-id=\"wrapping-up\">Wrapping up</h2>\n<p>Defining attribute relationships like hierarchies lets you incorporate domain theory directly into the structural model. Rather than leaving the model to estimate all possible profile base rates freely, you can encode what you know about the order in which skills develop. The HDCM enforces that order as a hard constraint; BayesNet encodes it as a prior that the data can weigh against. Comparing hierarchical models to an unconstrained baseline tells you whether your theory is consistent with the data.</p>\n<p>The next article puts everything we\u2019ve learned so far together in a complete <a href=\"https://r-dcm.org/start/hierarchies//../../start/case-study/\">Diagnostic Assessment Case Study</a> from start to finish.</p>\n</section><div class=\"default\" id=\"quarto-appendix\"><section class=\"level2 appendix\" id=\"session-info\"><h2 class=\"anchored quarto-appendix-heading\">Session information</h2><div class=\"quarto-appendix-contents\">\n<div class=\"cell\" data-layout-align=\"center\">\n<pre><code>#&gt; \u2500 Session info \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  version         R version 4.5.2 (2025-10-31)\n#&gt;  language        (EN)\n#&gt;  date            2026-04-04\n#&gt;  pandoc          3.9\n#&gt;  quarto          1.9.24\n#&gt;  Stan (rstan)    2.37.0\n#&gt;  Stan (cmdstanr) 2.38.0\n#&gt; \n#&gt; \u2500 Packages \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  package          version     date (UTC) source\n#&gt;  bridgesampling   1.2-1       2025-11-19 CRAN (R 4.5.2)\n#&gt;  cmdstanr         0.9.0       2025-03-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  dcmdata          0.2.0       2026-03-10 CRAN (R 4.5.2)\n#&gt;  dcmstan          0.1.0       2025-11-24 CRAN (R 4.5.2)\n#&gt;  dplyr            1.2.0       2026-02-03 CRAN (R 4.5.2)\n#&gt;  forcats          1.0.1       2025-09-25 CRAN (R 4.5.0)\n#&gt;  ggplot2          4.0.2       2026-02-03 CRAN (R 4.5.2)\n#&gt;  loo              2.9.0.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  lubridate        1.9.5       2026-02-04 CRAN (R 4.5.2)\n#&gt;  measr            2.0.0.9000  2026-03-21 Github (r-dcm/measr@475bc50)\n#&gt;  posterior        1.6.1.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  purrr            1.2.1       2026-01-09 CRAN (R 4.5.2)\n#&gt;  readr            2.2.0       2026-02-19 CRAN (R 4.5.2)\n#&gt;  rlang            1.1.7       2026-01-09 CRAN (R 4.5.2)\n#&gt;  rstan            2.36.0.9000 2025-09-26 https://stan-dev.r-universe.dev (R 4.5.1)\n#&gt;  stringr          1.6.0       2025-11-04 CRAN (R 4.5.0)\n#&gt;  tibble           3.3.1       2026-01-11 CRAN (R 4.5.2)\n#&gt;  tidyr            1.3.2       2025-12-19 CRAN (R 4.5.2)\n#&gt; \n#&gt; \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500</code></pre>\n</div>\n</div></section><section class=\"quarto-appendix-contents\" id=\"quarto-bibliography\"><h2 class=\"anchored quarto-appendix-heading\">References</h2><div class=\"references csl-bib-body hanging-indent\" data-entry-spacing=\"0\" data-line-spacing=\"2\" id=\"refs\">\n<div class=\"csl-entry\" id=\"ref-bengio2004\">\nBengio, Y., &amp; Brandvalet, Y. (2004). No unbiased estimator of the variance of k-fold cross-validation. <em>Journal of Machine Learning Research</em>, <em>5</em>, 1089\u20131105. <a href=\"https://www.jmlr.org/papers/v5/grandvalet04a.html\">https://www.jmlr.org/papers/v5/grandvalet04a.html</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-bayesnet\">\nHu, B., &amp; Templin, J. (2020). Using diagnostic classification models to validate attribute hierarchies and evaluate model fit in <span>Bayesian</span> networks. <em>Multivariate Behavioral Research</em>, <em>55</em>(2), 300\u2013311. <a href=\"https://doi.org/10.1080/00273171.2019.1632165\">https://doi.org/10.1080/00273171.2019.1632165</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-hdcm\">\nTemplin, J., &amp; Bradshaw, L. (2014). Hierarchical diagnostic classification models: <span>A</span> family of models for estimating and testing attribute hierarchies. <em>Psychometrika</em>, <em>79</em>(2), 317\u2013339. <a href=\"https://doi.org/10.1007/s11336-013-9362-0\">https://doi.org/10.1007/s11336-013-9362-0</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-dcm-maps\">\nThompson, W. J., &amp; Nash, B. (2022). A diagnostic framework for the empirical evaluation of learning maps. <em>Frontiers in Education</em>, <em>6</em>, Article 714736. <a href=\"https://doi.org/10.3389/feduc.2021.714736\">https://doi.org/10.3389/feduc.2021.714736</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-loo-waic\">\nVehtari, A., Gelman, A., &amp; Gabry, J. (2017). Practical <span>Bayesian</span> model evaluation using leave-one-out cross-validation and <span>WAIC</span>. <em>Statistics and Computing</em>, <em>27</em>, 1413\u20131432. <a href=\"https://doi.org/10.1007/s11222-016-9696-4\">https://doi.org/10.1007/s11222-016-9696-4</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-wang2021\">\nWang, C., &amp; Lu, J. (2021). Learning attribute hierarchies from data: Two exploratory approaches. <em>Journal of Educational and Behavioral Statistics</em>, <em>46</em>(1), 58\u201384. <a href=\"https://doi.org/10.3102/1076998620931094\">https://doi.org/10.3102/1076998620931094</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-pathfinder\">\nZhang, L., Carpenter, B., Gelman, A., &amp; A., V. (2022). Pathfinder: Parallel quasi-<span>Newton</span> variational inference. <em>Journal of Machine Learning Research</em>, <em>23</em>(306), 1\u201349. <a href=\"http://jmlr.org/papers/v23/21-0889.html\">http://jmlr.org/papers/v23/21-0889.html</a>\n</div>\n</div></section></div>","doi":"https://doi.org/10.59350/szqr6-8md61","funding_references":null,"guid":"https://r-dcm.org/start/hierarchies/","id":"49af7dd9-4dd7-439e-9f7f-3a855a30faa3","image":"https://r-dcm.org/start/hierarchies/index_files/figure-html/fig-hierarchy-dag-1.png","indexed":true,"indexed_at":1775360511,"language":"en","parent_doi":null,"published_at":1775357296,"reference":[{"id":"https://www.jmlr.org/papers/v5/grandvalet04a.html","unstructured":"\nBengio, Y., & Brandvalet, Y. (2004). No unbiased estimator of the variance of k-fold cross-validation. Journal of Machine Learning Research, 5, 1089\u20131105. https://www.jmlr.org/papers/v5/grandvalet04a.html\n"},{"id":"https://doi.org/10.1080/00273171.2019.1632165","unstructured":"\nHu, B., & Templin, J. (2020). Using diagnostic classification models to validate attribute hierarchies and evaluate model fit in Bayesian networks. Multivariate Behavioral Research, 55(2), 300\u2013311. https://doi.org/10.1080/00273171.2019.1632165\n"},{"id":"https://doi.org/10.1007/s11336-013-9362-0","unstructured":"\nTemplin, J., & Bradshaw, L. (2014). Hierarchical diagnostic classification models: A family of models for estimating and testing attribute hierarchies. Psychometrika, 79(2), 317\u2013339. https://doi.org/10.1007/s11336-013-9362-0\n"},{"id":"https://doi.org/10.3389/feduc.2021.714736","unstructured":"\nThompson, W. J., & Nash, B. (2022). A diagnostic framework for the empirical evaluation of learning maps. Frontiers in Education, 6, Article 714736. https://doi.org/10.3389/feduc.2021.714736\n"},{"id":"https://doi.org/10.1007/s11222-016-9696-4","unstructured":"\nVehtari, A., Gelman, A., & Gabry, J. (2017). Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC. Statistics and Computing, 27, 1413\u20131432. https://doi.org/10.1007/s11222-016-9696-4\n"},{"id":"https://doi.org/10.3102/1076998620931094","unstructured":"\nWang, C., & Lu, J. (2021). Learning attribute hierarchies from data: Two exploratory approaches. Journal of Educational and Behavioral Statistics, 46(1), 58\u201384. https://doi.org/10.3102/1076998620931094\n"},{"id":"http://jmlr.org/papers/v23/21-0889.html","unstructured":"\nZhang, L., Carpenter, B., Gelman, A., & A., V. (2022). Pathfinder: Parallel quasi-Newton variational inference. Journal of Machine Learning Research, 23(306), 1\u201349. http://jmlr.org/papers/v23/21-0889.html\n"}],"registered_at":0,"relationships":[],"rid":"p5n85-k2609","status":"active","summary":"Introduction   We\u2019ve seen how to specify and estimate a model, and what it looks like when a model doesn\u2019t perform well. One of the most productive places to start when something seems off is the structural model. The structural model controls the assumptions your DCM makes about how attributes relate to each other. By default, the unconstrained model makes no assumptions at all and every possible attribute profile is freely estimated.","tags":[],"title":"Define attribute relationships","updated_at":1775357296,"url":"https://r-dcm.org/start/hierarchies/","version":"v1"},{"abstract":null,"archive_url":null,"authors":[],"blog":{"archive_collection":null,"archive_host":null,"archive_prefix":null,"archive_timestamps":null,"authors":null,"canonical_url":null,"category":"socialScience","community_id":"6db161d5-9161-49cf-ab79-f33ad128ed24","created_at":1734126057,"current_feed_url":null,"description":"r-dcm blog","doi_as_guid":false,"favicon":null,"feed_format":"application/rss+xml","feed_url":"https://r-dcm.org/rss.xml","filter":null,"funding":null,"generator":"Quarto","generator_raw":"Quarto 1.6.39","home_page_url":"https://r-dcm.org","id":"5822f383-190a-4c32-9937-86ee8fc75254","indexed":true,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":0,"relative_url":null,"ror":null,"secure":true,"slug":"r_dcm","status":"active","subfield":"1803","subfield_validated":null,"title":"r-dcm blog","updated_at":1775375532.831312,"use_api":null,"use_mastodon":false,"user_id":"943e7faa-bd06-4044-80a5-9fef5df8ccdb"},"blog_name":"r-dcm blog","blog_slug":"r_dcm","content_html":"<section class=\"level2\" id=\"introduction\"><h2 class=\"anchored\" data-anchor-id=\"introduction\">Introduction</h2>\n<p>Once you\u2019ve estimated a DCM, the natural next question is: <em>does this model actually work?</em> Before reporting results or making decisions based on proficiency classifications, we want evidence that the model is doing a good job of representing the data. In this article, we\u2019ll walk through four complementary approaches to evaluating a DCM:</p>\n<ul>\n<li>Absolute fit: Does the model fit the observed data?</li>\n<li>Relative fit: When comparing competing models, which one fits better?</li>\n<li>Classification reliability: How consistent and accurate are the proficiency classifications?</li>\n<li>Misfit diagnostics: If something seems off, where is the problem?</li>\n</ul>\n<p>To use code in this article, you will need to install the following packages: <a href=\"https://dcmdata.r-dcm.org\">dcmdata</a>, <a href=\"https://measr.r-dcm.org\">measr</a>, and <a href=\"https://mc-stan.org/rstan/\">rstan</a>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb1\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org\">measr</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for model evaluation</span></span>\n<span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># Helper packages</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmdata.r-dcm.org\">dcmdata</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for example data set</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/rstan/\">rstan</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># for estimation backend</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level2\" id=\"diagnosing-teachers-multiplicative-reasoning-dtmr-data\"><h2 class=\"anchored\" data-anchor-id=\"diagnosing-teachers-multiplicative-reasoning-dtmr-data\">Diagnosing Teachers\u2019 Multiplicative Reasoning (DTMR) data</h2>\n<p>We\u2019ll use data from the DTMR project to demonstrate each of these evaluation tools. The DTMR assessment measures four attributes related to multiplicative reasoning in mathematics teachers. In total, the DTMR data contains responses to 27 items from 990 respondents.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb2\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_data</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 990 \u00d7 28</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    id      `1`   `2`   `3`   `4`   `5`   `6`   `7`  `8a`  `8b`  `8c`  `8d`   `9`</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;fct&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 0008\u2026     1     1     0     1     0     0     1     1     0     1     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 0009\u2026     0     1     0     0     0     0     0     1     1     1     0     1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 0024\u2026     0     1     0     0     0     0     1     1     1     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 0031\u2026     0     1     0     0     1     0     1     1     1     0     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 0061\u2026     0     1     1     0     0     0     0     0     0     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 0087\u2026     0     1     1     1     0     0     0     1     1     1     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 0092\u2026     0     1     1     1     1     0     0     1     1     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 0097\u2026     0     0     0     1     0     0     0     1     0     1     0     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 0111\u2026     0     1     1     0     0     0     0     1     0     1     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 0121\u2026     0     1     0     0     0     0     0     1     1     1     1     0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 980 more rows</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 15 more variables: `10a` &lt;int&gt;, `10b` &lt;int&gt;, `10c` &lt;int&gt;, `11` &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   `12` &lt;int&gt;, `13` &lt;int&gt;, `14` &lt;int&gt;, `15a` &lt;int&gt;, `15b` &lt;int&gt;, `15c` &lt;int&gt;,</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; #   `16` &lt;int&gt;, `17` &lt;int&gt;, `18` &lt;int&gt;, `21` &lt;int&gt;, `22` &lt;int&gt;</span></span></code></pre></div></div>\n</div>\n<p>Alongside the response data, we also have a Q-matrix that maps items to the 4 attributes measured by the assessment. These attributes represent aspects of multiplicative reasoning including and understanding of referent units, partitioning and iterating, appropriateness, and multiplicative comparison. For more information on the data set, see <code><a href=\"https://dcmdata.r-dcm.org/reference/dtmr.html\">?dtmr</a></code> and <span class=\"citation\" data-cites=\"dtmr\">Bradshaw et al. (2014)</span>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb3\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_qmatrix</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 27 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    item  referent_units partitioning_iterating appropriateness</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;    &lt;chr&gt;          &lt;dbl&gt;                  &lt;dbl&gt;           &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  1 1                  1                      0               0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  2 2                  0                      0               1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  3 3                  0                      1               0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  4 4                  1                      0               0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  5 5                  1                      0               0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  6 6                  0                      1               0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  7 7                  1                      0               0</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  8 8a                 0                      0               1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;  9 8b                 0                      0               1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 10 8c                 0                      0               1</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 17 more rows</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 1 more variable: multiplicative_comparison &lt;dbl&gt;</span></span></code></pre></div></div>\n</div>\n<p>One particularly useful feature of the DTMR data for learning purposes is that it was simulated from known parameters. The actual data set is not publicly available. However, dcmdata provides an artificial data set with the same number of items and respondents, using the parameter estimates reported by <span class=\"citation\" data-cites=\"dtmr\">Bradshaw et al. (2014)</span> and <span class=\"citation\" data-cites=\"dtmr-strc\">Izs\u00e1k et al. (2019)</span>. This means that the data set we are using will match the characterisitics of the real data, but we know what the true model parameters should be. For example, because this data was simulated from a loglinear cognitive diagnostic model <span class=\"citation\" data-cites=\"lcdm\">(LCDM; Henson et al., 2009)</span>, we know that we should see good model performance when estimating an LCDM to this data. Conversely, we should see poor performance if we estimate a more restrictive model, such as the deterministic input, noisy \u201cand\u201d gate model <span class=\"citation\" data-cites=\"dina\">(DINA; <span class=\"nocase\">de la Torre &amp; Douglas</span>, 2004)</span>. And that\u2019s exactly what makes this dataset a great learning example. We\u2019ll see what both good and bad fit look like and learn how to recognize it.</p>\n<p>Some of the evaluation tools we\u2019ll use require the full Bayesian posterior distribution, which means we need to estimate the model using MCMC. Let\u2019s specify and estimate two models now. First, we\u2019ll estimate and LCDM that we know should show good fit and performance.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb4\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_spec</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">lcdm</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_spec</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"id\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"mcmc\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"rstan\"</span>,</span>\n<span>  chains <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">4</span>,</span>\n<span>  iter <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1500</span>,</span>\n<span>  warmup <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1000</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"dtmr-lcdm-mcmc-rstn\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</div>\n<p>Next, we\u2019ll estimate a DINA model. The DINA model puts constraints on the LCDM, so this model should show worse performance than our LCDM.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb5\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dina_spec</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/dcm_specify.html\">dcm_specify</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  qmatrix <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_qmatrix</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"item\"</span>,</span>\n<span>  measurement_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/measurement-model.html\">dina</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  structural_model <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dcmstan.r-dcm.org/reference/structural-model.html\">unconstrained</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_dina</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/dcm_estimate.html\">dcm_estimate</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>  <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dina_spec</span>,</span>\n<span>  data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_data</span>,</span>\n<span>  identifier <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"id\"</span>,</span>\n<span>  method <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"mcmc\"</span>,</span>\n<span>  backend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"rstan\"</span>,</span>\n<span>  chains <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">4</span>,</span>\n<span>  iter <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2500</span>,</span>\n<span>  warmup <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2000</span>,</span>\n<span>  control <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/list.html\">list</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>adapt_delta <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">.99</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>  file <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">here</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">::</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://here.r-lib.org/reference/here.html\">here</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"start\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"fits\"</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"dtmr-dina-mcmc-rstn\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level2\" id=\"absolute-model-fit\"><h2 class=\"anchored\" data-anchor-id=\"absolute-model-fit\">Absolute model fit</h2>\n<p>Absolute fit asks a direct question: does the model fit the data? We have two tools for answering it with measr: the M<sub>2</sub> statistic, which works with any estimation method, and posterior predictive model checks (PPMCs), which require a full posterior from either MCMC estimation or a variational inference algorithm.</p>\n<section class=\"level3\" id=\"m2-statistic\"><h3 class=\"anchored\" data-anchor-id=\"m2-statistic\">M<sub>2</sub> statistic</h3>\n<p>The M<sub>2</sub> statistic is a limited-information goodness-of-fit measure originally developed by Maydeu-Olivares &amp; Joe <span class=\"citation\" data-cites=\"m2-2005 m2-2006\">(2005, 2006)</span> and adapted for DCMs by <span class=\"citation\" data-cites=\"liu2016\">Liu et al. (2016)</span>. \u201cLimited-information\u201d means the statistic summarizes fit using item-pair statistics rather than the full multivariate response pattern, making it practical for assessments with many items.</p>\n<p>The null hypothesis is that the model fits the data. A large M<sub>2</sub> (relative to the degrees of freedom, <code>df</code>) with a small <em>p</em>-value suggests the model does not adequately reproduce the observed data patterns. We can calculate the M<sub>2</sub> for any measr model with <code><a href=\"https://rdrr.io/pkg/dcm2/man/fit_m2.html\">fit_m2()</a></code>. In addition to the M<sub>2</sub> statistic and its <em>p</em>-value, the function also returns the root mean square error of approximation (RMSEA) with a 90% confidence interval and the standardized root mean square residual (SRMSR) as supplementary fit indices.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb6\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/pkg/dcm2/man/fit_m2.html\">fit_m2</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 1 \u00d7 8</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;      m2    df  pval rmsea ci_lower ci_upper `90% CI`     srmsr</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;dbl&gt; &lt;int&gt; &lt;dbl&gt; &lt;dbl&gt;    &lt;dbl&gt;    &lt;dbl&gt; &lt;chr&gt;        &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1  266.   293 0.869     0        0   0.0068 [0, 0.0068] 0.0273</span></span></code></pre></div></div>\n</div>\n<p>Since the DTMR data was generated from an LCDM, we expect good fit here. A non-significant <em>p</em>-value means we cannot reject the null hypothesis that the model fits, and small RMSEA and SRMSR values indicate the model closely reproduces the observed item-pair statistics.</p>\n<p>Contrast that with the fit results for the DINA model. The M<sub>2</sub> is quite large with a very small <em>p</em>-value, and both the RMSEA and SRMSR are more elevated. This is expected in this example, because we know that the DINA model has more constraints than the model that was used to generate this data set.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb7\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/pkg/dcm2/man/fit_m2.html\">fit_m2</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_dina</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 1 \u00d7 8</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;      m2    df        pval  rmsea ci_lower ci_upper `90% CI`          srmsr</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;dbl&gt; &lt;int&gt;       &lt;dbl&gt;  &lt;dbl&gt;    &lt;dbl&gt;    &lt;dbl&gt; &lt;chr&gt;             &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1  452.   309 0.000000203 0.0216   0.0172   0.0258 [0.0172, 0.0258] 0.0719</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level3\" id=\"posterior-predictive-model-checks\"><h3 class=\"anchored\" data-anchor-id=\"posterior-predictive-model-checks\">Posterior predictive model checks</h3>\n<p>Posterior predictive model checks (PPMCs) are a Bayesian approach to evaluating model fit <span class=\"citation\" data-cites=\"park2015\">(Park et al., 2015)</span>. The idea is to simulate many replicated datasets from the estimated model posterior, then ask: does our observed data look like data the model would generate? If the model is well-specified, the observed data should be indistinguishable from the replicated data.</p>\n<p><code><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc()</a></code> performs a PPMC based on the raw score distribution. It simulates replicated datasets from the posterior, calculates the distribution of raw scores for each, and compares this distribution to our observed data. Because PPMCs require draws from the full posterior distribution, they only work with model estimated by a method that produces a posterior (i.e., MCMC, variational inference).</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb8\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_ppmc</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span>, model_fit <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"raw_score\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_ppmc</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $ppmc_raw_score</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 1 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   obs_chisq ppmc_mean `2.5%` `97.5%`   ppp</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;       &lt;dbl&gt;     &lt;dbl&gt;  &lt;dbl&gt;   &lt;dbl&gt; &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1      35.6      30.0   13.1    56.8 0.201</span></span></code></pre></div></div>\n</div>\n<p>The key output is the posterior predictive <em>p</em>-value (<em>ppp</em>), which is the proportion of replicated datasets that produced a larger fit statistic than our observed data. For a well-fitting model, the observed data should fall in the middle of the replicated distribution, giving a <em>ppp</em> near 0.5. Values near 0 indicate that the observed data produces a fit statistic with a much larger value than expected by replicated datasets; values near 1 would indicate the opposite. In this case, our <em>ppp</em> values is 0.201, indicating that 20.1% of replicated data sets had a larger fit statistic than our observed data.</p>\n<p>Let\u2019s visualize the PPMC to see how the observed raw score distribution compares to the replicated data.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb9\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyverse.tidyverse.org\">tidyverse</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"kw\" style=\"color: #003B4F;\nbackground-color: null;\nfont-weight: bold;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/library.html\">library</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/\">ggdist</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_scores</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_data</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/pivot_longer.html\">pivot_longer</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>cols <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">-</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"id\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/summarise.html\">summarize</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>raw_score <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/sum.html\">sum</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">value</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, .by <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">id</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/count.html\">count</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/complete.html\">complete</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>raw_score <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">:</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/nrow.html\">ncol</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_data</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">-</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/list.html\">list</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>n <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0L</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span></span>\n<span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span>, model_fit <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"raw_score\"</span>, return_draws <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2000</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://purrr.tidyverse.org/reference/pluck.html\">pluck</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"ppmc_raw_score\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/select.html\">select</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">rawscore_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/unnest.html\">unnest</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">rawscore_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/unnest.html\">unnest</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_scores</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/reference/stat_interval.html\">stat_interval</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">n</span>, color_ramp <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes_eval.html\">after_stat</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">level</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    point_interval <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"mean_qi\"</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    linewidth <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">5</span>,</span>\n<span>    show.legend <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">FALSE</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_path.html\">geom_line</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_scores</span>,</span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">n</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_point.html\">geom_point</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    data <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_scores</span>,</span>\n<span>    <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">raw_score</span>, y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">n</span>, fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Observed Data\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    shape <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">21</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    size <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/reference/scale_colour_ramp.html\">scale_color_ramp_discrete</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    from <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"white\"</span>,</span>\n<span>    range <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.2</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    breaks <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.5</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.8</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.95</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>,</span>\n<span>    labels <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">~</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/paste.html\">paste0</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/numeric.html\">as.numeric</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">.x</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">*</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">100</span>, <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"%\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/scale_manual.html\">scale_fill_manual</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>values <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/scale_continuous.html\">scale_x_continuous</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>breaks <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/seq.html\">seq</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">27</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, expand <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\">scale_y_comma</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/labs.html\">labs</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Raw score\"</span>,</span>\n<span>    y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Respondents\"</span>,</span>\n<span>    color_ramp <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"Credible Interval\"</span>,</span>\n<span>    fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">NULL</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/guides.html\">guides</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/guide_legend.html\">guide_legend</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>override.aes <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/list.html\">list</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>size <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"Line plot showing the observed number of respondents at each raw score point, superimposed over an interval showing the expected number of respondents at each score point from model-replicated data. The observed line runs through the middle of the credible interval bands, indicating good model fit.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-rawscore-dist\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-rawscore-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"Line plot showing the observed number of respondents at each raw score point, superimposed over an interval showing the expected number of respondents at each score point from model-replicated data. The observed line runs through the middle of the credible interval bands, indicating good model fit.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/evaluate/index_files/figure-html/fig-rawscore-dist-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-rawscore-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a01: Posterior predictive model check of the raw score distribution.\n</figcaption></figure>\n</div>\n</div>\n</div>\n<p>The blue bars show the 50%, 80%, and 95% credible intervals for the expected number of respondents at each score point, based on the model (i.e., the distribution across the replicated data sets). The red line and points show the counts from our observed data set. When the model fits well, the red line threads through the middle of the blue intervals rather than wandering outside them.</p>\n<p>We can also examine the distribution of \u03c7<sup>2</sup>-like statistics calculated from the replicated datasets <span class=\"citation\" data-cites=\"thompson-bayes\">(Thompson, 2019)</span>. For each replicated dataset, we compute how much it differs from the expected raw score distribution. This creates a distribution of plausible \u03c7<sup>2</sup> values under the model. The \u03c7<sup>2</sup> is our fit statistic in this PPMC, and the <em>ppp</em> value is the proportion of replicated \u03c7<sup>2</sup> values that exceed the observed value (as indicated by the red line). In this example, we see that the observed value is toward the middle, which is exactly what we would expect from a well-fitting model.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb10\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span>, model_fit <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"raw_score\"</span>, return_draws <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2000</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://purrr.tidyverse.org/reference/pluck.html\">pluck</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"ppmc_raw_score\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/select.html\">select</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">chisq_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/unnest.html\">unnest</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">chisq_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">chisq_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/reference/stat_dots.html\">stat_dots</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    quantiles <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">500</span>,</span>\n<span>    layout <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"hex\"</span>,</span>\n<span>    stackratio <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.9</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    na.rm <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">TRUE</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_abline.html\">geom_vline</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    xintercept <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">@</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">fit</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ppmc_raw_score</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_chisq</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    linewidth <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/coord_cartesian.html\">coord_cartesian</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>xlim <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">100</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/labs.html\">labs</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">NULL</span>, x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"&amp;chi;^2^&lt;sub&gt;rep&lt;/sub&gt;\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/theme.html\">theme</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>axis.text.y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/element.html\">element_blank</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, axis.ticks.y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/element.html\">element_blank</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"Dot plot showing the distribution of chi-square statistics from replicated datasets. A vertical line marks the observed chi-square statistic, which falls near the center of the distribution, indicating good model fit.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-chisq-dist\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-chisq-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"Dot plot showing the distribution of chi-square statistics from replicated datasets. A vertical line marks the observed chi-square statistic, which falls near the center of the distribution, indicating good model fit.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/evaluate/index_files/figure-html/fig-chisq-dist-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-chisq-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a02: Posterior predictive \u03c7<sup>2</sup> distribution for the LCDM.\n</figcaption></figure>\n</div>\n</div>\n</div>\n<p>Compare this to the same \u03c7<sup>2</sup> plot for the DINA model. For this model, the observed value is further out in the tail of the distribution of expected values. Accordingly, our <em>ppp</em> value is only 0.052.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<details class=\"code-fold\"><summary>Plot code</summary><div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb11\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/fit_ppmc.html\">fit_ppmc</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_dina</span>, model_fit <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"raw_score\"</span>, return_draws <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2000</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://purrr.tidyverse.org/reference/pluck.html\">pluck</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"ppmc_raw_score\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://dplyr.tidyverse.org/reference/select.html\">select</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">chisq_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://tidyr.tidyverse.org/reference/unnest.html\">unnest</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">chisq_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">|&gt;</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/ggplot.html\">ggplot</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/aes.html\">aes</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">chisq_samples</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mjskay.github.io/ggdist/reference/stat_dots.html\">stat_dots</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    quantiles <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">500</span>,</span>\n<span>    layout <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"hex\"</span>,</span>\n<span>    stackratio <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0.9</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    fill <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">2</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    na.rm <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">TRUE</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/geom_abline.html\">geom_vline</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span></span>\n<span>    xintercept <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_dina</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">@</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">fit</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">ppmc_raw_score</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">obs_chisq</span>,</span>\n<span>    color <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">msr_colors</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">[</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">3</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">]</span>,</span>\n<span>    linewidth <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">1</span></span>\n<span>  <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\"># scale_x_continuous(limits = c(0, 250)) +</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/coord_cartesian.html\">coord_cartesian</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>xlim <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://rdrr.io/r/base/c.html\">c</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">0</span>, <span class=\"fl\" style=\"color: #AD0000;\nbackground-color: null;\nfont-style: inherit;\">100</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/labs.html\">labs</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"cn\" style=\"color: #8f5902;\nbackground-color: null;\nfont-style: inherit;\">NULL</span>, x <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"st\" style=\"color: #20794D;\nbackground-color: null;\nfont-style: inherit;\">\"&amp;chi;^2^&lt;sub&gt;rep&lt;/sub&gt;\"</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">+</span></span>\n<span>  <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/theme.html\">theme</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span>axis.text.y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/element.html\">element_blank</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span>, axis.ticks.y <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">=</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://ggplot2.tidyverse.org/reference/element.html\">element_blank</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span></code></pre></div></div>\n</details><div class=\"cell-output-display\">\n<div alt=\"Dot plot showing the distribution of chi-square statistics from replicated datasets. A vertical line marks the observed chi-square statistic, which falls near the center of the distribution, indicating good model fit.\" class=\"quarto-float quarto-figure quarto-figure-center anchored\" data-fig-align=\"center\" id=\"fig-dina-chisq-dist\">\n<figure class=\"quarto-float quarto-float-fig figure\"><div aria-describedby=\"fig-dina-chisq-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\n<img alt=\"Dot plot showing the distribution of chi-square statistics from replicated datasets. A vertical line marks the observed chi-square statistic, which falls near the center of the distribution, indicating good model fit.\" class=\"img-fluid quarto-figure quarto-figure-center figure-img\" src=\"https://r-dcm.org/start/evaluate/index_files/figure-html/fig-dina-chisq-dist-1.png\" style=\"width:90.0%\"/>\n</div>\n<figcaption class=\"quarto-float-caption-bottom quarto-float-caption quarto-float-fig\" id=\"fig-dina-chisq-dist-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca\">\nFigure\u00a03: Posterior predictive \u03c7<sup>2</sup> distribution for the DINA model.\n</figcaption></figure>\n</div>\n</div>\n</div>\n</section></section><section class=\"level2\" id=\"relative-model-fit\"><h2 class=\"anchored\" data-anchor-id=\"relative-model-fit\">Relative model fit</h2>\n<p>Absolute fit asks whether the model fits the data. Relative fit asks a different question: Among several candidate models, which fits better? This distinction matters because sometimes multiple models may show adequate absolute model fit, and we need to choose the best model to implement. In our example, we have one model that fits well and one that doesn\u2019t so we don\u2019t really need an evaluation of relative model fit to determine which is better. However, we\u2019ll run comparison to illustrate idea.</p>\n<p>We recommend using leave-one-out cross-validation (LOO) estimates for model comparisons <span class=\"citation\" data-cites=\"loo-waic\">(Vehtari et al., 2017)</span>. LOO approximates how well the model would predict new, unseen data. Higher expected log predictive density (ELPD) values indicate better out-of-sample predictive performance. <code><a href=\"https://mc-stan.org/loo/reference/loo_compare.html\">loo_compare()</a></code> uses the <a href=\"https://mc-stan.org/loo/\">loo</a> package to directly compare the models, rank them by ELPD and report the difference along with its standard error.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb12\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://mc-stan.org/loo/reference/loo_compare.html\">loo_compare</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span>, <span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_dina</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;           elpd_diff se_diff</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; dtmr_lcdm    0.0       0.0 </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; dtmr_dina -195.5      19.2</span></span></code></pre></div></div>\n</div>\n<p>The model with the higher ELPD is listed first. A difference in ELPD that is large relative to its standard error (roughly more than 2.5 times) provides strong evidence that one model genuinely fits better. Since the data was simulated from an LCDM, the LCDM should show a substantially higher ELPD than the DINA, reflecting that the LCDM is a better match for the true data-generating process.</p>\n</section><section class=\"level2\" id=\"classification-reliability\"><h2 class=\"anchored\" data-anchor-id=\"classification-reliability\">Classification reliability</h2>\n<p>Even after examining fit, it\u2019s worth asking a separate question. Regardless of how well the model fits the data at an overall level, how reliable are the individual classifications it produces? For practical applications of DCMs,like providing feedback to teachers about specific competencies, the reliability of those classifications matters as much as overall model fit.</p>\n<p><code><a href=\"https://measr.r-dcm.org/reference/reliability.html\">reliability()</a></code> calculates several types of reliability evidence from our estimated model.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb13\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_reliability</span> <span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">&lt;-</span> <span class=\"fu\" style=\"color: #4758AB;\nbackground-color: null;\nfont-style: inherit;\"><a href=\"https://measr.r-dcm.org/reference/reliability.html\">reliability</a></span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">(</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">dtmr_lcdm</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">)</span></span>\n<span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_reliability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $pattern_reliability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;       p_a       p_c </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 0.7211589 0.6007968 </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $map_reliability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $map_reliability$accuracy</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 4 \u00d7 8</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   attribute                   acc lambda_a kappa_a youden_a tetra_a  tp_a  tn_a</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;                     &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 referent_units            0.926    0.785   0.367    0.828   0.968 0.875 0.952</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 partitioning_iterating    0.925    0.847   0.849    0.849   0.972 0.924 0.926</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 appropriateness           0.891    0.725   0.733    0.764   0.938 0.925 0.838</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 multiplicative_comparison 0.924    0.803   0.146    0.840   0.969 0.938 0.902</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $map_reliability$consistency</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 4 \u00d7 10</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   attribute         consist lambda_c kappa_c youden_c tetra_c  tp_c  tn_c gammak</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;               &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt;  &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 referent_units      0.875    0.625   0.665    0.719   0.909 0.813 0.907  0.890</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 partitioning_ite\u2026   0.868    0.733   0.849    0.736   0.915 0.870 0.866  0.889</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 appropriateness     0.828    0.547   0.682    0.635   0.844 0.862 0.773  0.843</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 multiplicative_c\u2026   0.877    0.682   0.757    0.741   0.920 0.900 0.841  0.896</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 1 more variable: pc_prime &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $eap_reliability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 4 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   attribute                 rho_pf rho_bs rho_i rho_tb</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;                      &lt;dbl&gt;  &lt;dbl&gt; &lt;dbl&gt;  &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 referent_units             0.787  0.756 0.600  0.930</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 partitioning_iterating     0.796  0.779 0.637  0.940</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 appropriateness            0.740  0.673 0.564  0.873</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 multiplicative_comparison  0.812  0.781 0.632  0.943</span></span></code></pre></div></div>\n</div>\n<p>measr returns three categories of reliability: pattern reliability, MAP (maximum a posteriori) reliability, and EAP (expected a posteriori) reliability. Each reflects a different way of reporting results, and the most relevant indices depend on how proficiency scores are determined and used. For a comprehensive review of reliability methods for DCMs, see <span class=\"citation\" data-cites=\"reliability-handbook\">Sinharay &amp; Johnson (2019)</span>.</p>\n<section class=\"level3\" id=\"pattern-reliability\"><h3 class=\"anchored\" data-anchor-id=\"pattern-reliability\">Pattern reliability</h3>\n<p>Pattern reliability evaluates the consistency and accuracy of classifying respondents into an overall profile\u2014the complete pattern of proficiency across all attributes simultaneously. <span class=\"citation\" data-cites=\"cui2012\">Cui et al. (2012)</span> describe two indices, <code>p_a</code> and <code>p_c</code>:</p>\n<ul>\n<li>p<sub>a</sub> is the probability of classifying a random respondent into the correct class.</li>\n<li>p<sub>c</sub> is the probability of consistently classifying a random respondent into the same class across two test administrations.</li>\n</ul>\n<p>These indices range from 0 to 1, with 1 indicating perfect accuracy or consistency, and 0 indicating the opposite.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb14\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_reliability</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">pattern_reliability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;       p_a       p_c </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 0.7211589 0.6007968</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level3\" id=\"map-reliability\"><h3 class=\"anchored\" data-anchor-id=\"map-reliability\">MAP reliability</h3>\n<p>MAP reliability evaluates accuracy and consistency at the attribute level, where each attribute is classified separately using a threshold (typically .5) applied to the estimated proficiency probability. <span class=\"citation\" data-cites=\"johnson2018\">Johnson &amp; Sinharay (2018)</span> describe two primary indices, P<sub>ak</sub> (<code>acc</code>) and P<sub>ck</sub> (<code>consist</code>):</p>\n<ul>\n<li>P<sub>ak</sub> is the accuracy of the attribute classification, or how often the classification matches the true latent state.</li>\n<li>P<sub>ck</sub> is the consistency of the classification across parallel test administrations.</li>\n</ul>\n<p>In addition, <span class=\"citation\" data-cites=\"johnson2018\">Johnson &amp; Sinharay (2018)</span> demonstrate how other agreement indices, such as Goodman and Kruskal\u2019s \u03bb and Cohen\u2019s \u03ba, can be used to evaluate accuracy and consistency at the attribute level. All indices are returned by <code><a href=\"https://measr.r-dcm.org/reference/reliability.html\">reliability()</a></code>.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb15\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_reliability</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">map_reliability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $accuracy</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 4 \u00d7 8</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   attribute                   acc lambda_a kappa_a youden_a tetra_a  tp_a  tn_a</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;                     &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 referent_units            0.926    0.785   0.367    0.828   0.968 0.875 0.952</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 partitioning_iterating    0.925    0.847   0.849    0.849   0.972 0.924 0.926</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 appropriateness           0.891    0.725   0.733    0.764   0.938 0.925 0.838</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 multiplicative_comparison 0.924    0.803   0.146    0.840   0.969 0.938 0.902</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; </span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; $consistency</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 4 \u00d7 10</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   attribute         consist lambda_c kappa_c youden_c tetra_c  tp_c  tn_c gammak</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;               &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt;    &lt;dbl&gt;   &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt;  &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 referent_units      0.875    0.625   0.665    0.719   0.909 0.813 0.907  0.890</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 partitioning_ite\u2026   0.868    0.733   0.849    0.736   0.915 0.870 0.866  0.889</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 appropriateness     0.828    0.547   0.682    0.635   0.844 0.862 0.773  0.843</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 multiplicative_c\u2026   0.877    0.682   0.757    0.741   0.920 0.900 0.841  0.896</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # \u2139 1 more variable: pc_prime &lt;dbl&gt;</span></span></code></pre></div></div>\n</div>\n</section><section class=\"level3\" id=\"eap-reliability\"><h3 class=\"anchored\" data-anchor-id=\"eap-reliability\">EAP reliability</h3>\n<p>EAP reliability evaluates the precision of the probability of proficiency itself, rather than a binary classification. <span class=\"citation\" data-cites=\"johnson2020\">Johnson &amp; Sinharay (2020)</span> describe four reliability metrics for this purpose and recommend using the biserial (<code>rho_bs</code>) and informational (<code>rho_i</code>) indices, as the parallel form estimates tend to overestimate reliability.</p>\n<div class=\"cell\" data-layout-align=\"center\">\n<div class=\"code-copy-outer-scaffold\"><div class=\"sourceCode\" id=\"cb16\" style=\"background: #f1f3f5;\"><pre class=\"downlit sourceCode r code-with-copy\"><code class=\"sourceCode R\"><span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">lcdm_reliability</span><span class=\"op\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">$</span><span class=\"va\" style=\"color: #111111;\nbackground-color: null;\nfont-style: inherit;\">eap_reliability</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; # A tibble: 4 \u00d7 5</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   attribute                 rho_pf rho_bs rho_i rho_tb</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt;   &lt;chr&gt;                      &lt;dbl&gt;  &lt;dbl&gt; &lt;dbl&gt;  &lt;dbl&gt;</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 1 referent_units             0.787  0.756 0.600  0.930</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 2 partitioning_iterating     0.796  0.779 0.637  0.940</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 3 appropriateness            0.740  0.673 0.564  0.873</span></span>\n<span><span class=\"co\" style=\"color: #5E5E5E;\nbackground-color: null;\nfont-style: inherit;\">#&gt; 4 multiplicative_comparison  0.812  0.781 0.632  0.943</span></span></code></pre></div></div>\n</div>\n<p>EAP reliability is typically lower than MAP reliability, because placing a respondent at a specific probability (a continuous scale) is harder than placing them into a binary category. That said, both MAP and EAP reliability can be adequate even when overall model fit is not perfect, which is one reason it\u2019s important to evaluate both fit and reliability.</p>\n</section></section><section class=\"level2\" id=\"wrapping-up\"><h2 class=\"anchored\" data-anchor-id=\"wrapping-up\">Wrapping up</h2>\n<p>So far we\u2019ve discussed various ways we can evaluate whether our model has good fit and provides accurate and reliable results. But what do we do if the answer is \u201cno\u201d? A good place to start is often examining your structural model and ensuring that attribute relationships are appropriately included. That is the focus of the <a href=\"https://r-dcm.org/start/evaluate//../../start/hierarchies/\">Define Attribute Relationships</a> article.</p>\n</section><div class=\"default\" id=\"quarto-appendix\"><section class=\"level2 appendix\" id=\"session-info\"><h2 class=\"anchored quarto-appendix-heading\">Session information</h2><div class=\"quarto-appendix-contents\">\n<div class=\"cell\" data-layout-align=\"center\">\n<pre><code>#&gt; \u2500 Session info \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  version      R version 4.5.2 (2025-10-31)\n#&gt;  language     (EN)\n#&gt;  date         2026-04-04\n#&gt;  pandoc       3.9\n#&gt;  quarto       1.9.24\n#&gt;  Stan (rstan) 2.37.0\n#&gt; \n#&gt; \u2500 Packages \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n#&gt;  package          version     date (UTC) source\n#&gt;  bridgesampling   1.2-1       2025-11-19 CRAN (R 4.5.2)\n#&gt;  dcmdata          0.2.0       2026-03-10 CRAN (R 4.5.2)\n#&gt;  dcmstan          0.1.0       2025-11-24 CRAN (R 4.5.2)\n#&gt;  dplyr            1.2.0       2026-02-03 CRAN (R 4.5.2)\n#&gt;  forcats          1.0.1       2025-09-25 CRAN (R 4.5.0)\n#&gt;  ggplot2          4.0.2       2026-02-03 CRAN (R 4.5.2)\n#&gt;  loo              2.9.0.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  lubridate        1.9.5       2026-02-04 CRAN (R 4.5.2)\n#&gt;  measr            2.0.0.9000  2026-03-21 Github (r-dcm/measr@475bc50)\n#&gt;  posterior        1.6.1.9000  2025-12-30 https://stan-dev.r-universe.dev (R 4.5.2)\n#&gt;  purrr            1.2.1       2026-01-09 CRAN (R 4.5.2)\n#&gt;  readr            2.2.0       2026-02-19 CRAN (R 4.5.2)\n#&gt;  rlang            1.1.7       2026-01-09 CRAN (R 4.5.2)\n#&gt;  rstan            2.36.0.9000 2025-09-26 https://stan-dev.r-universe.dev (R 4.5.1)\n#&gt;  stringr          1.6.0       2025-11-04 CRAN (R 4.5.0)\n#&gt;  tibble           3.3.1       2026-01-11 CRAN (R 4.5.2)\n#&gt;  tidyr            1.3.2       2025-12-19 CRAN (R 4.5.2)\n#&gt; \n#&gt; \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500</code></pre>\n</div>\n</div></section><section class=\"quarto-appendix-contents\" id=\"quarto-bibliography\"><h2 class=\"anchored quarto-appendix-heading\">References</h2><div class=\"references csl-bib-body hanging-indent\" data-entry-spacing=\"0\" data-line-spacing=\"2\" id=\"refs\">\n<div class=\"csl-entry\" id=\"ref-dtmr\">\nBradshaw, L., Izs\u00e1k, A., Templin, J., &amp; Jacobson, E. (2014). Diagnosing teachers\u2019 understandings of rational numbers: Building a multidimensional test within the diagnostic classification framework. <em>Educational Measurement: Issues and Practice</em>, <em>33</em>(1), 2\u201314. <a href=\"https://doi.org/10.1111/emip.12020\">https://doi.org/10.1111/emip.12020</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-cui2012\">\nCui, Y., Gierl, M. J., &amp; Chang, H.-H. (2012). Estimating classification consistency and accuracy for cognitive diagnostic assessment. <em>Journal of Educational Measurement</em>, <em>49</em>(1), 19\u201338. <a href=\"https://doi.org/10.1111/j.1745-3984.2011.00158.x\">https://doi.org/10.1111/j.1745-3984.2011.00158.x</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-dina\">\n<span class=\"nocase\">de la Torre, J., &amp; Douglas, J. A.</span> (2004). Higher-order latent trait models for cognitive diagnosis. <em>Psychometrika</em>, <em>69</em>(3), 333\u2013353. <a href=\"https://doi.org/10.1007/BF02295640\">https://doi.org/10.1007/BF02295640</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-lcdm\">\nHenson, R. A., Templin, J. L., &amp; Willse, J. T. (2009). Defining a family of cognitive diagnosis models using log-linear models with latent variables. <em>Psychometrika</em>, <em>74</em>(2), 191\u2013210. <a href=\"https://doi.org/10.1007/s11336-008-9089-5\">https://doi.org/10.1007/s11336-008-9089-5</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-dtmr-strc\">\nIzs\u00e1k, A., Jacobson, E., &amp; Bradshaw, L. (2019). Surveying middle-grades teachers\u2019 reasoning about fraction arithmetic in terms of measured quantities. <em>Journal for Research in Mathematics Education</em>, <em>50</em>(2), 156\u2013209. <a href=\"https://doi.org/10.5951/jresematheduc.50.2.0156\">https://doi.org/10.5951/jresematheduc.50.2.0156</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-johnson2018\">\nJohnson, M. S., &amp; Sinharay, S. (2018). Measures of agreement to assess attribute-level classification accuracy and consistency for cognitive diagnostic assessments. <em>Journal of Educational Measurement</em>, <em>55</em>(4), 635\u2013664. <a href=\"https://doi.org/10.1111/jedm.12196\">https://doi.org/10.1111/jedm.12196</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-johnson2020\">\nJohnson, M. S., &amp; Sinharay, S. (2020). The reliability of the posterior probability of skill attainment in diagnostic classification models. <em>Journal of Educational and Behavioral Statistics</em>, <em>45</em>(1), 5\u201331. <a href=\"https://doi.org/10.3102/1076998619864550\">https://doi.org/10.3102/1076998619864550</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-liu2016\">\nLiu, Y., Tian, W., &amp; Xin, T. (2016). An application of <span><img src=\"https://latex.codecogs.com/png.latex?M_2\"/></span> statistic to evaluate the fit of cognitive diagnostic models. <em>Journal of Educational and Behavioral Statistics</em>, <em>41</em>(1), 3\u201326. <a href=\"https://doi.org/10.3102/1076998615621293\">https://doi.org/10.3102/1076998615621293</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-m2-2005\">\nMaydeu-Olivares, A., &amp; Joe, H. (2005). Limited- and full-information estimation and goodness-of-fit testing in <img src=\"https://latex.codecogs.com/png.latex?2%5En\"/> contingency tables: <span>A</span> unified framework. <em>Journal of the American Statistical Association</em>, <em>100</em>(471), 1009\u20131020. <a href=\"https://doi.org/10.1198/016214504000002069\">https://doi.org/10.1198/016214504000002069</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-m2-2006\">\nMaydeu-Olivares, A., &amp; Joe, H. (2006). Limited information goodness-of-fit testing in multidimensional contingency tables. <em>Psychometrika</em>, <em>71</em>(4), 713\u2013732. <a href=\"https://doi.org/10.1007/s11336-005-1295-9\">https://doi.org/10.1007/s11336-005-1295-9</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-park2015\">\nPark, J. Y., Johnson, M. S., &amp; Lee, Y.-S. (2015). Posterior predictive model checks for cognitive diagnostic models. <em>International Journal of Quantitative Research in Education</em>, <em>2</em>(3\u20134), 244\u2013264. <a href=\"https://doi.org/10.1504/IJQRE.2015.071738\">https://doi.org/10.1504/IJQRE.2015.071738</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-reliability-handbook\">\nSinharay, S., &amp; Johnson, M. S. (2019). Measures of agreement: <span>Reliability</span>, classification accuracy, and classification consistency. In <span class=\"nocase\">M. von Davier &amp; Y.-S. Lee (Eds.)</span>, <em>Handbook of <span>Diagnostic Classification Models</span></em> (pp. 359\u2013377). <span>Springer International Publishing</span>. <a href=\"https://doi.org/10.1007/978-3-030-05584-4_17\">https://doi.org/10.1007/978-3-030-05584-4_17</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-thompson-bayes\">\nThompson, W. J. (2019). <em>Bayesian psychometrics for diagnostic assessments: <span>A</span> proof of concept</em> (Research Report Nos. No. 19-01). <span>University of Kansas; Accessible Teaching, Learning, and Assessment Systems</span>. <a href=\"https://doi.org/10.35542/osf.io/jzqs8\">https://doi.org/10.35542/osf.io/jzqs8</a>\n</div>\n<div class=\"csl-entry\" id=\"ref-loo-waic\">\nVehtari, A., Gelman, A., &amp; Gabry, J. (2017). Practical <span>Bayesian</span> model evaluation using leave-one-out cross-validation and <span>WAIC</span>. <em>Statistics and Computing</em>, <em>27</em>, 1413\u20131432. <a href=\"https://doi.org/10.1007/s11222-016-9696-4\">https://doi.org/10.1007/s11222-016-9696-4</a>\n</div>\n</div></section></div>","doi":"https://doi.org/10.59350/pv6qr-6z165","funding_references":null,"guid":"https://r-dcm.org/start/evaluate/","id":"2b9990ca-7018-4b53-a816-b5366ea184ff","image":"https://r-dcm.org/start/evaluate/index_files/figure-html/fig-rawscore-dist-1.png","indexed":true,"indexed_at":1775360510,"language":"en","parent_doi":null,"published_at":1775357296,"reference":[{"id":"https://doi.org/10.1111/emip.12020","unstructured":"\nBradshaw, L., Izs\u00e1k, A., Templin, J., & Jacobson, E. (2014). Diagnosing teachers\u2019 understandings of rational numbers: Building a multidimensional test within the diagnostic classification framework. Educational Measurement: Issues and Practice, 33(1), 2\u201314. https://doi.org/10.1111/emip.12020\n"},{"id":"https://doi.org/10.1111/j.1745-3984.2011.00158.x","unstructured":"\nCui, Y., Gierl, M. J., & Chang, H.-H. (2012). Estimating classification consistency and accuracy for cognitive diagnostic assessment. Journal of Educational Measurement, 49(1), 19\u201338. https://doi.org/10.1111/j.1745-3984.2011.00158.x\n"},{"id":"https://doi.org/10.1007/BF02295640","unstructured":"\nde la Torre, J., & Douglas, J. A. (2004). Higher-order latent trait models for cognitive diagnosis. Psychometrika, 69(3), 333\u2013353. https://doi.org/10.1007/BF02295640\n"},{"id":"https://doi.org/10.1007/s11336-008-9089-5","unstructured":"\nHenson, R. A., Templin, J. L., & Willse, J. T. (2009). Defining a family of cognitive diagnosis models using log-linear models with latent variables. Psychometrika, 74(2), 191\u2013210. https://doi.org/10.1007/s11336-008-9089-5\n"},{"id":"https://doi.org/10.5951/jresematheduc.50.2.0156","unstructured":"\nIzs\u00e1k, A., Jacobson, E., & Bradshaw, L. (2019). Surveying middle-grades teachers\u2019 reasoning about fraction arithmetic in terms of measured quantities. Journal for Research in Mathematics Education, 50(2), 156\u2013209. https://doi.org/10.5951/jresematheduc.50.2.0156\n"},{"id":"https://doi.org/10.1111/jedm.12196","unstructured":"\nJohnson, M. S., & Sinharay, S. (2018). Measures of agreement to assess attribute-level classification accuracy and consistency for cognitive diagnostic assessments. Journal of Educational Measurement, 55(4), 635\u2013664. https://doi.org/10.1111/jedm.12196\n"},{"id":"https://doi.org/10.3102/1076998619864550","unstructured":"\nJohnson, M. S., & Sinharay, S. (2020). The reliability of the posterior probability of skill attainment in diagnostic classification models. Journal of Educational and Behavioral Statistics, 45(1), 5\u201331. https://doi.org/10.3102/1076998619864550\n"},{"id":"https://doi.org/10.3102/1076998615621293","unstructured":"\nLiu, Y., Tian, W., & Xin, T. (2016). An application of  statistic to evaluate the fit of cognitive diagnostic models. Journal of Educational and Behavioral Statistics, 41(1), 3\u201326. https://doi.org/10.3102/1076998615621293\n"},{"id":"https://doi.org/10.1198/016214504000002069","unstructured":"\nMaydeu-Olivares, A., & Joe, H. (2005). Limited- and full-information estimation and goodness-of-fit testing in  contingency tables: A unified framework. Journal of the American Statistical Association, 100(471), 1009\u20131020. https://doi.org/10.1198/016214504000002069\n"},{"id":"https://doi.org/10.1007/s11336-005-1295-9","unstructured":"\nMaydeu-Olivares, A., & Joe, H. (2006). Limited information goodness-of-fit testing in multidimensional contingency tables. Psychometrika, 71(4), 713\u2013732. https://doi.org/10.1007/s11336-005-1295-9\n"},{"id":"https://doi.org/10.1504/IJQRE.2015.071738","unstructured":"\nPark, J. Y., Johnson, M. S., & Lee, Y.-S. (2015). Posterior predictive model checks for cognitive diagnostic models. International Journal of Quantitative Research in Education, 2(3\u20134), 244\u2013264. https://doi.org/10.1504/IJQRE.2015.071738\n"},{"id":"https://doi.org/10.1007/978-3-030-05584-4_17","unstructured":"\nSinharay, S., & Johnson, M. S. (2019). Measures of agreement: Reliability, classification accuracy, and classification consistency. In M. von Davier & Y.-S. Lee (Eds.), Handbook of Diagnostic Classification Models (pp. 359\u2013377). Springer International Publishing. https://doi.org/10.1007/978-3-030-05584-4_17\n"},{"id":"https://doi.org/10.35542/osf.io/jzqs8","unstructured":"\nThompson, W. J. (2019). Bayesian psychometrics for diagnostic assessments: A proof of concept (Research Report Nos. No. 19-01). University of Kansas; Accessible Teaching, Learning, and Assessment Systems. https://doi.org/10.35542/osf.io/jzqs8\n"},{"id":"https://doi.org/10.1007/s11222-016-9696-4","unstructured":"\nVehtari, A., Gelman, A., & Gabry, J. (2017). Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC. Statistics and Computing, 27, 1413\u20131432. https://doi.org/10.1007/s11222-016-9696-4\n"}],"registered_at":0,"relationships":[],"rid":"nbv82-s8e12","status":"active","summary":"Introduction   Once you\u2019ve estimated a DCM, the natural next question is:\n<em>\n does this model actually work?\n</em>\nBefore reporting results or making decisions based on proficiency classifications, we want evidence that the model is doing a good job of representing the data. In this article, we\u2019ll walk through four complementary approaches to evaluating a DCM: Absolute fit: Does the model fit the observed data?","tags":[],"title":"Evaluate model performance","updated_at":1775357296,"url":"https://r-dcm.org/start/evaluate/","version":"v1"},{"abstract":"A bit over a week ago, SWAT4HCLS 2026 took place, with the matching biohackathon on Thursday (see this post. I attempted a bit of live coverage on mastodon: day 1 and day 2. But it seems the semantic web community interested in SWAT4HCLS has not found the fediverse yet. So, make sure to check this full list of abstracts.","archive_url":null,"authors":[{"affiliation":[{"id":"https://ror.org/02jz4aj89","name":"Maastricht University"}],"contributor_roles":[],"family":"Willighagen","given":"Egon","url":"https://orcid.org/0000-0001-7542-0286"}],"blog":{"archive_collection":24077,"archive_host":null,"archive_prefix":null,"archive_timestamps":[20250309095102],"authors":[{"name":"Egon Willighagen"}],"canonical_url":null,"category":"chemicalSciences","community_id":"7f57028e-9d03-489c-b3b4-3d60de06bc9e","created_at":1710339716,"current_feed_url":"https://chem-bla-ics.linkedchemistry.info/feed.json","description":"Chemblaics (pronounced chem-bla-ics) is the science that uses open science and computers to solve problems in chemistry, biochemistry and related fields.","doi_as_guid":false,"favicon":"https://rogue-scholar.org/api/communities/7f57028e-9d03-489c-b3b4-3d60de06bc9e/logo","feed_format":"application/feed+json","feed_url":"https://chem-bla-ics.linkedchemistry.info/archive.json","filter":null,"funding":null,"generator":"Jekyll","generator_raw":"Jekyll 4.3.4","home_page_url":"https://chem-bla-ics.linkedchemistry.info","id":"0bf0d06a-a707-417d-81eb-65b6c060d7e4","indexed":true,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":1729769435,"relative_url":null,"ror":null,"secure":true,"slug":"chem_bla_ics","status":"active","subfield":"1606","subfield_validated":null,"title":"chem-bla-ics","updated_at":1775375431.247013,"use_api":true,"use_mastodon":false,"user_id":"dead81b3-8a8b-45c9-85fe-f01bb3948c77"},"blog_name":"chem-bla-ics","blog_slug":"chem_bla_ics","content_html":"<p>A bit over a week ago, <a href=\"https://www.swat4ls.org/workshops/amsterdam2026/\">SWAT4HCLS 2026</a> took place, with the matching\n<a href=\"https://www.swat4ls.org/workshops/amsterdam2026/swat4hcls-biohackathon-2026/\">biohackathon</a> on Thursday (see\n<a href=\"https://chem-bla-ics.linkedchemistry.info/2026/03/22/swat4hcls-2026-amsterdam-this-week.html\">this post</a>.\nI attempted a bit of live coverage on mastodon: <a href=\"https://social.edu.nl/@egonw/116285060969709401\">day 1</a> and\n<a href=\"https://social.edu.nl/@egonw/116289579219485790\">day 2</a>. But it seems the semantic web community interested\nin SWAT4HCLS has not found the fediverse yet. So, make sure to check\n<a href=\"https://www.swat4ls.org/workshops/amsterdam2026/programme/accepted-submissions/\">this full list of abstracts</a>.</p>\n<p>The meeting consisted of <a href=\"https://www.swat4ls.org/workshops/amsterdam2026/programme/keynotes/\">four keynotes</a>, each\none was quite interesting. Cornet gave a nice historic perspective of the venue and of the semantic web field,\nwhich is a great way to welcome the participants to your institute. The talk also touches on the main theme\nof the meeting: clinical data. It is a long standing (and important) research field, but progress is slow.\nCornet <a href=\"https://social.edu.nl/@egonw/116283216644714695\">comments</a> along the lines that <em>we have been talking\nabout reasoning over patient data for more than twenty years, but we still have not solve it</em>.</p>\n<p>The problem is really not only privacy, but simple also lack of a common language. As\n<a href=\"https://qlever.scholia.wiki/orcid/0000-0003-3248-7899\">Sabine \u00d6sterle</a> explains\nabout sharing health/patient data in Switzerland, across 26 kantons and legislations and 4 national languages.\nAnother issue is more technical, running SPARQL across hospitals involves more than just aligning ontologies,\nbut also requires (too much) fiddling with SPARQL queries.</p>\n<p>There was plenty of other content too, however. For example, I was pleasantly\n<a href=\"https://social.edu.nl/@egonw/116284409447761902\">surprised</a> by the\n<a href=\"https://www.swat4ls.org/workshops/amsterdam2026/programme/accepted-submissions/#RDF4RiskAssessment_Toolkit_A_Toolkit_for_Converting_Tabular_Research_Data_to_FAIR_RDF_for_Risk_Assessment_and_Life_Sciences\">RDF4RiskAssessment</a>\nwork, the <a href=\"https://www.swat4ls.org/workshops/amsterdam2026/programme/accepted-submissions/#RO-Crates_for_BioImaging\">RO-Crates for BioImaging</a>,\nand <a href=\"https://www.swat4ls.org/workshops/amsterdam2026/programme/accepted-submissions/#FDPcrawleR_A_Lightweight_R_Framework_for_Auditing_FAIR_Data_Points_and_FAIR_Virtual_Platforms\">FDPcrawleR</a>.\nAll these projects have direct links to research ongoing in <a href=\"https://www.maastrichtuniversity.nl/research/translational-genomics\">our TGX team</a>.</p>\n<p><a href=\"https://qlever.scholia.wiki/orcid/0000-0003-1213-6776\">Hanna Bast</a> gave the second keynote of the first day, about <a href=\"https://qlever.dev/\">QLever</a>\n(doi:<a href=\"https://doi.org/10.1145/3132847.3132921\">10.1145/3132847.3132921</a>). She talked about some of the recent improvements,\nsomething we really <a href=\"https://chem-bla-ics.linkedchemistry.info/2026/02/28/rescuing-scholia-3-we-did-it.html\">needed for Scholia</a>.\nShe showed a technical approach to make federated queries faster, tho it currently only works between endpoints\nthat both run QLever. One thing I am looking forward to, is playing with the notion of\n<a href=\"https://docs.qlever.dev/materialized-views/?h=materialize\">materialized views</a>, but the biohackathon\nwas too short to get around to that during the Thursday.</p>\n<p>The second day kicked off with a keynote by <a href=\"https://qlever.scholia.wiki/orcid/0000-0002-3469-4923\">Janna Hastings</a>,\nwhose work I greatly admire. I was not disappointed today, and she showed the\n<a href=\"https://www.bciontology.org/\">Behaviour Change Intervention Ontology</a> and <a href=\"https://chebifier.hastingslab.org/\">Chebifier</a>\n(doi:<a href=\"https://doi.org/10.1039/D3DD00238A\">10.1039/D3DD00238A</a>).</p>\n<p>The last talk I want to mention in the blog is by two researcher working with Michel Dumontier. They\n<a href=\"https://www.swat4ls.org/workshops/amsterdam2026/programme/accepted-submissions/#Embedding-based_Deduplication_of_Knowledge_Graphs_using_Graph_Neural_Networks\">presented</a>\na study about deduplication in/of knowledge graphs. This is something I want to read in more detail.</p>","doi":"https://doi.org/10.59350/bmxve-vry14","funding_references":null,"guid":"https://doi.org/10.59350/bmxve-vry14","id":"b5653278-57f5-437f-b74a-56baec89fdec","image":null,"indexed":true,"indexed_at":1775331556,"language":"en","parent_doi":null,"published_at":1775321640,"reference":[{"id":"https://doi.org/10.1039/D3DD00238A"},{"id":"https://doi.org/10.1145/3132847.3132921"}],"registered_at":0,"relationships":[],"rid":"fv0j9-k5x63","status":"active","summary":"A bit over a week ago, SWAT4HCLS 2026 took place, with the matching biohackathon on Thursday (see this post. I attempted a bit of live coverage on mastodon: day 1 and day 2. But it seems the semantic web community interested in SWAT4HCLS has not found the fediverse yet. So, make sure to check this full list of abstracts. The meeting consisted of four keynotes, each one was quite interesting.","tags":["Swat4ls","Mastodon"],"title":"SWAT4HCLS 2026","updated_at":1775321640,"url":"https://chem-bla-ics.linkedchemistry.info/2026/04/04/swat4hcls-2026.html","version":"v1"},{"abstract":"Unsere monatliche Rubrik zu aktuellen Veranstaltungen rund um Open Research.","archive_url":null,"authors":[{"contributor_roles":[],"family":"Fischer","given":"Georg","url":"https://orcid.org/0000-0001-5620-5759"}],"blog":{"archive_collection":22141,"archive_host":null,"archive_prefix":"https://wayback.archive-it.org/22141/20231105110201/","archive_timestamps":[20231105110201,20240505180741,20241105110207,20250505110216],"authors":null,"canonical_url":null,"category":"otherSocialSciences","community_id":"52aefd81-f405-4349-b080-754395a5d8b2","created_at":1694476800,"current_feed_url":null,"description":null,"doi_as_guid":false,"favicon":"https://rogue-scholar.org/api/communities/52aefd81-f405-4349-b080-754395a5d8b2/logo","feed_format":"application/atom+xml","feed_url":"https://blogs.fu-berlin.de/open-research-berlin/feed/atom/","filter":null,"funding":null,"generator":"WordPress","generator_raw":"WordPress 6.0","home_page_url":"https://blogs.fu-berlin.de/open-research-berlin/","id":"575d6b2d-c555-4fc7-99fb-055a400f9163","indexed":false,"issn":null,"language":"de","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":"https://berlin.social/@openaccess","prefix":"10.59350","registered_at":1729602098,"relative_url":null,"ror":null,"secure":true,"slug":"oaberlin","status":"active","subfield":"1802","subfield_validated":null,"title":"Open Research Office Berlin","updated_at":1775375524.800675,"use_api":true,"use_mastodon":true,"user_id":"383c62ed-0cf6-4dc7-a56c-5b0104f7f10a"},"blog_name":"Open Research Office Berlin","blog_slug":"oaberlin","content_html":"<p>Unsere monatliche Rubrik zu aktuellen Veranstaltungen rund um Open Research.</p>\n<p><!--more--></p>\n<pre>Anmerkung zu dieser Rubrik: Das Open Research Office Berlin erstellt monatlich eine \u00dcbersicht \u00fcber Termine und Veranstaltungen zu Open Access und Open Research in Berlin bzw. an Berliner Einrichtungen. Der Fokus liegt dabei auf unseren Partnereinrichtungen und auf Veranstaltungen, die sich an die \u00d6ffentlichkeit richten bzw. die offen sind f\u00fcr Angeh\u00f6rige der Wissenschafts- und Kulturerbeeinrichtungen in Berlin. Wir erg\u00e4nzen diese Liste gerne (Info bitte via <a href=\"mailto:team@open-research-berlin.de\">Mail</a> ans OROB).</pre>\n<h2>6. Mai, Workshop Introduction to Data Management Plans</h2>\n<p>A Data Management Plan (DMP) describes how the research data created or used in a project is methodically managed throughout the project. It is a useful tool for reflecting on and improving one&#8217;s research data management. It is also often a requirement by research funding organisations. This online workshop is aimed at researchers and doctoral candidates at any stage of their (PhD) project.</p>\n<ul>\n<li><strong>Termin:\u00a0</strong>06.05.2026, 09:30 bis 12:00 Uhr</li>\n<li><strong>Organisiert von</strong>: Freie Universit\u00e4t Berlin</li>\n<li>[<a href=\"https://www.fu-berlin.de/sites/forschungsdatenmanagement/veranstaltungen/2026/2026-05-06-Workshop-Intro-DMP-en-DM.html\">Information und Anmeldung</a>]</li>\n</ul>\n<div class=\"box-event-doc-header-title col-m-8\">\n<h2>7. Mai, Study preregistration and Registered Reports for hypothesis-driven research, online</h2>\n<p><em>Registering a study\u2019s hypothesis, design, methods and analysis plan prior to conducting the study increases the transparency of your research and can reduce biases and questionable research practices. This coffee lecture introduces the Open Science practice of preregistration, the motivation behind it and how to preregister work in a repository (without peer review) or a journal (with peer review).</em></p>\n<ul>\n<li><strong>Termin:\u00a0</strong>07.05.2026, 10:00 bis 10:30 Uhr, online</li>\n<li><strong>Organisiert von</strong>: Freie Universit\u00e4t Berlin</li>\n<li>[<a href=\"https://www.fu-berlin.de/sites/forschungsdatenmanagement/veranstaltungen/2026/2026-05-07-CoffeeLecture-Preregistration-en-DM.html\">Information und Anmeldung</a>]</li>\n</ul>\n</div>\n<h2>7. Mai, Workshop Introduction to Research Data Management</h2>\n<p><em>Das Projekt \u201e<a href=\"https://www.berlin-university-alliance.de/commitments/sharing-resources/shared-resources-center/CARDS-FDM/index.html\">Collaboratively Advancing Research Data Support</a>\u201c (CARDS) l\u00e4dt Forscherinnen und Forscher von BUA-Einrichtungen herzlich ein, im Mai an einem\u00a0interaktiven Workshop zum Thema Forschungsdatenmanagement\u00a0(FDM) teilzunehmen. Vorkenntnisse im Bereich Forschungsdatenmanagement sind\u00a0nicht erforderlich!\u00a0</em><em>Der Workshop ist auf die Bed\u00fcrfnisse der Teilnehmerinnen und Teilnehmer zugeschnitten und behandelt wichtige Themen des FDM wie\u00a0Datendokumentation und -organisation, rechtliche Aspekte des Datenmanagements und Datenver\u00f6ffentlichung.\u00a0</em><em>Im ersten Teil des Workshops, der am 7. Mai 2026 stattfindet, werden Sie sich\u00a0praktische F\u00e4higkeiten\u00a0in\u00a0hands-on \u00dcbungen\u00a0aneignen, die Sie sofort in Ihrer Arbeit umsetzen k\u00f6nnen. Im anschlie\u00dfenden Online-Meeting mit dem Trainer im Oktober haben Sie die M\u00f6glichkeit,\u00a0Feedback zu Ihrem Forschungsdatenmanagement\u00a0zu erhalten und es mit Hilfe unseres Experten zu verfeinern.</em></p>\n<ul>\n<li><strong>Termin:\u00a0</strong>07.05.2026, 09:00 bis 15:30 Uhr</li>\n<li><strong>Organisiert von</strong>: Berlin University Alliance; Referent: Benjamin Golub-Overbeck (Landesinitiative f\u00fcr Forschungsdatenmanagement in Niedersachsen, FDM-NDS)</li>\n<li>[<a href=\"https://www.berlin-university-alliance.de/commitments/sharing-resources/shared-resources-center/CARDS-FDM/cards_events/2026-05-07_fdm_einfuehrung.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>8. Mai, Strategisch publizieren im Open Access: Das richtige Journal ausw\u00e4hlen, online</h2>\n<p><em>Was bedeutet es, im Open Access zu ver\u00f6ffentlichen? Wie finde ich ein geeignetes Open-Access-Journal f\u00fcr meinen Artikel? Welche offene Lizenz sollte ich verwenden? Diese und \u00e4hnliche Fragen werden in der von der Bibliothek organisierten Reihe &#8222;Open Access verstehen&#8220; beantwortet. Die Beitr\u00e4ge werden in Kooperation mit der Hochschulbibliothek der ASH und der BHT Berlin organisiert.\u00a0Die Vortr\u00e4ge finden im Online-Format statt und sind f\u00fcr alle offen. Eine Anmeldung ist nicht erforderlich.</em></p>\n<ul>\n<li><strong>Termin: </strong>08.05.2026, 11:00 bis 11:45 Uhr, online</li>\n<li><strong>Organisiert von</strong>: HTW, ASH und BHT Berlin</li>\n<li>[<a href=\"https://events.htw-berlin.de/forschung/open-access-verstehen/\">Information und Anmeldung</a>]</li>\n</ul>\n<div class=\"box-event-doc-header-title col-m-8\">\n<h2 class=\"box-event-doc-title\">13. Mai, Forschungsdatenmanagement und Open Science in der Forschungsf\u00f6rderung</h2>\n<p><em>In der Veranstaltung erhalten Sie eine knappe \u00dcbersicht zu den typischen formalen und inhaltlichen Vorgaben der zentralen bundesdeutschen und europ\u00e4ischen F\u00f6rderer. Zahlreiche nationale und internationale Forschungsf\u00f6rderer wie die DFG, das BMBF und die Europ\u00e4ische Kommission haben in den vergangenen Jahren Richtlinien f\u00fcr das Forschungsdatenmanagement (FDM) vorgelegt. Dabei variieren Inhalt und Umfang der Anforderungen je nach F\u00f6rderer und Programmlinie. Auch die f\u00fcr das FDM zu beantragenden Kosten unterscheiden sich je nach F\u00f6rderer; und schlie\u00dflich kann auch die Fachdisziplin Auswirkungen auf die Anforderungen haben. Die Veranstaltung richtet sich an interessierte Forschende aller Erfahrungsstufen, die Forschungsantr\u00e4ge stellen (wollen), sowie an forschungsunterst\u00fctzendes Personal.</em></p>\n</div>\n<ul>\n<li><strong>Termin: </strong>13.05.2026, 10:00 bis 12:00 Uhr, online</li>\n<li><strong>Organisiert von</strong>: Freie Universit\u00e4t Berlin</li>\n<li>[<a href=\"https://www.fu-berlin.de/sites/forschungsdatenmanagement/veranstaltungen/2026/2026-05-13-Event-FDM-OS-Foerderer-de-DM.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>13. Mai, Biologische Sammlungen vernetzen: Daten, Standards, Zusammenarbeit, online</h2>\n<div class=\"box-event-doc-header-title col-m-8\">\n<p><em>Anton G\u00fcntsch, Leiter des Zentrums f\u00fcr Biodiversit\u00e4tsinformatik und Sammlungsdatenintegration am Botanischen Garten Berlin, gibt Ihnen einen \u00dcberblick \u00fcber das Management und die Vernetzung biologischer Sammlungsdaten im lokalen, nationalen und internationalen Kontext. Am Beispiel des Botanischen Gartens Berlin an der Freien Universit\u00e4t wird die Vielfalt biologischer Sammlungen vorgestellt \u2013 von konservierten Sammlungsexemplaren \u00fcber lebende Sammlungen, Saatgut sowie Gewebe- und DNA-Proben bis hin zu Multimediaobjekten \u2013 und ihre Bedeutung f\u00fcr die biologische Forschung aufgezeigt.</em></p>\n</div>\n<ul>\n<li><strong>Termin: </strong>13.05.2026, 10:00 bis 11:30 Uhr, online</li>\n<li><strong>Organisiert von</strong>: Berlin University Alliance; Referent: Anton G\u00fcntsch (Zentrum f\u00fcr Biodiversit\u00e4tsinformatik und Sammlungsdatenintegration am Botanischen Garten Berlin)</li>\n<li>[<a href=\"https://www.berlin-university-alliance.de/commitments/sharing-resources/shared-resources-center/CARDS-FDM/cards_events/2026-05-13_bio-de.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>18. Mai, Archive unter Druck, Bodo-Uhse-Bibliothek</h2>\n<p><em>Das partizipative Forum ARCHIVE UNTER DRUCK in der Bodo-Uhse-Bibliothek l\u00e4dt am 18.05.2026 von 13:30 bis 15:30 Uhr zu einem praxisnahen Austausch ein. Ausgehend von kurzen Impulsvortr\u00e4gen zur aktuellen Situation von Archiven und anderen Ged\u00e4chtnisorganisationen unter Druck bietet das Forum Raum f\u00fcr Diskussionen, Erfahrungsaustausch und die gemeinsame Frage, wie Archive und engagierte Akteur*innen unterst\u00fctzt und vernetzt werden k\u00f6nnen.</em></p>\n<ul>\n<li><strong>Termin: </strong>18.05.2026, 10:00 bis 11:30 Uhr, Bodo-Uhse-Bibliothek, Erich-Kurz-Str. 9, 10319 Berlin-Lichtenberg</li>\n<li><strong>Organisiert von</strong>: AK Offene Archive, AG Demokratie; Bodo-Uhse-Bibliothek; CORe \u2013 Center for Open and Responsible Research, Berlin University Alliance (BUA); DDF \u2013 Digitales Deutsches Frauenarchiv; und TIB \u2013 Leibniz Informationszentrum Technik und Naturwissenschaften</li>\n<li>[<a href=\"https://www.digitales-deutsches-frauenarchiv.de/blog/archive-unter-druck-einladung-zum-gemeinsamen-forum#no-back\">Information und Anmeldung</a>]</li>\n</ul>\n<hr />\n<h2>+++Das Open Research Office Berlin bei der Bibliocon+++</h2>\n<h3>19. Mai, Offen, aber rechtens! \u2013 Hands-on-Lab zu (urheber-)rechtlichen Fragen bei Open Access und Open Research, Bibliocon Berlin</h3>\n<h3>21. Mai, oa.atlas zum Mitmachen: Chancen, Herausforderungen und neue Features diskutieren, Bibliocon Berlin</h3>\n<p><em>\u201eAnalog trifft Algorithmus\u201c: Das ist das Motto der diesj\u00e4hrigen 114. BiblioCon. Die Konferenz ist eine j\u00e4hrlich stattfindende Konferenz in der Bibliothekswelt und gastiert im Mai 2026 im Berliner Estrel Congress Center. Das Open Research Office Berlin ist an mehreren Sessions beteiligt, f\u00fcr die sich Interessierte ab sofort anmelden k\u00f6nnen. N\u00e4here Information in unserem <a href=\"https://blogs.fu-berlin.de/open-research-berlin/2026/03/04/open-research-office-berlin-bibliocon-2026/\">Blog</a>:</em></p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"iZGiExZo4Q\"><p><a href=\"https://blogs.fu-berlin.de/open-research-berlin/2026/03/04/open-research-office-berlin-bibliocon-2026/\">Das Open Research Office Berlin bei der BiblioCon-Konferenz in Berlin (19.-22. Mai)</a></p></blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8222;Das Open Research Office Berlin bei der BiblioCon-Konferenz in Berlin (19.-22. Mai)&#8220; &#8211; Open Research Blog Berlin\" src=\"https://blogs.fu-berlin.de/open-research-berlin/2026/03/04/open-research-office-berlin-bibliocon-2026/embed/#?secret=XyqgMChxWt#?secret=iZGiExZo4Q\" data-secret=\"iZGiExZo4Q\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"></iframe></p>\n<hr />\n<h2>19.-20. Mai,The Politics &amp; Finances of (Open) Science Reform: A workshop on the socio-economic architecture of the Open Science Movement</h2>\n<p><em>In the planned workshop we would therefore like to ask: Who funds OS? Who benefits from OS financially? How do private and political interests work against the proclaimed idea(l)s of OS? What examples of \u2018OS backsliding\u2019 can we identify already? What is the interaction between OS implementations in research policy \u2014 for instance in the form of Open Innovation agendas (Heimst\u00e4dt &amp; Friesike, 2021; Lund, 2025) \u2014 and the financial realities of OS?</em></p>\n<ul>\n<li><strong>Termin: </strong>19.-20.05.2026, HU Berlin</li>\n<li><strong>Organisiert von</strong>: Robert Merton Zentrum f\u00fcr Wissenschaftsforschung, HU Berlin</li>\n<li>[<a href=\"https://www.rmz.hu-berlin.de/de/termine/workshop-the-politics-finances-of-open-science-reform\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>20. Mai, Workshop Research Data Publication</h2>\n<p><em>Many funding organisations and institutional research data management policies require that you make your data FAIR and as open as possible. This online seminar is aimed at researchers who want to know where and how to publish their research output.</em></p>\n<ul>\n<li><strong>Termin: </strong>20.05.2026, 10:00 bis 12:00 Uhr</li>\n<li><strong>Organisiert von</strong>: Freie Universit\u00e4t Berlin</li>\n<li>[<a href=\"https://www.fu-berlin.de/sites/forschungsdatenmanagement/veranstaltungen/2026/2026-05-20-Workshop-RD-Publication-en-DM.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>28. Mai, Berlin Open Data Day, Festsaal des Roten Rathauses (Berlin)</h2>\n<p><em>Wie werden Daten zum Schl\u00fcssel einer modernen und leistungsf\u00e4higen Verwaltung? Welche strategischen Weichen stellen Bund, L\u00e4nder und Kommunen f\u00fcr eine erfolgreiche digitale Transformation?\u00a0Nutzen Sie wertvolle Einblicke, frische Impulse und ein starkes Open-Data-Netzwerk beim etablierten Berlin Open Data Day \u2013 diesmal mit Perspektiven aus Bund, L\u00e4ndern und Kommunen.</em></p>\n<ul>\n<li><strong>Termin: </strong>28.05.2026, 09:00 bis 16.00 Uhr, Rathausstr. 15, 10178 Berlin</li>\n<li><strong>Organisiert von</strong>: Open Data Verantwortliche der Stadt Berlin, Senat Berlin</li>\n<li>[<a href=\"https://sweapevent.com/b?p=berlinopendataday2026\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>29. Mai, Open Access ohne Lizenzstress: Grundlagen, Fallstricke und L\u00f6sungen, online</h2>\n<p>Was bedeutet es, im Open Access zu ver\u00f6ffentlichen? Wie finde ich ein geeignetes Open-Access-Journal f\u00fcr meinen Artikel? Welche offene Lizenz sollte ich verwenden? Diese und \u00e4hnliche Fragen werden in der von der Bibliothek organisierten Reihe &#8222;Open Access verstehen&#8220; beantwortet. Die Beitr\u00e4ge werden in Kooperation mit der Hochschulbibliothek der ASH und der BHT Berlin organisiert.\u00a0Die Vortr\u00e4ge finden im Online-Format statt und sind f\u00fcr alle offen. Eine Anmeldung ist nicht erforderlich.</p>\n<p>Termin: 08.05.2026, 11:00 bis 11:45 Uhr, online<br />\nOrganisiert von: HTW, ASH und BHT Berlin<br />\n[<a href=\"https://events.htw-berlin.de/forschung/open-access-verstehen/\">Information und Anmeldung</a>]</p>\n<div class=\"entry-content\">\n<p>weiter zu Juni 2026 [folgt in K\u00fcrze]</p>\n</div>\n","doi":"https://doi.org/10.59350/e192q-6y682","funding_references":null,"guid":"https://blogs.fu-berlin.de/open-research-berlin/?p=4025","id":"940ac582-9b66-471f-8e73-73262c5ddb75","image":null,"indexed":true,"indexed_at":1775301362,"language":"de","parent_doi":null,"published_at":1775299535,"reference":[],"registered_at":0,"relationships":[],"rid":"rqrz7-65n69","status":"active","summary":"Unsere monatliche Rubrik zu aktuellen Veranstaltungen rund um Open Research. Anmerkung zu dieser Rubrik: Das Open Research Office Berlin erstellt monatlich eine \u00dcbersicht \u00fcber Termine und Veranstaltungen zu Open Access und Open Research in Berlin bzw. an Berliner Einrichtungen. Der Fokus liegt dabei auf unseren Partnereinrichtungen und auf Veranstaltungen, die sich an die \u00d6ffentlichkeit richten bzw.","tags":["Allgemein","Veranstaltungshinweise"],"title":"Veranstaltungshinweise Mai 2026","updated_at":1775300381,"url":"https://blogs.fu-berlin.de/open-research-berlin/2026/04/04/veranstaltungshinweise-mai-2026/","version":"v1"},{"abstract":"Back in 2010, I wrote about early artistic depictions of Brachiosaurus (including Giraffatitan). There, I wrote of the iconic mount MB.R.2181 (then HMN S II): When the mount was completed, shortly before the start of World War II, it was unveiled against a backdrop of Nazi banners.","archive_url":null,"authors":[{"affiliation":[{"id":"https://ror.org/0524sp257","name":"University of Bristol"}],"contributor_roles":[],"family":"Taylor","given":"Mike","url":"https://orcid.org/0000-0002-1003-5675"}],"blog":{"archive_collection":22153,"archive_host":null,"archive_prefix":"https://wayback.archive-it.org/22153/20231105213934/","archive_timestamps":null,"authors":[{"name":"Mike Taylor"}],"canonical_url":null,"category":"earthAndRelatedEnvironmentalSciences","community_id":"0e13541f-417e-46c0-a859-65927249df72","created_at":1675209600,"current_feed_url":null,"description":"SV-POW!  ...  All sauropod vertebrae, except when we're talking about Open Access. ISSN 3033-3695","doi_as_guid":false,"favicon":null,"feed_format":"application/atom+xml","feed_url":"https://svpow.com/feed/atom/","filter":null,"funding":null,"generator":"WordPress.com","generator_raw":"WordPress.com","home_page_url":"https://svpow.com","id":"c6cbbd2e-4675-4680-8a3f-784388009821","indexed":false,"issn":"3033-3695","language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":1729882329,"relative_url":null,"ror":null,"secure":true,"slug":"svpow","status":"active","subfield":"1911","subfield_validated":true,"title":"Sauropod Vertebra Picture of the Week","updated_at":1775375571.615463,"use_api":true,"use_mastodon":false,"user_id":"04d03585-c8bb-40f2-9619-5076a5e0aed2"},"blog_name":"Sauropod Vertebra Picture of the Week","blog_slug":"svpow","content_html":"<p>Back in 2010, I wrote about <a href=\"https://svpow.com/2010/04/08/early-brachiosaurus-art/\">early artistic depictions of <em>Brachiosaurus</em> (including <em>Giraffatitan</em>)</a>. There, I wrote of the iconic mount MB.R.2181 (then HMN S II):</p>\n<blockquote><p>When the mount was completed, shortly before the start of World War II, it was unveiled against a backdrop of Nazi banners. I have not been able to find a photograph of this (and if anyone has one, please do let me know), but I do have this drawing of the event, taken from an Italian magazine and dated 23rd December 1937.</p></blockquote>\n<p>(See that post for the drawing.)</p>\n<p>Recently the historian Ilja Nieuwland (one of the authors <a href=\"https://svpow.com/papers-by-sv-powsketeers/taylor-et-al-2025-on-the-composition-on-the-carnegie-diplodocus/\">on our recent paper on the Carnegie <em>Diplodocus</em></a>, Taylor et al. 2025) sent me two photos of this unveiling, again with swastikas prominent in the background:</p>\n<div data-shortcode=\"caption\" id=\"attachment_25273\" style=\"width: 490px\" class=\"wp-caption alignnone\"><a href=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg\"><img aria-describedby=\"caption-attachment-25273\" data-attachment-id=\"25273\" data-permalink=\"http://svpow.com/2026/04/03/the-nazi-sauropod-giraffatitan-brachiosaurus-brancai-in-1937/haagsche-courant-1937-brachio/\" data-orig-file=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg\" data-orig-size=\"1398,2217\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;,&quot;alt&quot;:&quot;&quot;}\" data-image-title=\"Haagsche Courant 1937 &amp;#8211; Brachio\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg?w=646\" loading=\"lazy\" class=\"size-full wp-image-25273\" src=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg\" alt=\"\" width=\"480\" height=\"761\" srcset=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg?w=480&amp;h=761 480w, https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg?w=960&amp;h=1522 960w, https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg?w=95&amp;h=150 95w, https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg?w=189&amp;h=300 189w, https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg?w=768&amp;h=1218 768w, https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg?w=646&amp;h=1024 646w\" sizes=\"(max-width: 480px) 100vw, 480px\" /></a><p id=\"caption-attachment-25273\" class=\"wp-caption-text\"><strong>EEN MOOIE AANSWINST</strong> \u2014 voor het museum van natuurlijke historie te Berlijn: het skelet van een Brachiosaurus, het grooste voorwereld-lijke landdier ooit gevonden. Het skelet is 11.87 meter hoog.</p></div>\n<p>Surprisingly, perhaps, this is in a Dutch newspaper, <em>Haagsche Courant</em> of 14 December 1937. The caption, which is in Dutch, reads: &#8220;A GREAT ADDITION \u2014 to the Museum of Natural History in Berlin: the skeleton of a Brachiosaurus, the largest prehistoric land animal ever found. The skeleton is 11.87 meters tall.&#8221; Ilja helpfully supplied <a href=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.pdf\">a PDF containing the front page of the newspaper and the page that contained this image</a>.</p>\n<p>The second is similar, but from a different angle that highlights the human skeleton that was placed down by the forefeet for scale:</p>\n<div data-shortcode=\"caption\" id=\"attachment_25277\" style=\"width: 490px\" class=\"wp-caption alignnone\"><a href=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg\"><img aria-describedby=\"caption-attachment-25277\" data-attachment-id=\"25277\" data-permalink=\"http://svpow.com/2026/04/03/the-nazi-sauropod-giraffatitan-brachiosaurus-brancai-in-1937/maasbode-27-nov-1937-p2/\" data-orig-file=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg\" data-orig-size=\"678,1280\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;,&quot;alt&quot;:&quot;&quot;}\" data-image-title=\"Maasbode 27 nov 1937-p2\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;EEN PRAEHISTORISCH MONSTER werd ongeveer zeven jaar geleden door een Duitsch geleerde in Oost-Africa ontdekt. Na moeizamen arbeid is men er in geslaagd het skelet van den brachiosaurus op te bouwen, dat in &amp;#8216;n museum te Berlijn is opgesteld&lt;/p&gt;\n\" data-large-file=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg?w=542\" loading=\"lazy\" class=\"size-full wp-image-25277\" src=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg\" alt=\"\" width=\"480\" height=\"906\" srcset=\"https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg?w=480&amp;h=906 480w, https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg?w=79&amp;h=150 79w, https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg?w=159&amp;h=300 159w, https://svpow.wordpress.com/wp-content/uploads/2026/04/maasbode-27-nov-1937-p2.jpeg 678w\" sizes=\"(max-width: 480px) 100vw, 480px\" /></a><p id=\"caption-attachment-25277\" class=\"wp-caption-text\">EEN PRAEHISTORISCH MONSTER werd ongeveer zeven jaar geleden door een Duitsch geleerde in Oost-Africa ontdekt. Na moeizamen arbeid is men er in geslaagd het skelet van den brachiosaurus op te bouwen, dat in &#8216;n museum te Berlijn is opgesteld</p></div>\n<p>Again, this is in Dutch, and the filename suggests that the source is a newspaper called <em>Maasbode</em> for 27 November 1937. The caption reads: &#8220;A PREHISTORIC MONSTER was discovered about seven years ago by a German scientist in East Africa. After arduous work, they succeeded in reconstructing the skeleton of the brachiosaurus, which is on display in a museum in Berlin.&#8221;</p>\n<p>I don&#8217;t know about you, but I feel it as a gut-punch when I see this animal, <a href=\"https://svpow.com/2024/11/17/behold-the-glory-of-the-lego-giraffatitan/\">which I deeply love</a>, against a backdrop of Nazi symbols. Gerhard Maier&#8217;s usually very detailed book <em>African Dinosaurs Unearthed</em> (Maier 2003) is uncharacteristically terse about this, saying of the unveiling only this (on page 267):</p>\n<blockquote><p>With swastika banners hanging from the walls as a backdrop, the exciting new exhibit opened in August 1937. A curious public, especially schoolchildren, formed long lines, waiting to see Berlin&#8217;s latest attraction.</p></blockquote>\n<p>I don&#8217;t know to what extent the rising Nazi regime used the brachiosaur mount as a PR event, an advertisement for their national superiority or what have you. (Has anyone written about this?)</p>\n<p>I was thinking about this because I get a daily notification of Wikipedia&#8217;s most-viewed article of the previous 24 hours. In recent times, it&#8217;s mostly been some article about bad news, or a person causing bad news. But a couple of days ago, it was <a href=\"https://en.wikipedia.org/wiki/Artemis_II\">Artemis II</a>, and I remarked on Mastodon how nice it was, just for one day, to have good news as the most read article. And someone quickly replied &#8220;I love space exploration, but having the Trump administration take credit for something like this is the last thing we need.&#8221;</p>\n<p>But here&#8217;s the thing. The Berlin brachiosaur mount has long outlived the Nazis (or at least the OG Nazis). And whatever the current moon mission achieves will long outlive the Trump administration.</p>\n<p>We don&#8217;t really write about politics on this blog. I like that about it, and I&#8217;m guessing most readers do as well. I&#8217;m not going to change that \u2014 the Web is\u00a0<em>full</em> of places to go and read about politics. But I do like the sense that scientific achievements are outside of the particular people who happen to be in power when they happen. The Berlin brachiosaur, and the Artemis II moon mission, are achievements for all humankind.</p>\n<h1>References</h1>\n<ul>\n<li>Maier, Gerhard. 2003. <em>African Dinosaurs Unearthed: The Tendaguru Expeditions</em>. Indiana University Press, Bloomington and Indianapolis, 380 p.</li>\n<li><a href=\"https://www.miketaylor.org.uk/dino/pubs/taylor-et-al-2025/TaylorEtAl2025--history-and-composition-of-the-Carnegie-Diplodocus.pdf\">Taylor, Michael P., Amy C. Henrici, Linsly J. Church, Ilja Nieuwland and Matthew C. Lamanna. 2025. <em>The history and composition of the Carnegie </em>Diplodocus. <em>Annals of the Carnegie Museum</em> <strong>91(1)</strong>:55\u201391. doi:10.2992/007.091.0104</a></li>\n</ul>\n<p>&nbsp;</p>\n<hr />\n<p><a href=\"https://doi.org/10.59350/9d5gk-fm764\">doi:10.59350/9d5gk-fm764</a></p>\n","doi":"https://doi.org/10.59350/9d5gk-fm764","funding_references":null,"guid":"https://svpow.com/?p=25267","id":"108db357-8eeb-461e-91b1-1bc0f0e1131f","image":"https://svpow.wordpress.com/wp-content/uploads/2026/04/haagsche-courant-1937-brachio.jpeg","indexed":true,"indexed_at":1775230822,"language":"en","parent_doi":null,"published_at":1775225594,"reference":[{"unstructured":"Maier, Gerhard. 2003. African Dinosaurs Unearthed: The Tendaguru Expeditions. Indiana University Press, Bloomington and Indianapolis, 380 p."},{"id":"https://www.miketaylor.org.uk/dino/pubs/taylor-et-al-2025/TaylorEtAl2025--history-and-composition-of-the-Carnegie-Diplodocus.pdf","unstructured":"Taylor, Michael P., Amy C. Henrici, Linsly J. Church, Ilja Nieuwland and Matthew C. Lamanna. 2025. The history and composition of the Carnegie Diplodocus. Annals of the Carnegie Museum 91(1):55\u201391. https://doi.org/10.2992/007.091.0104"}],"registered_at":0,"relationships":[],"rid":"ya3r2-3sb74","status":"active","summary":"Back in 2010, I wrote about early artistic depictions of\n<em>\n Brachiosaurus\n</em>\n(including\n<em>\n Giraffatitan\n</em>\n). There, I wrote of the iconic mount MB.R.2181 (then HMN S II):  (See that post for the drawing.)  Recently the historian Ilja Nieuwland (one of the authors on our recent paper on the Carnegie\n<em>\n Diplodocus\n</em>\n, Taylor et al. 2025) sent me two photos of this unveiling, again with swastikas prominent in the background:\n<strong>\n EEN\n</strong>","tags":["Brachiosaurids","Giraffatitan","History"],"title":"The Nazi sauropod \u2014 <i>Giraffatitan</i> (= \u201c<i>Brachiosaurus</i>\u201c) <i>brancai</i> in 1937","updated_at":1775227439,"url":"https://svpow.com/2026/04/03/the-nazi-sauropod-giraffatitan-brachiosaurus-brancai-in-1937/","version":"v1"},{"abstract":"Unsere monatliche Rubrik zu aktuellen Veranstaltungen rund um Open Research.","archive_url":null,"authors":[{"contributor_roles":[],"family":"Fischer","given":"Georg","url":"https://orcid.org/0000-0001-5620-5759"}],"blog":{"archive_collection":22141,"archive_host":null,"archive_prefix":"https://wayback.archive-it.org/22141/20231105110201/","archive_timestamps":[20231105110201,20240505180741,20241105110207,20250505110216],"authors":null,"canonical_url":null,"category":"otherSocialSciences","community_id":"52aefd81-f405-4349-b080-754395a5d8b2","created_at":1694476800,"current_feed_url":null,"description":null,"doi_as_guid":false,"favicon":"https://rogue-scholar.org/api/communities/52aefd81-f405-4349-b080-754395a5d8b2/logo","feed_format":"application/atom+xml","feed_url":"https://blogs.fu-berlin.de/open-research-berlin/feed/atom/","filter":null,"funding":null,"generator":"WordPress","generator_raw":"WordPress 6.0","home_page_url":"https://blogs.fu-berlin.de/open-research-berlin/","id":"575d6b2d-c555-4fc7-99fb-055a400f9163","indexed":false,"issn":null,"language":"de","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":"https://berlin.social/@openaccess","prefix":"10.59350","registered_at":1729602098,"relative_url":null,"ror":null,"secure":true,"slug":"oaberlin","status":"active","subfield":"1802","subfield_validated":null,"title":"Open Research Office Berlin","updated_at":1775375524.800675,"use_api":true,"use_mastodon":true,"user_id":"383c62ed-0cf6-4dc7-a56c-5b0104f7f10a"},"blog_name":"Open Research Office Berlin","blog_slug":"oaberlin","content_html":"<p>Unsere monatliche Rubrik zu aktuellen Veranstaltungen rund um Open Research.</p>\n<p><!--more--></p>\n<pre>Anmerkung zu dieser Rubrik: Das Open Research Office Berlin erstellt monatlich eine \u00dcbersicht \u00fcber Termine und Veranstaltungen zu Open Access und Open Research in Berlin bzw. an Berliner Einrichtungen. Der Fokus liegt dabei auf unseren Partnereinrichtungen und auf Veranstaltungen, die sich an die \u00d6ffentlichkeit richten bzw. die offen sind f\u00fcr Angeh\u00f6rige der Wissenschafts- und Kulturerbeeinrichtungen in Berlin. Wir erg\u00e4nzen diese Liste gerne (Info bitte via <a href=\"mailto:team@open-research-berlin.de\">Mail</a> ans OROB).</pre>\n<h2>31. M\u00e4rz, Webarchivierung f\u00fcr viele: Expertise und Infrastruktur gemeinschaftlich aufbauen, Berlin</h2>\n<p><em>Jeden Tag geht ein Teil unseres digitalen Kulturerbes unwiederbringlich verloren \u2013 Netzliteratur, Websites, Social-Media-Beitr\u00e4ge und viele weitere Online-Inhalte verschwinden, ohne dass wir es bemerken. Dabei gibt es l\u00e4ngst Wege, dieses Erbe zu bewahren: Gemeinsam mit den Expert:innen Claus-Michael Schlesinger und Mona Ulrich hat die Zentral- und Landesbibliothek Berlin (ZLB) in den letzten zwei Jahren Workshops zu den Tools von Webrecorder veranstaltet, mit denen man Webseiten archivieren kann. Um diese Tools f\u00fcr umf\u00e4ngliche Archivierungsvorhaben zu nutzen, braucht es Ressourcen \u2013 zum Beispiel IT-Ressourcen, die nur sehr wenigen Institutionen zur Verf\u00fcgung stehen. Workshop-Teilnehmer:innen aus kleineren Institutionen und Projekten fragten sich daher immer wieder, wie sie sie langfristig nutzen k\u00f6nnen.</em></p>\n<ul>\n<li><strong>Termin: </strong>31.03.2026, 16:00 bis 18:00 Uhr, Technologiestiftung Berlin, 4. Etage, Grunewaldstr. 61-62, 10825 Berlin</li>\n<li><strong>Organisiert von</strong>: kulturBdigital</li>\n<li>[<a href=\"https://www.kultur-b-digital.de/webarchivierung-fuer-viele-expertise-und-infrastruktur-gemeinschaftlich-aufbauen/\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>13. April, Machine-Learning-Montag I: What the Hype? Eine Einf\u00fchrung in die Grundlagen des maschinellen Lernens f\u00fcr Kulturerbeinstitutionen, online</h2>\n<p><em>Maschinelles Lernen (ML) oder auch \u201eK\u00fcnstliche Intelligenz\u201c (KI) ist weiterhin das gro\u00dfe Thema in fast allen Bereichen des menschlichen Arbeitens. Aber was offerieren diese Werkzeuge abseits des gro\u00dfen Hypes von \u201eschneller, gr\u00f6\u00dfer, besser, einfacher und sch\u00f6ner\u201c und dem damit prognostizierten Durchdringen aller Lebensbereiche?\u00a0Diese digiS-Einf\u00fchrung hat zum Ziel, Nicht-Expert:innen im maschinellen Lernen das n\u00f6tige Hintergrundwissen zu vermitteln, um sich in diesem Diskurs zurechtzufinden und Hype von sinnvoller Anwendung unterscheiden zu k\u00f6nnen.</em></p>\n<ul>\n<li><strong>Termin: </strong>13.04.2026, 10:00 bis 12:30 Uhr</li>\n<li><strong>Organisiert von</strong>: digiS; Referent*innen: Xenia Kitaeva und Marco Klindt (digiS)</li>\n<li>[<a href=\"https://www.digis-berlin.de/machine-learning-montag-am-13-april-what-the-hype/\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>14. April, FDM@BUA: Offboarding Template als Grundlage f\u00fcr Daten- und Wissens\u00fcbergabe in Projekten, online</h2>\n<p><em>Dr. Stefanie Seltmann, Research Data Steward am Berlin Institute of Health, stellt vor, wie sich der Transfer von Forschungsdaten und projektbezogenem Wissen beim Ausscheiden von Projektmitgliedern systematisch gestalten l\u00e4sst.\u00a0Im Mittelpunkt steht ein entwickeltes Offboarding-Template, das als strukturierte Grundlage f\u00fcr Daten- und Wissens\u00fcbergabe dient. Ziel ist es, die Kontinuit\u00e4t in Forschungsprojekten zu sichern, die Qualit\u00e4t der Dokumentation zu verbessern und das Risiko von Datenverlusten zu reduzieren. Das Template ist so konzipiert, dass es flexibel an unterschiedliche Forschungskontexte angepasst und in bestehende institutionelle FDM-Prozesse integriert werden kann.</em></p>\n<ul>\n<li><strong>Termin: </strong>14.04.2026, 10:00 bis 11:30 Uhr, online via Webex</li>\n<li><strong>Organisiert von</strong>: Berlin University Alliance</li>\n<li>[<a href=\"https://www.berlin-university-alliance.de/commitments/sharing-resources/shared-resources-center/CARDS-FDM/cards_events/2026-04-14_offboarding.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>15. April, Datenmanagementpl\u00e4ne und der RDMO-Service von NFDI4Culture, online</h2>\n<p><em>Sie sind digital k\u00fcnstlerisch oder gestalterisch t\u00e4tig und wollen die bei Ihrer Arbeit anfallenden Daten so managen, dass andere damit arbeiten k\u00f6nnen? Sie sind eine Hochschuleinrichtung, die Daten aus studentischen Arbeiten oder wissenschaftlichen Projekten im Bereich der K\u00fcnste entgegennimmt?\u00a0Der Research Data Management Organiser (RDMO) ist ein flexibles und kostenfreies Werkzeug, das Sie beim Management Ihrer Daten und bei der Planung von digitalen Projekten aller Art unterst\u00fctzen kann.</em></p>\n<ul>\n<li><strong>Termin: </strong>15.04.2026, 15:00 bis 17:00 Uhr, online via Webex</li>\n<li><strong>Organisiert von</strong>: Fokusgruppe OA-K\u00fcnste, open-access.network</li>\n<li>[<a href=\"https://open-access.network/vernetzen/digitale-fokusgruppen/fokusgruppe-oa-kuenste#c28672\">Information</a>]</li>\n</ul>\n<h2>16.-30. April, Open Science Hardware Workshops, TU Berlin</h2>\n<p><em>Open Science Hardware (OSH) enables researchers to design, prototype, document, and share custom research tools in a transparent and reproducible way. It is often facilitated by the use of digital manufacturing, which combines computer aided design and computer aided manufacturing software with machines like 3d printers, laser cutter and CNC milling machines.\u00a0In April, several introductory workshops will invite life science researchers and technical staff including the Neurosciene community to explore how digital fabrication and structured documentation can strengthen research practice \u2014 from cost-efficient prototyping, publishable hardware to the strengthening of research communities. No prior experience required.</em></p>\n<ul>\n<li><strong>Termin: </strong>16. bis 30.04.2026, Universit\u00e4tsbibliothek der TU Berlin bzw. Campus der Humboldt-Universit\u00e4t zu Berlin</li>\n<li><strong>Organisiert von</strong>: Berlin University Alliance</li>\n<li>[<a href=\"https://events.tu-berlin.de/de/events/019d2fd3-e17f-73fa-be53-5f672d77b504?scopeFilter%5Bpublicly_visible%5D=true&amp;scopeFilter%5Bhidden_in_lists%5D=false&amp;scopeFilter%5Bended%5D=false&amp;page%5Bnumber%5D=1&amp;page%5Bsize%5D=50&amp;page%5Btotal%5D=9&amp;sort%5B0%5D=-pinned&amp;sort%5B1%5D=start_at&amp;sort%5B2%5D=title\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>20. April, Workshop Open Access in und f\u00fcr Museen, Europa-Universit\u00e4t Frankfurt/Oder</h2>\n<p><em>Anhand von mehreren Anwendungsf\u00e4llen wollen wir kooperative Ans\u00e4tze f\u00fcr Open Access und Open Culture an der Schnittstelle von Kultureinrichtungen, Hochschulen und Open-Access-Publikationsunterst\u00fctzungsinfrastrukturen explorieren und die Entwicklung eines konzeptionellen Rahmens f\u00fcr m\u00f6gliche L\u00f6sungen vorbereiten.\u00a0Die Veranstaltung richtet sich an in diesen Bereichen t\u00e4tigen Professionals.</em></p>\n<ul>\n<li><strong>Termin: </strong>20.04.2026, Europa-Universit\u00e4t Frankfurt/Oder</li>\n<li><strong>Organisiert von</strong>: Europa-Universit\u00e4t Viadrina, Stiftung Kleist-Museum Frankfurt (Oder) und Vernetzungs- und Kompetenzstelle Open Access Brandenburg (VuK)</li>\n<li>[<a href=\"https://open-access-brandenburg.de/workshop-open-access-in-und-fuer-museen-euv_2026/\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>20. April, Wikidata f\u00fcr die Sammlungserschlie\u00dfung, online</h2>\n<p><em><a href=\"https://www.wikidata.org/wiki/Wikidata:Main_Page\">Wikidata</a> ist ein gro\u00dfer, generischer, offener, frei editierbarer Wissensgraph, der Informationen buchst\u00e4blich \u00fcber Gott (<a href=\"http://www.wikidata.org/entity/Q190\">Q190</a>) und die Welt (<a href=\"http://www.wikidata.org/entity/Q2\">Q2</a>) vorh\u00e4lt \u2013 sowie \u00fcber mehr als 120 Millionen andere Entit\u00e4ten (<a href=\"https://www.wikidata.org/wiki/Wikidata:Statistics\">https://www.wikidata.org/wiki/Wikidata:Statistics</a>). F\u00fcr GLAM-Einrichtungen ist das Potential von Wikidata erheblich: In Wikidata lassen sich Informationen zu Objekten, Personen, Orten, Bauwerken und vielem mehr pflegen, und es k\u00f6nnen bei Bedarf neue Datens\u00e4tze erstellt werden. Wikidata ist somit als flexibler ad-hoc-Normdatengenerator eine optimale Erg\u00e4nzung zur Gemeinsamen Normdatei (GND). [&#8230;]\u00a0\u00dcber all diese Dinge werden wir im digiS-Workshop \u201eWikidata f\u00fcr die Sammlungserschlie\u00dfung\u201c sprechen, um auf diese Weise das Potenzial von Wikidata f\u00fcr GLAM-Institutionen und speziell f\u00fcr die Sammlungsdokumentation genauer in den Blick zu nehmen. Selbstverst\u00e4ndlich wird es Raum f\u00fcr Fragen und Diskussionen geben, eine konkrete Einf\u00fchrung in die praktische Arbeit mit Wikidata und den angesprochenen Tools ist f\u00fcr diese Veranstaltung jedoch nicht vorgesehen.</em></p>\n<ul>\n<li><strong>Termin: </strong>20.04.2026, 10:00 bis 11:30 Uhr, online</li>\n<li><strong>Organisiert von</strong>: digiS; Referent: Alexander Winkler (digiS)</li>\n<li>[<a href=\"https://www.digis-berlin.de/workshop-wikidata-fuer-die-sammlungserschliessung-am-20-04/\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>22.-23. April, Train-the-Trainer Forschungsdatenmanagement, FU Berlin</h2>\n<div class=\"editor-content box-event-doc-abstract\">\n<p><em>Kompetenzen im Umgang mit Forschungsdaten sind eine zentrale Grundvoraussetzung f\u00fcr moderne Wissenschaft: Ohne eine gute Dokumentation und Nachhaltung gibt es keine FAIR (Findable, Accessible, Interoperable, Re-usable) Daten. Um diese Kompetenzen an Forschende in vielen F\u00e4chern und Institutionen der Berlin University Alliance zu vermitteln, braucht es ausgebildete Trainer*innen. Das Projekt\u00a0<a href=\"https://www.berlin-university-alliance.de/commitments/sharing-resources/shared-resources-center/CARDS-FDM/index.html\">Collaboratively Advancing Research Data Support</a><a href=\"https://www.berlin-university-alliance.de/commitments/sharing-resources/shared-resources-center/CARDS-FDM/index.html\">(CARDS)</a>bietet daher im April 2026 einen\u00a0<a href=\"https://rti-studio.com/train-the-trainer-workshop-zum-thema-forschungsdatenmanagement/\">Train-the-Trainer Workshop</a>\u00a0zu Forschungsdatenmanagement mit\u00a0<a href=\"https://rti-studio.com/ueber-mich/\">Dr. Katarzyna Biernacka</a>\u00a0an.\u00a0Nach dem zweit\u00e4gigen Workshop werden die Teilnehmenden \u00fcber die notwendigen F\u00e4higkeiten verf\u00fcgen, um eigene Trainings und Beratungen zum Forschungsdatenmanagement in ihrer Einrichtung durchzuf\u00fchren.</em></p>\n</div>\n<ul>\n<li><strong>Termin: </strong>22-23.04.2026, Rostlaube an der Freien Universit\u00e4t Berlin</li>\n<li><strong>Organisiert von</strong>: Berlin University Alliance; Referentin: Katarzyna Biernacka</li>\n<li>[<a href=\"https://www.fu-berlin.de/sites/forschungsdatenmanagement/veranstaltungen/2026/2026-04-22-23-FDMatBUA-Workshop-T-t-T-en-KB.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>23. April, Magnifying Open Science: Insights from the BUA Participatory Research Map, online</h2>\n<p><em>Open Engagement with societal stakeholders is one of the four pillars of the UNESCO Recommendation on Open Science. The Berlin University Alliance Participatory Research Map maps over 90 projects in which researchers collaborate with societal stakeholders. With the Participatory Research Map, we not only want to increase the visibility of participatory research but also explore how different stakeholders and research modes contribute to open science and open knowledge generation.\u00a0In this event, we will present the results of our analysis and discuss with participants how we can collaboratively contribute to magnifying openness in engaging with societal stakeholders.</em></p>\n<ul>\n<li><strong>Termin: </strong>23.04.2026, online</li>\n<li><strong>Organisiert von</strong>: BUA funded project &#8222;Magnifying Open Science&#8220; (Open Research Office Berlin)</li>\n<li>[<a href=\"https://blogs.fu-berlin.de/open-research-berlin/2025/12/18/save-the-date-for-online-event-series-magnifying-open-science/\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>27. April, Machine Learning Montag II: KI und Recht f\u00fcr Kulturerbe-Einrichtungen &#8211; Vortrag und Q&amp;A, online</h2>\n<p><em> F\u00fcr viele Kulturerbe-Einrichtungen stellt sich die Frage, wie der Einsatz von KI in unterschiedlichen Konstellationen rechtlich zu bewerten ist. Da bei der rechtlichen Bewertung noch viele Unsicherheiten bestehen, soll dieser Workshop den aktuellen Stand der Rechtsprechung sowie auch der Gesetzgebung in Hinblick auf KI erl\u00e4utern. Darauf aufbauend wird die Rechtslage bei verschiedenen Anwendungsbereichen in Kulturerbe-Einrichtungen untersucht.</em></p>\n<ul>\n<li><strong>Termin: </strong>27.04.2026, 10:00 bis 12:30 Uhr, online via Zoom</li>\n<li><strong>Organisiert von</strong>: digiS; Referent: Paul Klimpel (iRights.Law)</li>\n<li>[<a href=\"https://www.digis-berlin.de/machine-learning-montag-ii-am-27-april-ki-und-recht-fuer-kulturerbe-einrichtungen-vortrag-und-qa/\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>28. April, Was bringt Open Access meiner Forschung wirklich? &#8211; Ein Realit\u00e4tscheck, online</h2>\n<p><em>Was bedeutet es, im Open Access zu ver\u00f6ffentlichen? Wie finde ich ein geeignetes Open-Access-Journal f\u00fcr meinen Artikel? Welche offene Lizenz sollte ich verwenden? Diese und \u00e4hnliche Fragen werden in der von der Bibliothek organisierten Reihe &#8222;Open Access verstehen&#8220; beantwortet. Die Beitr\u00e4ge werden in Kooperation mit der Hochschulbibliothek der ASH und der BHT Berlin organisiert.\u00a0Die Vortr\u00e4ge finden im Online-Format statt und sind f\u00fcr alle offen. Eine Anmeldung ist nicht erforderlich.</em></p>\n<ul>\n<li><strong>Termin: </strong>28.04.2026, 11:00 bis 11:45 Uhr, online</li>\n<li><strong>Organisiert von</strong>: HTW, ASH und BHT Berlin</li>\n<li>[<a href=\"https://events.htw-berlin.de/forschung/open-access-verstehen/\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>29. April, Workshop Research Data Management in a nutshell, online</h2>\n<p><em>Almost every research project generates or collects digital research data. Researchers face the challenge of not only managing and documenting the data, but also preserving it and making it available for reuse. This online seminar offers a general introduction to essential aspects of research data management.</em></p>\n<ul>\n<li><strong>Termin: </strong>29.04.2026, 09:30 bis 12:00 Uhr, online</li>\n<li><strong>Organisiert von</strong>: Freie Universit\u00e4t Berlin</li>\n<li>[<a href=\"https://www.fu-berlin.de/sites/forschungsdatenmanagement/veranstaltungen/2026/2026-04-29-Workshop-RDM-in-a-nutshell-en-DM.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>30. April, #UPDATE BIB: Open Access zu wissenschaftlichen Publikationen &#8211; Aktuelle Herausforderungen f\u00fcr Bibliotheken, online</h2>\n<p><em>Das Seminar bietet eine \u00fcbersichtliche Einf\u00fchrung in den Stand von Open Access an Bibliotheken und stellt die wichtigsten aktuellen Rahmenbedingungen und Entwicklungen vor. Die Teilnehmer*innen lernen die Grundbegriffe von Open Access kennen und verstehen die technischen, rechtlichen und politischen Rahmenbedingungen freier Verf\u00fcgbarkeit von wissenschaftlichen Publikationen. Die Entwicklungen zu Open Access werden im mit Blick auf verschiedene bibliothekarische Handlungsfelder kontextualisiert, wie Erwerbung/Zugang, Informationskompetenz, Forschungsunterst\u00fctzung, technische Infrastrukturen.</em></p>\n<ul>\n<li><strong>Termin: </strong>30.04.2026, 10:00 bis 12:30 Uhr, online</li>\n<li><strong>Organisiert von</strong>: FU Berlin; Referentin: Christina Riesenweber (HU Berlin)</li>\n<li>[<a href=\"https://veranstaltung.weiterbildung.fu-berlin.de/Veranstaltung/cmx64801e98a27ed.html\">Information und Anmeldung</a>]</li>\n</ul>\n<h2>30. April, Open Access meets KI \u2013 L\u00f6sungsans\u00e4tze durch CC-Signals, online</h2>\n<p><em>Um <a href=\"https://creativecommons.org/2025/06/25/introducing-cc-signals-a-new-social-contract-for-the-age-of-ai/\">\u201eoffenes Wissen zu bewahren, [\u2026 und] verantwortungsbewusstes KI-Verhalten [zu] f\u00f6rdern, ohne dabei Innovationen einzuschr\u00e4nken\u201c</a>, hat Creative Commons vor kurzem ein neues Modell vorgestellt: CC Signals. Rechteinhaber*innen sollen so die M\u00f6glichkeit haben, zu signalisieren, unter welchen Voraussetzungen ihre Inhalte von KI-Systemen genutzt werden d\u00fcrfen.\u00a0In unserem n\u00e4chsten ENABLE!-Werkstatt-Gespr\u00e4ch wollen wir uns CC Signals n\u00e4her ansehen und mit unseren Referent*innen diskutieren, wie dieses Modell funktioniert und was wir davon erwarten k\u00f6nnen.</em></p>\n<ul>\n<li><strong>Termin: </strong>30.04.2026, 16:00 bis 17:00 Uhr, online</li>\n<li><strong>Organisiert von</strong>: ENABLE! Community</li>\n<li>[<a href=\"https://enable-oa.org/\">Information</a>]</li>\n</ul>\n<p>weiter zu <a href=\"https://blogs.fu-berlin.de/open-research-berlin/2026/04/04/veranstaltungshinweise-mai-2026/\">Mai 2026</a></p>\n","doi":"https://doi.org/10.59350/s4xat-69z93","funding_references":null,"guid":"https://blogs.fu-berlin.de/open-research-berlin/?p=4021","id":"6a3635b0-a652-448e-addb-627b5bf812d3","image":null,"indexed":true,"indexed_at":1775300235,"language":"de","parent_doi":null,"published_at":1775206767,"reference":[],"registered_at":0,"relationships":[],"rid":"vtt21-qgh66","status":"active","summary":"Unsere monatliche Rubrik zu aktuellen Veranstaltungen rund um Open Research. Anmerkung zu dieser Rubrik: Das Open Research Office Berlin erstellt monatlich eine \u00dcbersicht \u00fcber Termine und Veranstaltungen zu Open Access und Open Research in Berlin bzw. an Berliner Einrichtungen. Der Fokus liegt dabei auf unseren Partnereinrichtungen und auf Veranstaltungen, die sich an die \u00d6ffentlichkeit richten bzw.","tags":["Veranstaltungshinweise"],"title":"Veranstaltungshinweise April 2026","updated_at":1775300225,"url":"https://blogs.fu-berlin.de/open-research-berlin/2026/04/03/veranstaltungshinweise-april-2026/","version":"v1"},{"abstract":"I am writing this blog with a heavy heart.\u00a0 After 21 years and 2,000 blogs I have taken the decision to \u2018rest\u2019 the website after Easter.\u00a0 My reasons are varied.","archive_url":null,"authors":[{"contributor_roles":[],"family":"Akass","given":"Kim"}],"blog":{"archive_collection":null,"archive_host":null,"archive_prefix":null,"archive_timestamps":null,"authors":null,"canonical_url":null,"category":"mediaAndCommunications","community_id":"d0965544-4413-4b89-aedb-36ae2153c1ac","created_at":1730394736,"current_feed_url":null,"description":"Television Studies Blog","doi_as_guid":false,"favicon":"https://rogue-scholar.org/api/communities/d0965544-4413-4b89-aedb-36ae2153c1ac/logo","feed_format":"application/atom+xml","feed_url":"https://cstonline.net/feed/atom/","filter":null,"funding":null,"generator":"WordPress","generator_raw":"WordPress 6.7.1","home_page_url":"https://cstonline.net/","id":"3e29853c-05ee-479f-aa7d-867ff6dce1e9","indexed":true,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":0,"relative_url":null,"ror":null,"secure":true,"slug":"cstonline","status":"active","subfield":"3315","subfield_validated":null,"title":"CST Online","updated_at":1775375445.954459,"use_api":true,"use_mastodon":false,"user_id":"80307be4-0a5d-4378-a38f-91852e38c1d8"},"blog_name":"CST Online","blog_slug":"cstonline","content_html":"<p style=\"font-weight: 400;\">I am writing this blog with a heavy heart.\u00a0 After 21 years and 2,000 blogs I have taken the decision to \u2018rest\u2019 the website after Easter.\u00a0 My reasons are varied.\u00a0 Since we started this iteration of CSTonline, with my gripe about <a href=\"https://cstonline.net/sky-exclusivity-weve-been-here-before-by-kim-akass/\">Sky Exclusivity </a>and John Ellis\u2019s <a href=\"https://cstonline.net/letter-from-america-by-john-ellis-3/\">letter from America</a>, we have had a steady stream of blogs.\u00a0\u00a0 Some weeks we were inundated and other weeks not so, but we have always received something from someone.</p>\n<p style=\"font-weight: 400;\">The idea of the website was to provide a public, open access forum, for the dissemination of writing about TV, reports from funded projects and just general \u2018this is what I saw this week\u2019.\u00a0 We always said that TV demanded instant responses, we couldn\u2019t always wait for publishers to print our thoughts \u2013 the promise of the internet meant that we could receive a blog and have it out there for reading within a week.\u00a0 Heady days.</p>\n<p style=\"font-weight: 400;\">The problem is that, over the past few years, Higher Education has been undergoing some pretty seismic changes.\u00a0 Redundancies (voluntary or otherwise), lack of funding, heavier workloads for remaining staff and increased demands from students have meant that everyone has less and less time to devote to writing that doesn\u2019t bring some kind of institutional reward.\u00a0 It makes sense that, in this case, with families to attend, books to write and students to teach, coupled with the demands of REF (or the tenure track) and a general sense of overwhelm has resulted in no blogs.</p>\n<p style=\"font-weight: 400;\">Thanks to stalwart bloggers, and a team of committed volunteers, we have managed to keep the website alive but, it has become clear that something has to change.\u00a0 Podcasts are the new (old) blogs and, despite our attempts to keep everyone interested, it is time to admit that we can no longer proceed without regular content.</p>\n<p style=\"font-weight: 400;\">We <a href=\"https://cstonline.net/cst-online-relaunch-by-kim-akass/\">re-launched CSTonline</a> in its present state on 19 February 2011.\u00a0 Early days were exciting and busy.\u00a0 My re-launch blog announced that \u2018We are retaining David Lavery\u2019s column <em>Telegenic</em>, with his insightful and humorous look at all things televisual.\u00a0\u00a0<em>In Primetime</em>\u00a0stays and so do the regularly updated sections \u2013 Calls For Papers, upcoming conferences, workshops and study days (listed monthly), postgraduate funding the (very) occasional job vacancy and my favourite TV story of the week (or sometimes day) complete with moving pictures.\u2019</p>\n<p style=\"font-weight: 400;\">Even someone as prolific as David Lavery, however, found it difficult to keep up with blogging demands and called \u2018Telegenic\u2019 quits after his blog on <em><a href=\"https://cstonline.net/the-state-of-the-american-sitcom-v-modern-family-by-david-lavery/\">Modern Family</a></em>.\u00a0 He <a href=\"https://cstonline.net/?s=Lavery\">continued to blog for us</a> until he sadly died on 30 August 2016.\u00a0 <a href=\"https://cstonline.net/?s=Pixley\">Andrew Pixley</a> has been one of our more prolific bloggers as has <a href=\"https://cstonline.net/?s=Beattie\">Melissa Beattie</a>.\u00a0 I have <a href=\"https://cstonline.net/?s=Akass\">written a few over the years</a> as has the aforementioned <a href=\"https://cstonline.net/?s=Ellis\">John Ellis</a>.\u00a0 <a href=\"https://cstonline.net/?s=Weissmann\">Elke Weissmann</a> has been prolific as well as editing and managing ECREA\u2019s contributions (for which I am grateful). \u00a0We have featured blogs from all over the world about subjects relevant to TV from Public Service Broadcasting to commercial dramas, streaming, cable, networks, social media \u2026 the list goes on.</p>\n<p style=\"font-weight: 400;\">I am sure that the community has much more to say about the state of television.\u00a0 Streaming has up-ended the industry, as has the introduction of AI, the writer\u2019s strikes and the continued (and continual) attack on the BBC. There is always something to say but, unfortunately, not always the time to say it.</p>\n<p style=\"font-weight: 400;\">I continue to be passionate about TV, I love watching, reading about and writing about television.\u00a0 I am sure there are people out there that want to blog, and we will always publish if someone wants to submit something.\u00a0 However, I reluctantly admit that, if I can\u2019t find the time to write a blog, why should I expect others to?</p>\n<p style=\"font-weight: 400;\">I am so very grateful for the amazing support I have had over the years.\u00a0 Debra Ramsay, Lisa Kelly, Sarah Lahm and Ben Keightly have served faithfully (if I have forgotten someone I apologise).\u00a0 I have received institutional support from Royal Holloway and the University of Hertfordshire.\u00a0 The editorial board at <em>Critical Studies in Television</em> have been amazing.\u00a0 This website would never have got off the ground without mediacitizens who freely gave of designers and web hosting.\u00a0 My most grateful thanks go to Tobias Steiner who continues to work hard on the back end of the website.\u00a0 All of this time and hard work has been freely and generously given.</p>\n<p style=\"font-weight: 400;\">The website will remain online \u2013 there is a wealth of television history contained in its massive archive and I do hope you will continue to read and engage with it.</p>\n<p style=\"font-weight: 400;\">But, until the next iteration of the website, we are reluctantly calling time on this endeavour.</p>\n<div style=\"width: 480px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-15775-1\" width=\"480\" height=\"360\" preload=\"metadata\" controls=\"controls\"><source type=\"video/mp4\" src=\"https://cstonline.net/wp-content/uploads/2026/04/YTDown.com_YouTube_Bugs-Bunny-That-s-All-Folks_Media_HeERupuicHE_001_360p.mp4?_=1\" /><a href=\"https://cstonline.net/wp-content/uploads/2026/04/YTDown.com_YouTube_Bugs-Bunny-That-s-All-Folks_Media_HeERupuicHE_001_360p.mp4\">https://cstonline.net/wp-content/uploads/2026/04/YTDown.com_YouTube_Bugs-Bunny-That-s-All-Folks_Media_HeERupuicHE_001_360p.mp4</a></video></div>\n","doi":"https://doi.org/10.59350/149p8-3jh82","funding_references":null,"guid":"https://cstonline.net/?p=15775","id":"37b623ec-0fd6-45c1-b384-536b7142f175","image":"https://cstonline.net/wp-content/uploads/2026/04/Past-Future-image-2021-1024x421-1.jpg","indexed":true,"indexed_at":1775205403,"language":"en","parent_doi":null,"published_at":1775203941,"reference":[],"registered_at":0,"relationships":[],"rid":"c3h28-yep51","status":"active","summary":"I am writing this blog with a heavy heart.\u00a0 After 21 years and 2,000 blogs I have taken the decision to \u2018rest\u2019 the website after Easter.\u00a0 My reasons are varied.\u00a0 Since we started this iteration of CSTonline, with my gripe about Sky Exclusivity and John Ellis\u2019s letter from America, we have had a steady stream of blogs.","tags":["Blogs"],"title":"CSTonline by Kim Akass","updated_at":1775204127,"url":"https://cstonline.net/cstonline-by-kim-akass/","version":"v1"},{"abstract":"2 days with up to 100+ papers in 30+ panels, 4 keynote events, lunches and refreshment breaks for both days, optional self-funded conference meal, student rates (and lottery free spaces) and campus accommodation available \u2013 Talbot Campus \u2013 Bournemouth University DEADLINE FOR SUBMISSION 3 May 2026 The Centre for the Study of Conflict, Emotion and [\u2026]","archive_url":null,"authors":[{"contributor_roles":[],"family":"Akass","given":"Kim"}],"blog":{"archive_collection":null,"archive_host":null,"archive_prefix":null,"archive_timestamps":null,"authors":null,"canonical_url":null,"category":"mediaAndCommunications","community_id":"d0965544-4413-4b89-aedb-36ae2153c1ac","created_at":1730394736,"current_feed_url":null,"description":"Television Studies Blog","doi_as_guid":false,"favicon":"https://rogue-scholar.org/api/communities/d0965544-4413-4b89-aedb-36ae2153c1ac/logo","feed_format":"application/atom+xml","feed_url":"https://cstonline.net/feed/atom/","filter":null,"funding":null,"generator":"WordPress","generator_raw":"WordPress 6.7.1","home_page_url":"https://cstonline.net/","id":"3e29853c-05ee-479f-aa7d-867ff6dce1e9","indexed":true,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","mastodon":null,"prefix":"10.59350","registered_at":0,"relative_url":null,"ror":null,"secure":true,"slug":"cstonline","status":"active","subfield":"3315","subfield_validated":null,"title":"CST Online","updated_at":1775375445.954459,"use_api":true,"use_mastodon":false,"user_id":"80307be4-0a5d-4378-a38f-91852e38c1d8"},"blog_name":"CST Online","blog_slug":"cstonline","content_html":"<div><b>2 days with up to 100+ papers in 30+ panels, 4 keynote events, lunches and refreshment </b><strong>breaks for both days, optional self-funded conference meal, student rates (and lottery free spaces) and campus accommodation available \u2013 </strong><a href=\"https://www.bournemouth.ac.uk/why-bu/facilities-campuses/talbot-campus\"><strong>Talbot Campus \u2013 Bournemouth University</strong></a></div>\n<p style=\"font-weight: 400;\"><strong>DEADLINE FOR SUBMISSION 3 May 2026</strong></p>\n<p style=\"font-weight: 400;\"><a href=\"https://www.bournemouth.ac.uk/research/centres-institutes/centre-study-conflict-emotion-social-justice\">The Centre for the Study of Conflict, Emotion and Social Justice</a>, in the Faculty of Media, Science and Technology at Bournemouth University invites scholarly and practice-based proposals for an in-person conference on media and emotion.</p>\n<p style=\"font-weight: 400;\">As neuroscientist Raymond J. Dolan observes, \u201cemotion provides the principal currency in human relationships as well as the motivational force for what is best and worst in human behaviour\u201d (2002). Within contemporary media production and consumption, emotion often binds us together, at times appearing as a language of intimacy, vulnerability and reflexivity, and at times appearing as a language of division, entitlement and exclusion. Therefore, emotions expressed and evoked through media have attracted sustained scholarly attention across a wide range of disciplines, spanning the humanities, the social sciences, and the natural sciences.</p>\n<p style=\"font-weight: 400;\">Notably, in the era of populism, political leaders deploy emotionally charged narratives, in offering simple answers to complex problems, often with minority groups as the targets of division and abjection.\u00a0Also, techniques of production and representation deploy the language of emotion, in aesthetic and narrative-oriented contexts, and theoretical work is constantly evolving.</p>\n<p style=\"font-weight: 400;\">As Laura U. Marks discussed in her landmark text <em>The Skin of Film</em> (1999), contemporary media offers a creative space for issues of touch, memory and hegemonic challenge, invigorated through a media-based emotional landscape. At the same time Sara Ahmed has theorised in <em>The Cultural Politics of Emotion</em> (2014), that \u2018affective economies\u2019 and \u2018sticky associations\u2019 shape our phenomenological landscapes, defining boundaries for minority voices as much as offering spaces for resistance and reinvention.</p>\n<p style=\"font-weight: 400;\">We invite scholars from any related disciplines and industry practitioners to participate in this conference and share critical perspectives on media and emotion, drawing on their theoretical models, research trajectories or practice-based environments. Our keynote speakers, Kristyn Gorton, Kim Akass and Lisa Blackman, and our Industry keynote panel led by Christa van Raalte (see below), will offer insights into media affects and their intersection with scholarly and practice-based approaches.</p>\n<p style=\"font-weight: 400;\"><strong>AREAS OF INQUIRY (not exhaustive)</strong></p>\n<table style=\"font-weight: 400;\" width=\"662\">\n<tbody>\n<tr>\n<td width=\"662\">\u25cf\u00a0\u00a0\u00a0\u00a0\u00a0 <strong>Emotional states</strong>, such as anger, anomie, confusion, compulsion, contempt, disgust, dissociation, fear, happiness, indifference, joy, longing, nihilism, rage, regret, shame, surprise.</td>\n</tr>\n<tr>\n<td width=\"662\">\u25cf\u00a0\u00a0\u00a0\u00a0\u00a0 <strong>Practice oriented contexts</strong>, such as broadcasting, cinematography, directing, distribution, drama, documentary, editing, journalism, liveness, marketing, streaming, social media, touchscreen technology, workplace.</td>\n</tr>\n<tr>\n<td width=\"662\">\u25cf\u00a0\u00a0\u00a0\u00a0\u00a0 <strong>Political and social worlds</strong>, such as Brexit, Covid-19, citizenship, community, Gaza, disability, ethnicity, inclusivity, nationality, neoliberalism, race, religion, Sudan, Thatcherism, Trump, Ukraine.</p>\n<p>\u25cf\u00a0\u00a0\u00a0\u00a0\u00a0 <strong>Theoretical models</strong>, relating to concepts, such as affect, alienation, behaviour, cognition, community, colonialism, consumption, embodiment, gender, genre, identity, inclusivity, memory, minority, nostalgia, orientalism, otherness, pastiche, post-colonialism, phenomenology, reasoning, regulation, representation, sexuality, surrealism, social realism, trauma.</td>\n</tr>\n</tbody>\n</table>\n<p style=\"font-weight: 400;\"><strong>SUBMIT YOUR PROPOSALS:</strong></p>\n<p style=\"font-weight: 400;\">Please submit abstract proposals of 250 words (max) by the 3 May 2026, using the appropriate links below (as single paper or pre-formed panel):</p>\n<p style=\"font-weight: 400;\"><a href=\"https://forms.office.com/Pages/ResponsePage.aspx?id=VZbi7ZfQ5EK7tfONQn-_uKTV25ijuANLi5dE2tVQ245UQTlTMVo3WjIxOU44MzVRQldYV0hYNUdXTS4u\">Media and Emotion Conference September 2026: SINGLE PAPER PROPOSAL\u00a0\u00a0 \u2013 Fill out form</a></p>\n<p style=\"font-weight: 400;\"><a href=\"https://forms.office.com/Pages/ResponsePage.aspx?id=VZbi7ZfQ5EK7tfONQn-_uKTV25ijuANLi5dE2tVQ245UQjBBMzcxWFVDUDRJMzhaU1dLTVFRWDRXSy4u\">Media and Emotion Conference September 2026: PRE-FORMED PANEL PROPOSAL \u2013 Fill out form</a></p>\n<p style=\"font-weight: 400;\">Decisions will be announced after 15<sup>th</sup> May 2026</p>\n<p style=\"font-weight: 400;\"><strong>NB:</strong> This conference is an in-person event only, with no facility for hybrid presentations.</p>\n<p style=\"font-weight: 400;\"><strong>STUDENTS:</strong></p>\n<p style=\"font-weight: 400;\">We will also offer<strong> post</strong><strong>graduate researchers</strong> the opportunity to enter a lottery to win a <strong>registration fee waiver</strong> (with five spaces available).</p>\n<p style=\"font-weight: 400;\"><strong>REGISTRATION &amp; ACCOMMODATION</strong></p>\n<p style=\"font-weight: 400;\"><strong>Registration fee: </strong>including refreshments and lunch for two days:</p>\n<p style=\"font-weight: 400;\">\u00a3140 (students, part time employment)</p>\n<p style=\"font-weight: 400;\">\u00a3170 (full time employment)</p>\n<p style=\"font-weight: 400;\"><strong>Conference evening</strong> meal will be available under a separate invitation, at own cost.</p>\n<p style=\"font-weight: 400;\"><strong>On site campus accommodation </strong>will be available at \u00a375 for three nights (fixed price), plus \u00a325 for each additional night (over the preceding weekend)</p>\n<p style=\"font-weight: 400;\"><strong>Local hotels available</strong> at reduced conference rates.</p>\n<p style=\"font-weight: 400;\"><strong>CONFIRMED KEYNOTES: </strong><strong>\u00a0</strong></p>\n<p style=\"font-weight: 400;\"><a href=\"https://www.gold.ac.uk/media-communications/staff/blackman/\"><strong>Lisa Blackman </strong>(Professor in Media and Communications \u2013 Goldsmiths University)</a> &#8211; whose work includes:</p>\n<ul>\n<li><em>Grey Media: A Psychopolitics of Deception</em> (Punctum Books 2026).</li>\n<li><em>Haunted Data: Affect, Transmedia, Weird Science</em> (Bloomsbury 2019).</li>\n</ul>\n<p style=\"font-weight: 400;\"><strong>DECEIT AND DECEPTION:</strong> Lisa will explore media and emotion through the concept of \u2018grey media\u2019, a term which brings into alignment the long histories of apparatuses of deceit and deception which have a distinct mediality, linking the gaslighting of emotional abuse, information warfare and AI Deception.</p>\n<p style=\"font-weight: 400;\"><a href=\"https://ahc.leeds.ac.uk/arts-humanities-cultures/staff/2910/professor-kristyn-gorton\"><strong>Kristyn Gorton (Professor of Film and Television \u2013 University of Leeds)</strong></a> \u00a0-\u2013 whose work includes:</p>\n<ul>\n<li><em>Emotion Online: Theorising Affect on the Internet</em> (Palgrave 2013).</li>\n<li><em>Media Audiences: Television, Meaning and Emotion</em> (Edinburgh University Press, 2009).</li>\n</ul>\n<p style=\"font-weight: 400;\"><strong>EMPATHY AND INTIMACY:</strong>\u00a0 This paper returns to Kristyn\u2019s earlier work (as above) and engages with recent work on &#8217;empathy&#8217; and &#8216;intimacy&#8217; to reflect on the development of the field and the ways in which television constructs emotion. Kristyn will draw on examples from serial melodrama which use excess to mark out spaces for viewers to work through narratives of social justice and change. The paper will also consider how the production cultures impact and inform the affective landscape of these stories.</p>\n<p style=\"font-weight: 400;\"><strong>Kim Akass</strong> (Professor of Radio Television and Film) &#8211; whose work includes:</p>\n<ul>\n<li><em>Mothers on American Television: From Here to Maternity</em> (Manchester University Press 2023).</li>\n</ul>\n<p style=\"font-weight: 400;\"><strong>RAGE AND MOTHERHOOD</strong>: Since the overturn of Roe vs Wade in June 2022 and the resulting ban on abortion in 13 states (so far), is it surprising that we are seeing so much female rage on our screens? From postpartum psychosis in <em>Die My Love</em> (Lynne Ramsay, 2025) to <em>If I Had Legs, I Would Kick You</em> (Mary Bronstein, 2025) maternal rage is, well, all the rage. In this paper Kim will explore how female rage has emerged as a theme in film and TV and asks whether this is due to an increase in women behind the scenes or a reaction to punitive legislation against women\u2019s reproductive rights.</p>\n<p style=\"font-weight: 400;\"><a href=\"https://staffprofiles.bournemouth.ac.uk/display/cvanraalte\"><strong>Christa van Raalte</strong> (Associate Professor of Film and Television \u2013 Bournemouth University)</a> \u2013 whose work includes:</p>\n<ul>\n<li>The Good Manager in TV: Tales for the Twenty-first Century, in <em>Creative Industries Journal </em>(2024), (with Wallis, R.).</li>\n<li>More Than Just a Few \u2018Bad Apples\u2019: The Need for a Risk Management Approach to the Problem of Workplace Bullying in the UK\u2019s Television Industry, in <em>Creative Industries Journal </em>(2023), (with Wallis, R. and Pekalski, D.).</li>\n</ul>\n<p style=\"font-weight: 400;\"><strong>TV INDUSTRY PANEL: THE ECONOMICS OF EMOTION</strong>:\u00a0 Christa will also bring together a range of industry practitioners, considering how emotion works as a commodity for creativity, in artistic and workplace contexts. What are the safeguarding standards when creators, collaborators and audiences engage with productions that frame emotional media? How might media producers negotiate the polarising emotional landscape and ethical broadcasting standards when creating content?</p>\n<p style=\"font-weight: 400;\"><strong>We are looking forward to your submissions!!</strong></p>\n<p style=\"font-weight: 400;\"><strong>Conference organisers:</strong> Christopher Pullen, Catalin Brylla &amp; Savvas Voutyras of</p>\n<p style=\"font-weight: 400;\"><a href=\"https://www.bournemouth.ac.uk/research/centres-institutes/centre-study-conflict-emotion-social-justice\">The Centre for the Study of Conflict, Emotion and Social Justice</a></p>\n<p style=\"font-weight: 400;\">Bournemouth University, Faculty of Media, Science and Technology, Talbot Campus, Fern Barrow Poole, BH12 5BB.</p>\n<p style=\"font-weight: 400;\"><strong>Conference email contact: </strong><a href=\"mailto:cpullen@bournemouth.ac.uk\">cpullen@bournemouth.ac.uk</a></p>\n","doi":"https://doi.org/10.59350/zmmp8-n8w87","funding_references":null,"guid":"https://cstonline.net/?p=15784","id":"9895a0b3-b02a-44f4-b87b-fa8655fb8712","image":"https://cstonline.net/wp-content/uploads/2026/04/1773843427481.jpeg","indexed":true,"indexed_at":1775205402,"language":"en","parent_doi":null,"published_at":1775203256,"reference":[],"registered_at":0,"relationships":[],"rid":"64rbw-1zn97","status":"active","summary":"<b>\n 2 days with up to 100+ papers in 30+ panels, 4 keynote events, lunches and refreshment\n</b>\n<strong>\n breaks for both days, optional self-funded conference meal, student rates (and lottery free spaces) and campus accommodation available \u2013\n</strong>\n<strong>\n Talbot Campus \u2013 Bournemouth University\n</strong>\n<strong>\n DEADLINE FOR SUBMISSION 3 May 2026\n</strong>\nThe Centre for the Study of Conflict, Emotion and Social Justice, in the Faculty of Media,","tags":["CFPs","CFPs Conferences"],"title":"CFP: MEDIA AND EMOTION CONFERENCE \u2013 7-8 SEPTEMBER 2026","updated_at":1775203966,"url":"https://cstonline.net/cfp-media-and-emotion-conference-7-8-september-2026/","version":"v1"}],"out_of":49878,"page":1,"per_page":10,"total-results":49878}
