Skip to content

Commit

Permalink
ivelasq published a site update
Browse files Browse the repository at this point in the history
  • Loading branch information
ivelasq committed Aug 22, 2024
1 parent c055598 commit 823455d
Show file tree
Hide file tree
Showing 16 changed files with 1,515 additions and 1,200 deletions.
125 changes: 67 additions & 58 deletions c01-intro.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions c02-overview-surveys.html
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,8 @@ <h2><span class="header-section-number">2.1</span> Introduction<a href="c02-over
<p>
Before analyzing survey data, we recommend understanding the entire survey life cycle. This understanding can provide better insight into what types of analyses should be conducted on the data. The survey life cycle consists of the necessary stages to execute a survey project successfully. Each stage influences the survey’s timing, costs, and feasibility, consequently impacting the data collected and how we should analyze them. Figure <a href="c02-overview-surveys.html#fig:overview-diag">2.1</a> shows a high-level overview of the survey process.</p>
<div class="figure"><span style="display:block;" id="fig:overview-diag"></span>
<div class="DiagrammeR html-widget html-fill-item" id="htmlwidget-9e42daa18cd6c55df455" style="width:672px;height:480px;"></div>
<script type="application/json" data-for="htmlwidget-9e42daa18cd6c55df455">{"x":{"diagram":"\ngraph TD\n A[Survey Concept]-->B[Sampling Design]\n A-->C[Questionnaire Design]\n A-->D[Data Collection Planning]\n B-->E[Data Collection]\n C-->E\n D-->E\n E-->F[Post-Survey Processing]\n F-->G[Analysis]\n G-->H[Reporting]\n \n style A fill: #bfd7ea, stroke: #0b3954\n style B fill: #bfd7ea, stroke: #0b3954\n style C fill: #bfd7ea, stroke: #0b3954\n style D fill: #bfd7ea, stroke: #0b3954\n style E fill: #bfd7ea, stroke: #0b3954\n style F fill: #bfd7ea, stroke: #0b3954\n style G fill: #bfd7ea, stroke: #0b3954\n style H fill: #bfd7ea, stroke: #0b3954\n"},"evals":[],"jsHooks":[]}</script>
<div class="DiagrammeR html-widget html-fill-item" id="htmlwidget-c0d66ce15568345571f1" style="width:672px;height:480px;"></div>
<script type="application/json" data-for="htmlwidget-c0d66ce15568345571f1">{"x":{"diagram":"\ngraph TD\n A[Survey Concept]-->B[Sampling Design]\n A-->C[Questionnaire Design]\n A-->D[Data Collection Planning]\n B-->E[Data Collection]\n C-->E\n D-->E\n E-->F[Post-Survey Processing]\n F-->G[Analysis]\n G-->H[Reporting]\n \n style A fill: #bfd7ea, stroke: #0b3954\n style B fill: #bfd7ea, stroke: #0b3954\n style C fill: #bfd7ea, stroke: #0b3954\n style D fill: #bfd7ea, stroke: #0b3954\n style E fill: #bfd7ea, stroke: #0b3954\n style F fill: #bfd7ea, stroke: #0b3954\n style G fill: #bfd7ea, stroke: #0b3954\n style H fill: #bfd7ea, stroke: #0b3954\n"},"evals":[],"jsHooks":[]}</script>
<p class="caption">
FIGURE 2.1: Overview of the survey process
</p>
Expand Down Expand Up @@ -706,15 +706,15 @@ <h3><span class="header-section-number">2.4.3</span> Questionnaire design<a href
<h4>Example: Number of pets in a household<a href="c02-overview-surveys.html#overview-design-questionnaire-ex" class="anchor-section" aria-label="Anchor link to header"></a></h4>
<p>As part of our survey on the average number of pets in a household, we may want to know what animal most people prefer to have as a pet. Let’s say we have a question in our survey as displayed in Figure <a href="c02-overview-surveys.html#fig:overview-pet-examp1">2.2</a>.</p>
<div class="figure" style="text-align: center"><span style="display:block;" id="fig:overview-pet-examp1"></span>
<img src="images/PetExample1.png" alt="Example question asking &quot;What animal do you prefer to have as a pet?&quot; with response options of Dogs and Cats." width="70%" />
<img src="images/PetExample1.png" alt="Example question asking &quot;What animal do you prefer to have as a pet?&quot; with response options of Dogs and Cats." width="70%" />
<p class="caption">
FIGURE 2.2: Example question asking pet preference type
</p>
</div>
<p>This question may have validity issues as it only provides the options of “dogs” and “cats” to respondents, and the interpretation of the data could be incorrect. For example, if we had 100 respondents who answered the question and 50 selected dogs, then the results of this question cannot be “50% of the population prefers to have a dog as a pet,” as only two response options were provided. If a respondent taking our survey prefers turtles, they could either be forced to choose a response between these two (i.e., interpret the question as “between dogs and cats, which do you prefer?” and result in measurement error), or they may not answer the question (which results in item nonresponse error). Based on this, the interpretation of this question should be, “When given a choice between dogs and cats, 50% of respondents preferred to have a dog as a pet.”</p>
<p>To avoid this issue, we should consider these possibilities and adjust the question accordingly. One simple way could be to add an “other” response option to give respondents a chance to provide a different response. The “other” response option could then include a way for respondents to write their other preference. For example, we could rewrite this question as displayed in Figure <a href="c02-overview-surveys.html#fig:overview-pet-examp2">2.3</a>.</p>
<div class="figure" style="text-align: center"><span style="display:block;" id="fig:overview-pet-examp2"></span>
<img src="images/PetExample2.png" alt="Example question asking &quot;What animal do you prefer to have as a pet?&quot; with response options of Dogs, Cats, and Other. The other option includes an open-ended box after for write in responses." width="70%" />
<img src="images/PetExample2.png" alt="Example question asking &quot;What animal do you prefer to have as a pet?&quot; with response options of Dogs, Cats, and Other. The other option includes an open-ended box after for write in responses." width="70%" />
<p class="caption">
FIGURE 2.3: Example question asking pet preference type with other specify option
</p>
Expand Down
2 changes: 1 addition & 1 deletion c04-getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ <h3>References<a href="references.html#references" class="anchor-section" aria-l
Henry, Lionel, and Hadley Wickham. 2024. <em><span class="nocase">tidyselect</span>: Select from a Set of Strings</em>. <a href="https://tidyselect.r-lib.org">https://tidyselect.r-lib.org</a>.
</div>
<div id="ref-R-gt" class="csl-entry">
Iannone, Richard, Joe Cheng, Barret Schloerke, Ellis Hughes, Alexandra Lauer, and JooYoung Seo. 2024. <em><span class="nocase">gt</span>: Easily Create Presentation-Ready Display Tables</em>. <a href="https://gt.rstudio.com">https://gt.rstudio.com</a>.
Iannone, Richard, Joe Cheng, Barret Schloerke, Ellis Hughes, Alexandra Lauer, JooYoung Seo, Ken Brevoort, and Olivier Roy. 2024. <em><span class="nocase">gt</span>: Easily Create Presentation-Ready Display Tables</em>. <a href="https://github.com/rstudio/gt">https://github.com/rstudio/gt</a>.
</div>
<div id="ref-lumley2010complex" class="csl-entry">
Lumley, Thomas. 2010. <em>Complex Surveys: A Guide to Analysis Using <span>R</span></em>. John Wiley &amp; Sons.
Expand Down
2 changes: 1 addition & 1 deletion c05-descriptive-analysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ <h4>Example 1: One variable proportion<a href="c05-descriptive-analysis.html#exa
## 2 Midwest 0.219 0.000000000262
## 3 South 0.379 0.000000000740
## 4 West 0.224 0.000000000816</code></pre>
<p>with 17.7% of the households in the Northeast, 21.9% in the Midwest, and so on. Note that the proportions in column <code>p</code> add up to one.</p>
<p>17.7% of the households are in the Northeast, 21.9% are in the Midwest, and so on. Note that the proportions in column <code>p</code> add up to one.</p>
<p>
The <code>survey_prop()</code> function is essentially the same as using <code>survey_mean()</code> with a categorical variable and without specifying a numeric variable in the <code>x</code> argument. The following code gives us the same results as above:
</p>
Expand Down
Loading

0 comments on commit 823455d

Please sign in to comment.