Skip to content

Commit

Permalink
nsfg
Browse files Browse the repository at this point in the history
  • Loading branch information
ajdamico committed Dec 12, 2024
1 parent 8633bd0 commit 0918f2b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions docs/national-survey-of-family-growth-nsfg.html
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ <h2>Recommended Reading<a href="national-survey-of-family-growth-nsfg.html#recom
<ol style="list-style-type: decimal">
<li><p><a href="https://doi.org/10.1073/pnas.2109016118">One out of five mothers with a college degree had a nonmarital first birth during 2015-2017</a>.</p></li>
<li><p><a href="https://doi.org/10.1056/NEJMsa1506575">The rate of unintended pregnancy in the US declined substantially between 2008 and 2011</a>.</p></li>
<li><p><a href="https://www.cdc.gov/nchs/products/databriefs/db520.htm">During 20222023, 36% of females 1549 received any family planning service in the past 12 months</a>.</p></li>
<li><p><a href="https://www.cdc.gov/nchs/products/databriefs/db520.htm">During 2022-2023, 36% of females 15-49 received a family planning service in the past 12 months</a>.</p></li>
</ol>
<p><br></p>
<p>Two Methodology Documents:</p>
Expand Down Expand Up @@ -1354,8 +1354,8 @@ <h3>Descriptive Statistics<a href="national-survey-of-family-growth-nsfg.html#de
</div>
<div id="subsetting-30" class="section level3 unnumbered hasAnchor">
<h3>Subsetting<a href="national-survey-of-family-growth-nsfg.html#subsetting-30" class="anchor-section" aria-label="Anchor link to header"></a></h3>
<p>Restrict the survey design to ever cohabited:</p>
<div class="sourceCode" id="cb918"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb918-1"><a href="national-survey-of-family-growth-nsfg.html#cb918-1" tabindex="-1"></a>sub_nsfg_design <span class="ot">&lt;-</span> <span class="fu">subset</span>( nsfg_design , timescoh <span class="sc">&gt;</span> <span class="dv">0</span> )</span></code></pre></div>
<p>Restrict the survey design to Ever Cohabited with a Non-Marital Male Partner:</p>
<div class="sourceCode" id="cb918"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb918-1"><a href="national-survey-of-family-growth-nsfg.html#cb918-1" tabindex="-1"></a>sub_nsfg_design <span class="ot">&lt;-</span> <span class="fu">subset</span>( nsfg_design , evrcohab <span class="sc">==</span> <span class="dv">1</span> )</span></code></pre></div>
<p>Calculate the mean (average) of this subset:</p>
<div class="sourceCode" id="cb919"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb919-1"><a href="national-survey-of-family-growth-nsfg.html#cb919-1" tabindex="-1"></a><span class="fu">svymean</span>( <span class="sc">~</span> pregnum , sub_nsfg_design , <span class="at">na.rm =</span> <span class="cn">TRUE</span> )</span></code></pre></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/national-survey-on-drug-use-and-health-nsduh.html
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ <h2>Recommended Reading<a href="national-survey-on-drug-use-and-health-nsduh.htm
<p>Three Example Findings:</p>
<ol style="list-style-type: decimal">
<li><p><a href="http://doi.org/10.1056/NEJMoa1813751">Across 2002-2014, 36% of Americans aged 13-25 with ADHD used cannibis in the past month</a>.</p></li>
<li><p><a href="http://doi.org/10.3386/w31884">In 2021, 23% of older adults with pastyear nonmedical opioid use received public assistance and only 42% reported very good or excellent health vs. 16% and 68% among those without such use</a>.</p></li>
<li><p><a href="http://doi.org/10.3386/w31884">In 2021, 23% of older adults with past-year non-medical opioid use received public assistance and only 42% reported very good or excellent health vs. 16% and 68% among those without such use</a>.</p></li>
<li><p><a href="https://www.samhsa.gov/data/release/2023-national-survey-drug-use-and-health-nsduh-releases#highlights">Among adolescents 12-17 in 2023, 7% used tobacco products or vaped nicotine in the past month</a>.</p></li>
</ol>
<p><br></p>
Expand Down
2 changes: 1 addition & 1 deletion docs/search_index.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion metadata/nsduh.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Three Example Findings:

1. [Across 2002-2014, 36% of Americans aged 13-25 with ADHD used cannibis in the past month](http://doi.org/10.1056/NEJMoa1813751).

2. [In 2021, 23% of older adults with pastyear nonmedical opioid use received public assistance and only 42% reported very good or excellent health vs. 16% and 68% among those without such use](http://doi.org/10.3386/w31884).
2. [In 2021, 23% of older adults with past-year non-medical opioid use received public assistance and only 42% reported very good or excellent health vs. 16% and 68% among those without such use](http://doi.org/10.3386/w31884).

3. [Among adolescents 12-17 in 2023, 7% used tobacco products or vaped nicotine in the past month](https://www.samhsa.gov/data/release/2023-national-survey-drug-use-and-health-nsduh-releases#highlights).

Expand Down
6 changes: 3 additions & 3 deletions metadata/nsfg.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Three Example Findings:

2. [The rate of unintended pregnancy in the US declined substantially between 2008 and 2011](https://doi.org/10.1056/NEJMsa1506575).

3. [During 20222023, 36% of females 1549 received any family planning service in the past 12 months](https://www.cdc.gov/nchs/products/databriefs/db520.htm).
3. [During 2022-2023, 36% of females 15-49 received a family planning service in the past 12 months](https://www.cdc.gov/nchs/products/databriefs/db520.htm).

<br>

Expand Down Expand Up @@ -141,8 +141,8 @@ ratio_estimation_numerator: pregnum
ratio_estimation_denominator: lbpregs
ratio_narm: , na.rm = TRUE

subset_definition: timescoh > 0
subset_definition_description: ever cohabited
subset_definition: evrcohab == 1
subset_definition_description: Ever Cohabited with a Non-Marital Male Partner

binary_variable: birth_control_pill
binary_narm: , na.rm = TRUE
Expand Down
2 changes: 1 addition & 1 deletion nsduh.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Three Example Findings:

1. [Across 2002-2014, 36% of Americans aged 13-25 with ADHD used cannibis in the past month](http://doi.org/10.1056/NEJMoa1813751).

2. [In 2021, 23% of older adults with pastyear nonmedical opioid use received public assistance and only 42% reported very good or excellent health vs. 16% and 68% among those without such use](http://doi.org/10.3386/w31884).
2. [In 2021, 23% of older adults with past-year non-medical opioid use received public assistance and only 42% reported very good or excellent health vs. 16% and 68% among those without such use](http://doi.org/10.3386/w31884).

3. [Among adolescents 12-17 in 2023, 7% used tobacco products or vaped nicotine in the past month](https://www.samhsa.gov/data/release/2023-national-survey-drug-use-and-health-nsduh-releases#highlights).

Expand Down
6 changes: 3 additions & 3 deletions nsfg.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Three Example Findings:

2. [The rate of unintended pregnancy in the US declined substantially between 2008 and 2011](https://doi.org/10.1056/NEJMsa1506575).

3. [During 20222023, 36% of females 1549 received any family planning service in the past 12 months](https://www.cdc.gov/nchs/products/databriefs/db520.htm).
3. [During 2022-2023, 36% of females 15-49 received a family planning service in the past 12 months](https://www.cdc.gov/nchs/products/databriefs/db520.htm).

<br>

Expand Down Expand Up @@ -212,9 +212,9 @@ svyratio(

### Subsetting {-}

Restrict the survey design to ever cohabited:
Restrict the survey design to Ever Cohabited with a Non-Marital Male Partner:
```{r eval = FALSE , results = "hide" }
sub_nsfg_design <- subset( nsfg_design , timescoh > 0 )
sub_nsfg_design <- subset( nsfg_design , evrcohab == 1 )
```
Calculate the mean (average) of this subset:
```{r eval = FALSE , results = "hide" }
Expand Down

0 comments on commit 0918f2b

Please sign in to comment.