Skip to content

Commit

Permalink
sipp 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
ajdamico committed Aug 13, 2024
1 parent b6589d9 commit e09baa0
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 26 deletions.
2 changes: 1 addition & 1 deletion docs/search_index.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/survey-of-income-and-program-participation-sipp.html
Original file line number Diff line number Diff line change
Expand Up @@ -1097,14 +1097,14 @@ <h1>Survey of Income and Program Participation (SIPP)<a href="survey-of-income-a
<ul>
<li><p>Annual tables with one record per month per person per sampled household, time period weights.</p></li>
<li><p>A complex sample generalizing to the U.S. civilian non-institutionalized across varying time periods.</p></li>
<li><p>Multi-year panels since 1980s, its current and now permanent <a href="https://www2.census.gov/programs-surveys/sipp/tech-documentation/methodology/2022_SIPP_Users_Guide_JUN23.pdf#page=15">four year rotation</a> beginning in 2018.</p></li>
<li><p>Multi-year panels since 1980s, its current and now permanent <a href="https://www2.census.gov/programs-surveys/sipp/tech-documentation/methodology/2023_SIPP_Users_Guide_JUL24.pdf#page=15">four year rotation</a> beginning in 2018.</p></li>
<li><p>Administered and financed by the <a href="http://www.census.gov/">US Census Bureau</a>.</p></li>
</ul>
<hr />
<p>Please skim before you begin:</p>
<ol style="list-style-type: decimal">
<li><p><a href="https://www2.census.gov/programs-surveys/sipp/tech-documentation/methodology/2022_SIPP_Users_Guide_JUN23.pdf">2022 Survey of Income and Program Participation Users’ Guide</a></p></li>
<li><p><a href="https://www.census.gov/programs-surveys/sipp/tech-documentation/user-notes/2022-usernotes.html">2022 Data User Notes</a></p></li>
<li><p><a href="https://www2.census.gov/programs-surveys/sipp/tech-documentation/methodology/2023_SIPP_Users_Guide_JUL24.pdf">2023 Survey of Income and Program Participation Users’ Guide</a></p></li>
<li><p><a href="https://www.census.gov/programs-surveys/sipp/tech-documentation/user-notes/2023-usernotes.html">2023 Data User Notes</a></p></li>
<li><p>A haiku regarding this microdata:</p></li>
</ol>
<div class="sourceCode" id="cb1232"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1232-1"><a href="survey-of-income-and-program-participation-sipp.html#cb1232-1" aria-hidden="true" tabindex="-1"></a><span class="co"># federal programs</span></span>
Expand All @@ -1127,7 +1127,7 @@ <h2>Download, Import, Preparation<a href="survey-of-income-and-program-participa
<span id="cb1234-6"><a href="survey-of-income-and-program-participation-sipp.html#cb1234-6" aria-hidden="true" tabindex="-1"></a>main_url <span class="ot">&lt;-</span></span>
<span id="cb1234-7"><a href="survey-of-income-and-program-participation-sipp.html#cb1234-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">paste0</span>(</span>
<span id="cb1234-8"><a href="survey-of-income-and-program-participation-sipp.html#cb1234-8" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;https://www2.census.gov/programs-surveys/sipp/&quot;</span> ,</span>
<span id="cb1234-9"><a href="survey-of-income-and-program-participation-sipp.html#cb1234-9" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;data/datasets/2022/pu2022_csv.zip&quot;</span></span>
<span id="cb1234-9"><a href="survey-of-income-and-program-participation-sipp.html#cb1234-9" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;data/datasets/2023/pu2023_csv.zip&quot;</span></span>
<span id="cb1234-10"><a href="survey-of-income-and-program-participation-sipp.html#cb1234-10" aria-hidden="true" tabindex="-1"></a> )</span>
<span id="cb1234-11"><a href="survey-of-income-and-program-participation-sipp.html#cb1234-11" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1234-12"><a href="survey-of-income-and-program-participation-sipp.html#cb1234-12" aria-hidden="true" tabindex="-1"></a><span class="fu">GET</span>( main_url , <span class="fu">write_disk</span>( main_tf ) , <span class="fu">progress</span>() )</span>
Expand All @@ -1145,7 +1145,7 @@ <h2>Download, Import, Preparation<a href="survey-of-income-and-program-participa
<span id="cb1235-3"><a href="survey-of-income-and-program-participation-sipp.html#cb1235-3" aria-hidden="true" tabindex="-1"></a>rw_url <span class="ot">&lt;-</span></span>
<span id="cb1235-4"><a href="survey-of-income-and-program-participation-sipp.html#cb1235-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">paste0</span>(</span>
<span id="cb1235-5"><a href="survey-of-income-and-program-participation-sipp.html#cb1235-5" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;https://www2.census.gov/programs-surveys/sipp/&quot;</span> ,</span>
<span id="cb1235-6"><a href="survey-of-income-and-program-participation-sipp.html#cb1235-6" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;data/datasets/2022/rw2022_csv.zip&quot;</span></span>
<span id="cb1235-6"><a href="survey-of-income-and-program-participation-sipp.html#cb1235-6" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;data/datasets/2023/rw2023_csv.zip&quot;</span></span>
<span id="cb1235-7"><a href="survey-of-income-and-program-participation-sipp.html#cb1235-7" aria-hidden="true" tabindex="-1"></a> )</span>
<span id="cb1235-8"><a href="survey-of-income-and-program-participation-sipp.html#cb1235-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1235-9"><a href="survey-of-income-and-program-participation-sipp.html#cb1235-9" aria-hidden="true" tabindex="-1"></a><span class="fu">GET</span>( rw_url , <span class="fu">write_disk</span>( rw_tf ) , <span class="fu">progress</span>() )</span>
Expand Down Expand Up @@ -1370,11 +1370,11 @@ <h3>Regression Models and Tests of Association<a href="survey-of-income-and-prog
</div>
<div id="replication-example-39" class="section level2 unnumbered hasAnchor">
<h2>Replication Example<a href="survey-of-income-and-program-participation-sipp.html#replication-example-39" class="anchor-section" aria-label="Anchor link to header"></a></h2>
<p>This example matches statistics and standard errors from the <a href="https://www2.census.gov/programs-surveys/demo/tables/wealth/2021/wealth-asset-ownership/Wealth_tables_dy2021.xlsx">Wealth and Asset Ownership for Households, by Type of Asset and Selected Characteristics: 2021</a>:</p>
<p>This example matches statistics and standard errors from the <a href="https://www2.census.gov/programs-surveys/demo/tables/wealth/2022/wealth-asset-ownership/wealth_tables_dy2022.xlsx">Wealth and Asset Ownership for Households, by Type of Asset and Selected Characteristics: 2022</a>:</p>
<p>Restrict the design to permanent residence-based householders to match the count in Table 4:</p>
<div class="sourceCode" id="cb1259"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1259-1"><a href="survey-of-income-and-program-participation-sipp.html#cb1259-1" aria-hidden="true" tabindex="-1"></a>sipp_household_design <span class="ot">&lt;-</span> <span class="fu">subset</span>( sipp_design , erelrpe <span class="sc">%in%</span> <span class="dv">1</span><span class="sc">:</span><span class="dv">2</span> <span class="sc">&amp;</span> tlivqtr <span class="sc">%in%</span> <span class="dv">1</span><span class="sc">:</span><span class="dv">2</span> )</span>
<span id="cb1259-2"><a href="survey-of-income-and-program-participation-sipp.html#cb1259-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1259-3"><a href="survey-of-income-and-program-participation-sipp.html#cb1259-3" aria-hidden="true" tabindex="-1"></a><span class="fu">stopifnot</span>( <span class="fu">round</span>( <span class="fu">coef</span>( <span class="fu">svytotal</span>( <span class="sc">~</span> one , sipp_household_design ) ) <span class="sc">/</span> <span class="dv">1000</span> , <span class="sc">-</span><span class="dv">2</span> ) <span class="sc">==</span> <span class="dv">132700</span> )</span></code></pre></div>
<span id="cb1259-3"><a href="survey-of-income-and-program-participation-sipp.html#cb1259-3" aria-hidden="true" tabindex="-1"></a><span class="fu">stopifnot</span>( <span class="fu">round</span>( <span class="fu">coef</span>( <span class="fu">svytotal</span>( <span class="sc">~</span> one , sipp_household_design ) ) <span class="sc">/</span> <span class="dv">1000</span> , <span class="sc">-</span><span class="dv">2</span> ) <span class="sc">==</span> <span class="dv">134100</span> )</span></code></pre></div>
<p>Compute Household Net Worth distribution and standard errors across the Total row of Tables 4 and 4A:</p>
<div class="sourceCode" id="cb1260"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1260-1"><a href="survey-of-income-and-program-participation-sipp.html#cb1260-1" aria-hidden="true" tabindex="-1"></a>sipp_household_design <span class="ot">&lt;-</span></span>
<span id="cb1260-2"><a href="survey-of-income-and-program-participation-sipp.html#cb1260-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">update</span>(</span>
Expand All @@ -1396,7 +1396,7 @@ <h2>Replication Example<a href="survey-of-income-and-program-participation-sipp.
<span id="cb1260-18"><a href="survey-of-income-and-program-participation-sipp.html#cb1260-18" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1260-19"><a href="survey-of-income-and-program-participation-sipp.html#cb1260-19" aria-hidden="true" tabindex="-1"></a><span class="fu">stopifnot</span>( </span>
<span id="cb1260-20"><a href="survey-of-income-and-program-participation-sipp.html#cb1260-20" aria-hidden="true" tabindex="-1"></a> <span class="fu">all.equal</span>( <span class="fu">as.numeric</span>( <span class="fu">round</span>( <span class="fu">coef</span>( results ) <span class="sc">*</span> <span class="dv">100</span> , <span class="dv">1</span> ) ) , </span>
<span id="cb1260-21"><a href="survey-of-income-and-program-participation-sipp.html#cb1260-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">c</span>( <span class="fl">11.3</span> , <span class="fl">6.9</span> , <span class="fl">3.5</span> , <span class="fl">5.9</span> , <span class="fl">6.4</span> , <span class="fl">8.2</span> , <span class="fl">15.3</span> , <span class="fl">13.9</span> , <span class="fl">28.7</span> ) ) </span>
<span id="cb1260-21"><a href="survey-of-income-and-program-participation-sipp.html#cb1260-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">c</span>( <span class="fl">11.1</span> , <span class="fl">6.8</span> , <span class="fl">3.5</span> , <span class="fl">5.7</span> , <span class="fl">5.6</span> , <span class="fl">7.8</span> , <span class="fl">15.9</span> , <span class="fl">14.4</span> , <span class="fl">29.2</span> ) ) </span>
<span id="cb1260-22"><a href="survey-of-income-and-program-participation-sipp.html#cb1260-22" aria-hidden="true" tabindex="-1"></a>)</span>
<span id="cb1260-23"><a href="survey-of-income-and-program-participation-sipp.html#cb1260-23" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1260-24"><a href="survey-of-income-and-program-participation-sipp.html#cb1260-24" aria-hidden="true" tabindex="-1"></a><span class="fu">stopifnot</span>(</span>
Expand Down
18 changes: 10 additions & 8 deletions metadata/sipp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ table_structure: * Annual tables with one record per month per person per sample

generalizable_population: * A complex sample generalizing to the U.S. civilian non-institutionalized across varying time periods.

publication_period: * Multi-year panels since 1980s, its current and now permanent [four year rotation](https://www2.census.gov/programs-surveys/sipp/tech-documentation/methodology/2022_SIPP_Users_Guide_JUN23.pdf#page=15) beginning in 2018.
publication_period: * Multi-year panels since 1980s, its current and now permanent [four year rotation](https://www2.census.gov/programs-surveys/sipp/tech-documentation/methodology/2023_SIPP_Users_Guide_JUL24.pdf#page=15) beginning in 2018.

administrative_organization: * Administered and financed by the [US Census Bureau](http://www.census.gov/).

Expand All @@ -23,9 +23,9 @@ administrative_organization: * Administered and financed by the [US Census Burea
~~~{reading_block}
Please skim before you begin:

1. [2022 Survey of Income and Program Participation Users' Guide](https://www2.census.gov/programs-surveys/sipp/tech-documentation/methodology/2022_SIPP_Users_Guide_JUN23.pdf)
1. [2023 Survey of Income and Program Participation Users' Guide](https://www2.census.gov/programs-surveys/sipp/tech-documentation/methodology/2023_SIPP_Users_Guide_JUL24.pdf)

2. [2022 Data User Notes](https://www.census.gov/programs-surveys/sipp/tech-documentation/user-notes/2022-usernotes.html)
2. [2023 Data User Notes](https://www.census.gov/programs-surveys/sipp/tech-documentation/user-notes/2023-usernotes.html)

3. A haiku regarding this microdata:

Expand Down Expand Up @@ -59,7 +59,7 @@ main_tf <- tempfile()
main_url <-
paste0(
"https://www2.census.gov/programs-surveys/sipp/" ,
"data/datasets/2022/pu2022_csv.zip"
"data/datasets/2023/pu2023_csv.zip"
)

GET( main_url , write_disk( main_tf ) , progress() )
Expand All @@ -82,7 +82,7 @@ rw_tf <- tempfile()
rw_url <-
paste0(
"https://www2.census.gov/programs-surveys/sipp/" ,
"data/datasets/2022/rw2022_csv.zip"
"data/datasets/2023/rw2023_csv.zip"
)

GET( rw_url , write_disk( rw_tf ) , progress() )
Expand Down Expand Up @@ -228,14 +228,14 @@ svygini( ~ tftotinc , chapter_tag_design , na.rm = TRUE )
~~~{replication_example_block}
## Replication Example {-}

This example matches statistics and standard errors from the [Wealth and Asset Ownership for Households, by Type of Asset and Selected Characteristics: 2021](https://www2.census.gov/programs-surveys/demo/tables/wealth/2021/wealth-asset-ownership/Wealth_tables_dy2021.xlsx):
This example matches statistics and standard errors from the [Wealth and Asset Ownership for Households, by Type of Asset and Selected Characteristics: 2022](https://www2.census.gov/programs-surveys/demo/tables/wealth/2022/wealth-asset-ownership/wealth_tables_dy2022.xlsx):

Restrict the design to permanent residence-based householders to match the count in Table 4:

```{r eval = FALSE , results = "hide" }
chapter_tag_household_design <- subset( sipp_design , erelrpe %in% 1:2 & tlivqtr %in% 1:2 )

stopifnot( round( coef( svytotal( ~ one , chapter_tag_household_design ) ) / 1000 , -2 ) == 132700 )
stopifnot( round( coef( svytotal( ~ one , chapter_tag_household_design ) ) / 1000 , -2 ) == 134100 )
```


Expand Down Expand Up @@ -263,9 +263,11 @@ results <- svymean( ~ thnetworth_category , chapter_tag_household_design )

stopifnot(
all.equal( as.numeric( round( coef( results ) * 100 , 1 ) ) ,
c( 11.3 , 6.9 , 3.5 , 5.9 , 6.4 , 8.2 , 15.3 , 13.9 , 28.7 ) )
c( 11.1 , 6.8 , 3.5 , 5.7 , 5.6 , 7.8 , 15.9 , 14.4 , 29.2 ) )
)



stopifnot(
all.equal( as.numeric( round( SE( results ) * 100 , 1 ) ) ,
c( 0.3 , 0.2 , 0.2 , 0.2 , 0.2 , 0.2 , 0.3 , 0.3 , 0.3 ) )
Expand Down
16 changes: 8 additions & 8 deletions sipp.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ The primary longitudinal assessment of income fluctuation, labor force participa

* A complex sample generalizing to the U.S. civilian non-institutionalized across varying time periods.

* Multi-year panels since 1980s, its current and now permanent [four year rotation](https://www2.census.gov/programs-surveys/sipp/tech-documentation/methodology/2022_SIPP_Users_Guide_JUN23.pdf#page=15) beginning in 2018.
* Multi-year panels since 1980s, its current and now permanent [four year rotation](https://www2.census.gov/programs-surveys/sipp/tech-documentation/methodology/2023_SIPP_Users_Guide_JUL24.pdf#page=15) beginning in 2018.

* Administered and financed by the [US Census Bureau](http://www.census.gov/).

---

Please skim before you begin:

1. [2022 Survey of Income and Program Participation Users' Guide](https://www2.census.gov/programs-surveys/sipp/tech-documentation/methodology/2022_SIPP_Users_Guide_JUN23.pdf)
1. [2023 Survey of Income and Program Participation Users' Guide](https://www2.census.gov/programs-surveys/sipp/tech-documentation/methodology/2023_SIPP_Users_Guide_JUL24.pdf)

2. [2022 Data User Notes](https://www.census.gov/programs-surveys/sipp/tech-documentation/user-notes/2022-usernotes.html)
2. [2023 Data User Notes](https://www.census.gov/programs-surveys/sipp/tech-documentation/user-notes/2023-usernotes.html)

3. A haiku regarding this microdata:

Expand Down Expand Up @@ -50,7 +50,7 @@ main_tf <- tempfile()
main_url <-
paste0(
"https://www2.census.gov/programs-surveys/sipp/" ,
"data/datasets/2022/pu2022_csv.zip"
"data/datasets/2023/pu2023_csv.zip"
)
GET( main_url , write_disk( main_tf ) , progress() )
Expand All @@ -72,7 +72,7 @@ rw_tf <- tempfile()
rw_url <-
paste0(
"https://www2.census.gov/programs-surveys/sipp/" ,
"data/datasets/2022/rw2022_csv.zip"
"data/datasets/2023/rw2023_csv.zip"
)
GET( rw_url , write_disk( rw_tf ) , progress() )
Expand Down Expand Up @@ -361,14 +361,14 @@ summary( glm_result )

## Replication Example {-}

This example matches statistics and standard errors from the [Wealth and Asset Ownership for Households, by Type of Asset and Selected Characteristics: 2021](https://www2.census.gov/programs-surveys/demo/tables/wealth/2021/wealth-asset-ownership/Wealth_tables_dy2021.xlsx):
This example matches statistics and standard errors from the [Wealth and Asset Ownership for Households, by Type of Asset and Selected Characteristics: 2022](https://www2.census.gov/programs-surveys/demo/tables/wealth/2022/wealth-asset-ownership/wealth_tables_dy2022.xlsx):

Restrict the design to permanent residence-based householders to match the count in Table 4:

```{r eval = FALSE , results = "hide" }
sipp_household_design <- subset( sipp_design , erelrpe %in% 1:2 & tlivqtr %in% 1:2 )
stopifnot( round( coef( svytotal( ~ one , sipp_household_design ) ) / 1000 , -2 ) == 132700 )
stopifnot( round( coef( svytotal( ~ one , sipp_household_design ) ) / 1000 , -2 ) == 134100 )
```

Compute Household Net Worth distribution and standard errors across the Total row of Tables 4 and 4A:
Expand All @@ -394,7 +394,7 @@ results <- svymean( ~ thnetworth_category , sipp_household_design )
stopifnot(
all.equal( as.numeric( round( coef( results ) * 100 , 1 ) ) ,
c( 11.3 , 6.9 , 3.5 , 5.9 , 6.4 , 8.2 , 15.3 , 13.9 , 28.7 ) )
c( 11.1 , 6.8 , 3.5 , 5.7 , 5.6 , 7.8 , 15.9 , 14.4 , 29.2 ) )
)
stopifnot(
Expand Down
2 changes: 1 addition & 1 deletion vignetterator/generate.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
commit_memo <- "'skip local builds, badges on one line'"
commit_memo <- "'sipp 2023'"

# source( file.path( path.expand( "~" ) , "Github/asdfree/vignetterator/generate.R" ) )

Expand Down

0 comments on commit e09baa0

Please sign in to comment.