Skip to content

Commit

Permalink
ahs 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
ajdamico committed Dec 2, 2024
1 parent 0fabab4 commit 89aae04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tf <- tempfile()
this_url <-
paste0(
"https://www2.census.gov/programs-surveys/ahs/" ,
"2021/AHS%202021%20National%20PUF%20v1.0%20Flat%20SAS.zip"
"2023/AHS%202023%20National%20PUF%20v1.0%20Flat%20SAS.zip"
)

GET( this_url , write_disk( tf ) , progress() )
Expand Down Expand Up @@ -141,11 +141,11 @@ glm_result <-
summary( glm_result )
result <- svytotal( ~ as.numeric( intstatus == 1 ) , ahs_design )

stopifnot( round( coef( result ) / 1000 , 0 ) == 128504 )
stopifnot( round( coef( result ) / 1000 , 0 ) == 133231 )

ci_results <- confint( result , level = 0.9 )

stopifnot( round( ( ci_results[ 2 ] - coef( result ) ) / 1000 , 0 ) == 388 )
stopifnot( round( ( ci_results[ 2 ] - coef( result ) ) / 1000 , 0 ) == 381 )
library(srvyr)
ahs_srvyr_design <- as_survey( ahs_design )
ahs_srvyr_design %>%
Expand Down

0 comments on commit 89aae04

Please sign in to comment.