2017-08-01 21:44:39 2017-08-01 21:44:39 R version 3.4.0 (2017-04-21) -- "You Stupid Darkness" 2017-08-01 21:44:39 Copyright (C) 2017 The R Foundation for Statistical Computing 2017-08-01 21:44:39 Platform: x86_64-w64-mingw32/x64 (64-bit) 2017-08-01 21:44:39 2017-08-01 21:44:39 R is free software and comes with ABSOLUTELY NO WARRANTY. 2017-08-01 21:44:39 You are welcome to redistribute it under certain conditions. 2017-08-01 21:44:39 Type 'license()' or 'licence()' for distribution details. 2017-08-01 21:44:39 2017-08-01 21:44:39 Natural language support but running in an English locale 2017-08-01 21:44:39 2017-08-01 21:44:39 R is a collaborative project with many contributors. 2017-08-01 21:44:39 Type 'contributors()' for more information and 2017-08-01 21:44:39 'citation()' on how to cite R or R packages in publications. 2017-08-01 21:44:39 2017-08-01 21:44:39 Type 'demo()' for some demos, 'help()' for on-line help, or 2017-08-01 21:44:39 'help.start()' for an HTML browser interface to help. 2017-08-01 21:44:39 Type 'q()' to quit R. 2017-08-01 21:44:39 2017-08-01 21:44:39 > setwd( Sys.getenv( "RWD" ) ) 2017-08-01 21:44:39 > 2017-08-01 21:44:39 > machine_specific_replacements <- 2017-08-01 21:44:39 + list( 2017-08-01 21:44:39 + 2017-08-01 21:44:39 + # replace the folder path on macnix 2017-08-01 21:44:39 + c( 'path.expand( \"~\" ) , \"NSFG\"' , paste0( '"' , getwd() , '"' ) ) , 2017-08-01 21:44:39 + 2017-08-01 21:44:39 + # change other things in the script to be run 2017-08-01 21:44:39 + c( "hello" , "howdy" ) 2017-08-01 21:44:39 + 2017-08-01 21:44:39 + ) 2017-08-01 21:44:39 > 2017-08-01 21:44:39 > source( lodown::syntaxtractor( "nsfg" , replacements = machine_specific_replacements , setup_test = "setup" ) , echo = TRUE ) 2017-08-01 21:44:40 2017-08-01 21:48:48 2017-08-01 21:48:48 > library(lodown) 2017-08-01 21:48:48 2017-08-01 21:48:48 > lodown("nsfg", output_dir = file.path("e:/eanthony/r-wd/nsfg-1501649007")) 2017-08-01 21:48:48 building catalog for nsfg 2017-08-01 21:48:48 2017-08-01 21:48:52 locally downloading nsfg 2017-08-01 21:48:52 2017-08-01 21:48:54 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/1973FemRespSetup.sas' 2017-08-01 21:48:54 cached in 2017-08-01 21:48:54 'E:/eanthony/r-tmp/nsfg/648d1b14cf8aac0d42280a0b0f7c9a64.Rcache' 2017-08-01 21:48:54 copying to 2017-08-01 21:48:54 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 21:48:54 2017-08-01 21:49:01 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/1973NSFGData.dat' 2017-08-01 21:49:01 cached in 2017-08-01 21:49:01 'E:/eanthony/r-tmp/nsfg/39b1d465080c506a4cc64f43e0dc65e9.Rcache' 2017-08-01 21:49:01 copying to 2017-08-01 21:49:01 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 21:49:01 2017-08-01 21:56:15 nsfg catalog entry 1 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/1973NSFGData.rds' 2017-08-01 21:56:15 2017-08-01 21:56:15 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/1976PregSetup.sas' 2017-08-01 21:56:15 cached in 2017-08-01 21:56:15 'E:/eanthony/r-tmp/nsfg/f3b083d7a7c00dfe426e1c38b8351a9e.Rcache' 2017-08-01 21:56:15 copying to 2017-08-01 21:56:15 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 21:56:15 2017-08-01 21:56:17 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/1976NSFGData.dat' 2017-08-01 21:56:17 cached in 2017-08-01 21:56:17 'E:/eanthony/r-tmp/nsfg/51c5b8d4b8e54252eb1e17ec6d9d457f.Rcache' 2017-08-01 21:56:17 copying to 2017-08-01 21:56:17 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 21:56:17 2017-08-01 22:08:49 Warning: 13292 parsing failures. 2017-08-01 22:08:49 row # A tibble: 5 x 5 col row col expected actual expected actual 1 1 WTFINAL no trailing characters 0 file 2 5 BPREC2 no trailing characters 8 row 3 5 WTFINAL no trailing characters 0 col 4 8 C22 no trailing characters 1 expected 5 8 WTFINAL no trailing characters 0 actual # ... with 1 more variables: file 2017-08-01 22:08:49 ... ................. ... ............................................. ........ ............................................. ...... ............................................. .... ............................................. ... ............................................. ... ............................................. ........ ............................................. ...... ....................................... 2017-08-01 22:08:49 See problems(...) for more details. 2017-08-01 22:08:49 2017-08-01 22:08:51 nsfg catalog entry 2 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/1976FemPreg.rds' 2017-08-01 22:08:51 2017-08-01 22:08:51 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/1976FemRespSetup.sas' 2017-08-01 22:08:51 cached in 2017-08-01 22:08:51 'E:/eanthony/r-tmp/nsfg/722d22c82f0cfb1b4fc0ca17b8c7970e.Rcache' 2017-08-01 22:08:51 copying to 2017-08-01 22:08:51 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:08:51 2017-08-01 22:09:04 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/1976NSFGData.dat' 2017-08-01 22:09:04 cached in 2017-08-01 22:09:04 'E:/eanthony/r-tmp/nsfg/51c5b8d4b8e54252eb1e17ec6d9d457f.Rcache' 2017-08-01 22:09:04 copying to 2017-08-01 22:09:04 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:09:04 2017-08-01 22:09:05 Warning: 125 parsing failures. 2017-08-01 22:09:05 row # A tibble: 5 x 5 col row col expected actual expected actual 1 84 C35END2ND no trailing characters 8 file 2 151 C35END2ND no trailing characters 8 row 3 357 C35END2ND no trailing characters 8 col 4 463 C35END2ND no trailing characters 8 expected 5 493 C35END2ND no trailing characters 8 actual # ... with 1 more variables: file 2017-08-01 22:09:05 ... ................. ... ............................................... ........ ............................................... ...... ............................................... .... ............................................... ... ............................................... ... ............................................... ........ ............................................... ...... ....................................... 2017-08-01 22:09:05 See problems(...) for more details. 2017-08-01 22:09:05 2017-08-01 22:09:07 nsfg catalog entry 3 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/1976FemResp.rds' 2017-08-01 22:09:07 2017-08-01 22:09:09 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/1982PregSetup.sas' 2017-08-01 22:09:09 cached in 2017-08-01 22:09:09 'E:/eanthony/r-tmp/nsfg/ca5d9eb93191177f808a38f23e5c6373.Rcache' 2017-08-01 22:09:09 copying to 2017-08-01 22:09:09 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:09:09 2017-08-01 22:09:12 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/1982NSFGData.dat' 2017-08-01 22:09:12 cached in 2017-08-01 22:09:12 'E:/eanthony/r-tmp/nsfg/c61d6929a4b1fea49045e7e861b4f547.Rcache' 2017-08-01 22:09:12 copying to 2017-08-01 22:09:12 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:09:12 2017-08-01 22:13:53 Warning: 1532 parsing failures. 2017-08-01 22:13:53 row # A tibble: 5 x 5 col row col expected actual expected actual 1 9 B36_2 no trailing characters 0 file 2 11 B36_1 no trailing characters 10 row 3 11 B36_2 no trailing characters 0 col 4 21 C19_LM no trailing characters 09 expected 5 37 B36_2 no trailing characters 0 actual # ... with 1 more variables: file 2017-08-01 22:13:53 ... ................. ... ............................................ ........ ............................................ ...... ............................................ .... ............................................ ... ............................................ ... ............................................ ........ ............................................ ...... ....................................... 2017-08-01 22:13:53 See problems(...) for more details. 2017-08-01 22:13:53 2017-08-01 22:13:54 nsfg catalog entry 4 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/1982FemPreg.rds' 2017-08-01 22:13:54 2017-08-01 22:13:54 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/1982FemRespSetup.sas' 2017-08-01 22:13:54 cached in 2017-08-01 22:13:54 'E:/eanthony/r-tmp/nsfg/bd1c477970ded0120b3ab93351baa7b0.Rcache' 2017-08-01 22:13:54 copying to 2017-08-01 22:13:54 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:13:54 2017-08-01 22:13:57 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/1982NSFGData.dat' 2017-08-01 22:13:57 cached in 2017-08-01 22:13:57 'E:/eanthony/r-tmp/nsfg/c61d6929a4b1fea49045e7e861b4f547.Rcache' 2017-08-01 22:13:57 copying to 2017-08-01 22:13:57 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:13:57 2017-08-01 22:13:59 Warning: 1987 parsing failures. 2017-08-01 22:13:59 row # A tibble: 5 x 5 col row col expected actual expected actual 1 7979 C39_LM no trailing characters 8 file 2 7980 C39_LM no trailing characters 8 row 3 7986 C39_LM no trailing characters 8 col 4 7987 C39_LM no trailing characters 31 expected 5 7990 C39_LM no trailing characters 2 actual # ... with 1 more variables: file 2017-08-01 22:13:59 ... ................. ... ............................................ ........ ............................................ ...... ............................................ .... ............................................ ... ............................................ ... ............................................ ........ ............................................ ...... ....................................... 2017-08-01 22:13:59 See problems(...) for more details. 2017-08-01 22:13:59 2017-08-01 22:14:01 nsfg catalog entry 5 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/1982FemResp.rds' 2017-08-01 22:14:01 2017-08-01 22:14:01 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/1988FemRespSetup.sas' 2017-08-01 22:14:01 cached in 2017-08-01 22:14:01 'E:/eanthony/r-tmp/nsfg/0ae8093ebb4a96aeafd1a9cbfeea2732.Rcache' 2017-08-01 22:14:01 copying to 2017-08-01 22:14:01 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:14:01 2017-08-01 22:14:17 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/1988FemRespData.dat' 2017-08-01 22:14:17 cached in 2017-08-01 22:14:17 'E:/eanthony/r-tmp/nsfg/044ead4abe8752c66f9f4567ba0666df.Rcache' 2017-08-01 22:14:17 copying to 2017-08-01 22:14:17 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:14:17 2017-08-01 22:16:30 Warning: 378812 parsing failures. 2017-08-01 22:16:30 row # A tibble: 5 x 5 col row col expected actual expected actual 1 1 E31MO no trailing characters 44 file 2 1 E41MO no trailing characters 5 row 3 1 F19M2MO no trailing characters 10 col 4 1 AGEDISS no trailing characters 0 expected 5 1 FMAR1MO no trailing characters 0 actual # ... with 1 more variables: file 2017-08-01 22:16:30 ... ................. ... ............................................. ........ ............................................. ...... ............................................. .... ............................................. ... ............................................. ... ............................................. ........ ............................................. ...... ....................................... 2017-08-01 22:16:30 See problems(...) for more details. 2017-08-01 22:16:30 2017-08-01 22:16:37 nsfg catalog entry 6 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/1988FemRespData.rds' 2017-08-01 22:16:37 2017-08-01 22:16:37 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/1988PregSetup.sas' 2017-08-01 22:16:37 cached in 2017-08-01 22:16:37 'E:/eanthony/r-tmp/nsfg/e122d5dc851578da0c7e450321a7c982.Rcache' 2017-08-01 22:16:37 copying to 2017-08-01 22:16:37 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:16:37 2017-08-01 22:16:43 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/1988PregData.dat' 2017-08-01 22:16:43 cached in 2017-08-01 22:16:43 'E:/eanthony/r-tmp/nsfg/33ae9e4a238560f9ba7a2058a40644d4.Rcache' 2017-08-01 22:16:43 copying to 2017-08-01 22:16:43 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:16:43 2017-08-01 22:22:19 nsfg catalog entry 7 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/1988PregData.rds' 2017-08-01 22:22:19 2017-08-01 22:22:19 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/1995FemRespSetup.sas' 2017-08-01 22:22:19 cached in 2017-08-01 22:22:19 'E:/eanthony/r-tmp/nsfg/e5b1dbcb6861cb80299c3473b9047576.Rcache' 2017-08-01 22:22:19 copying to 2017-08-01 22:22:19 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:22:19 2017-08-01 22:22:53 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/1995FemRespData.dat' 2017-08-01 22:22:53 cached in 2017-08-01 22:22:53 'E:/eanthony/r-tmp/nsfg/6251ee2be978a34dc8a590ed67e4069b.Rcache' 2017-08-01 22:22:53 copying to 2017-08-01 22:22:53 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:22:53 2017-08-01 22:33:08 Warning: 28991 parsing failures. 2017-08-01 22:33:08 row # A tibble: 5 x 5 col row col expected actual expected actual 1 1 FIADOPT 1 chars 0 file 2 1 5814 columns 5731 columns row 3 2 FIADOPT 1 chars 0 col 4 2 5814 columns 5731 columns expected 5 3 FIADOPT 1 chars 0 actual # ... with 1 more variables: file 2017-08-01 22:33:08 ... ................. ... ......................................... ........ ......................................... ...... ......................................... .... ......................................... ... ......................................... ... ......................................... ........ ......................................... ...... ....................................... 2017-08-01 22:33:08 See problems(...) for more details. 2017-08-01 22:33:08 2017-08-01 22:33:17 nsfg catalog entry 8 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/1995FemRespData.rds' 2017-08-01 22:33:17 2017-08-01 22:33:17 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/1995FemPregFile.sas' 2017-08-01 22:33:17 cached in 2017-08-01 22:33:17 'E:/eanthony/r-tmp/nsfg/48772b0281246501cca2d71c6f30f264.Rcache' 2017-08-01 22:33:17 copying to 2017-08-01 22:33:17 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:33:17 2017-08-01 22:33:19 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/1995PregData.dat' 2017-08-01 22:33:19 cached in 2017-08-01 22:33:19 'E:/eanthony/r-tmp/nsfg/ab2cc4b50d70989cce30e0d5c66ac0d8.Rcache' 2017-08-01 22:33:19 copying to 2017-08-01 22:33:19 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:33:19 2017-08-01 22:34:09 nsfg catalog entry 9 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/1995PregData.rds' 2017-08-01 22:34:09 2017-08-01 22:34:09 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/2002FemPregInput.sas' 2017-08-01 22:34:09 cached in 2017-08-01 22:34:09 'E:/eanthony/r-tmp/nsfg/a5494486ae5e0b273422d039aa819bb5.Rcache' 2017-08-01 22:34:09 copying to 2017-08-01 22:34:09 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:34:09 2017-08-01 22:34:10 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/2002FemPreg.dat' 2017-08-01 22:34:10 cached in 2017-08-01 22:34:10 'E:/eanthony/r-tmp/nsfg/e8b279dfb7a0ac12a1dd4863deb1bed1.Rcache' 2017-08-01 22:34:10 copying to 2017-08-01 22:34:10 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:34:10 2017-08-01 22:34:33 nsfg catalog entry 10 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/2002FemPreg.rds' 2017-08-01 22:34:33 2017-08-01 22:34:33 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/2002FemRespInput.sas' 2017-08-01 22:34:33 cached in 2017-08-01 22:34:33 'E:/eanthony/r-tmp/nsfg/0791c7d1d883aa5a2d98cfa5881fad9b.Rcache' 2017-08-01 22:34:33 copying to 2017-08-01 22:34:33 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:34:33 2017-08-01 22:34:36 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/2002FemResp.dat' 2017-08-01 22:34:36 cached in 2017-08-01 22:34:36 'E:/eanthony/r-tmp/nsfg/56bc5c5edf238ea62377eaa1552e935a.Rcache' 2017-08-01 22:34:36 copying to 2017-08-01 22:34:36 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:34:36 2017-08-01 22:37:19 nsfg catalog entry 11 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/2002FemResp.rds' 2017-08-01 22:37:19 2017-08-01 22:37:19 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/2002HHvars.SAS' 2017-08-01 22:37:19 cached in 2017-08-01 22:37:19 'E:/eanthony/r-tmp/nsfg/3ca8c2964dfe66cf58d6c99f8963a0f3.Rcache' 2017-08-01 22:37:19 copying to 2017-08-01 22:37:19 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:37:19 2017-08-01 22:37:20 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/2002HHvars.dat' 2017-08-01 22:37:20 cached in 2017-08-01 22:37:20 'E:/eanthony/r-tmp/nsfg/95d0c75ddabfc30c5ed11e0e7729ddf8.Rcache' 2017-08-01 22:37:20 copying to 2017-08-01 22:37:20 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:37:20 2017-08-01 22:37:21 nsfg catalog entry 12 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/2002HHvars.rds' 2017-08-01 22:37:21 2017-08-01 22:37:21 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/2002MaleInput.sas' 2017-08-01 22:37:21 cached in 2017-08-01 22:37:21 'E:/eanthony/r-tmp/nsfg/15aaee7c049fc9deb5411ccbb87c8fdd.Rcache' 2017-08-01 22:37:21 copying to 2017-08-01 22:37:21 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:37:21 2017-08-01 22:37:22 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/2002Male.dat' 2017-08-01 22:37:22 cached in 2017-08-01 22:37:22 'E:/eanthony/r-tmp/nsfg/4f219375a7e81d2a51d0e58490c3de40.Rcache' 2017-08-01 22:37:22 copying to 2017-08-01 22:37:22 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:37:22 2017-08-01 22:38:14 nsfg catalog entry 13 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/2002Male.rds' 2017-08-01 22:38:14 2017-08-01 22:38:14 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/2006_2010_FemPregSetup.sas' 2017-08-01 22:38:14 cached in 2017-08-01 22:38:14 'E:/eanthony/r-tmp/nsfg/5df7015a59da2ab56d48448f860d66d9.Rcache' 2017-08-01 22:38:14 copying to 2017-08-01 22:38:14 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:38:14 2017-08-01 22:38:15 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/2006_2010_FemPreg.dat' 2017-08-01 22:38:15 cached in 2017-08-01 22:38:15 'E:/eanthony/r-tmp/nsfg/f41a853b5a9fd891ed53437b45bfc2e2.Rcache' 2017-08-01 22:38:15 copying to 2017-08-01 22:38:15 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:38:15 2017-08-01 22:38:41 nsfg catalog entry 14 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/2006_2010_FemPreg.rds' 2017-08-01 22:38:41 2017-08-01 22:38:41 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/2006_2010_FemRespSetup.sas' 2017-08-01 22:38:41 cached in 2017-08-01 22:38:41 'E:/eanthony/r-tmp/nsfg/7d15050aff61059680c7c315bda4e49b.Rcache' 2017-08-01 22:38:41 copying to 2017-08-01 22:38:41 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:38:41 2017-08-01 22:38:48 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/2006_2010_FemResp.dat' 2017-08-01 22:38:48 cached in 2017-08-01 22:38:48 'E:/eanthony/r-tmp/nsfg/ddbf14c168a5ee977c80fee003769192.Rcache' 2017-08-01 22:38:48 copying to 2017-08-01 22:38:48 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:38:48 2017-08-01 22:42:25 nsfg catalog entry 15 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/2006_2010_FemResp.rds' 2017-08-01 22:42:25 2017-08-01 22:42:25 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/2006_2010_MaleSetup.sas' 2017-08-01 22:42:25 cached in 2017-08-01 22:42:25 'E:/eanthony/r-tmp/nsfg/1b158490f002be943c1e6b2b33fad2bf.Rcache' 2017-08-01 22:42:25 copying to 2017-08-01 22:42:25 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:42:25 2017-08-01 22:42:29 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/2006_2010_Male.dat' 2017-08-01 22:42:29 cached in 2017-08-01 22:42:29 'E:/eanthony/r-tmp/nsfg/8d64debb9db83925c8a06cfda6530dae.Rcache' 2017-08-01 22:42:29 copying to 2017-08-01 22:42:29 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:42:29 2017-08-01 22:44:18 nsfg catalog entry 16 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/2006_2010_Male.rds' 2017-08-01 22:44:18 2017-08-01 22:44:18 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/2011_2013_FemPregSetup.sas' 2017-08-01 22:44:18 cached in 2017-08-01 22:44:18 'E:/eanthony/r-tmp/nsfg/9f3cd01b5e16618aad8fec82425bb1c6.Rcache' 2017-08-01 22:44:18 copying to 2017-08-01 22:44:18 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:44:18 2017-08-01 22:44:19 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/2011_2013_FemPregData.dat' 2017-08-01 22:44:19 cached in 2017-08-01 22:44:19 'E:/eanthony/r-tmp/nsfg/a1aa18c13b256739d29000180a011806.Rcache' 2017-08-01 22:44:19 copying to 2017-08-01 22:44:19 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:44:19 2017-08-01 22:44:49 nsfg catalog entry 17 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/2011_2013_FemPregData.rds' 2017-08-01 22:44:49 2017-08-01 22:44:49 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/2011_2013_FemRespSetup.sas' 2017-08-01 22:44:49 cached in 2017-08-01 22:44:49 'E:/eanthony/r-tmp/nsfg/b4918c70ff8d03fdf041871f337ab278.Rcache' 2017-08-01 22:44:49 copying to 2017-08-01 22:44:49 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:44:49 2017-08-01 22:44:56 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/2011_2013_FemRespData.dat' 2017-08-01 22:44:56 cached in 2017-08-01 22:44:56 'E:/eanthony/r-tmp/nsfg/027913d34870354960c2b190f8994184.Rcache' 2017-08-01 22:44:56 copying to 2017-08-01 22:44:56 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:44:56 2017-08-01 22:46:13 nsfg catalog entry 18 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/2011_2013_FemRespData.rds' 2017-08-01 22:46:13 2017-08-01 22:46:13 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/2011_2013_MaleSetup.sas' 2017-08-01 22:46:13 cached in 2017-08-01 22:46:13 'E:/eanthony/r-tmp/nsfg/d8d9cd2706b0180053ffa711f43f9758.Rcache' 2017-08-01 22:46:13 copying to 2017-08-01 22:46:13 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:46:13 2017-08-01 22:46:25 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/2011_2013_MaleData.dat' 2017-08-01 22:46:25 cached in 2017-08-01 22:46:25 'E:/eanthony/r-tmp/nsfg/d52fd61e8806a23c26cd85c993dbea21.Rcache' 2017-08-01 22:46:25 copying to 2017-08-01 22:46:25 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:46:25 2017-08-01 22:47:23 nsfg catalog entry 19 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/2011_2013_MaleData.rds' 2017-08-01 22:47:23 2017-08-01 22:47:23 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/2011_2015_4YearWeightSetup.sas' 2017-08-01 22:47:23 cached in 2017-08-01 22:47:23 'E:/eanthony/r-tmp/nsfg/f72bf5d3b7d0e0f9182565f5a6c3792a.Rcache' 2017-08-01 22:47:23 copying to 2017-08-01 22:47:23 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:47:23 2017-08-01 22:47:23 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/2011_2015_FemaleWeight.dat' 2017-08-01 22:47:23 cached in 2017-08-01 22:47:23 'E:/eanthony/r-tmp/nsfg/e73cb43ad553c528f0297f3609c6c4c4.Rcache' 2017-08-01 22:47:23 copying to 2017-08-01 22:47:23 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:47:23 2017-08-01 22:47:24 nsfg catalog entry 20 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/2011_2015_FemaleWeight.rds' 2017-08-01 22:47:24 2017-08-01 22:47:24 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/2011_2015_4YearWeightSetup.sas' 2017-08-01 22:47:24 cached in 2017-08-01 22:47:24 'E:/eanthony/r-tmp/nsfg/f72bf5d3b7d0e0f9182565f5a6c3792a.Rcache' 2017-08-01 22:47:24 copying to 2017-08-01 22:47:24 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:47:24 2017-08-01 22:47:24 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/2011_2015_MaleWeight.dat' 2017-08-01 22:47:24 cached in 2017-08-01 22:47:24 'E:/eanthony/r-tmp/nsfg/7ba54a5ebb2c4865b8bf6fc6f5030be9.Rcache' 2017-08-01 22:47:24 copying to 2017-08-01 22:47:24 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:47:24 2017-08-01 22:47:26 nsfg catalog entry 21 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/2011_2015_MaleWeight.rds' 2017-08-01 22:47:26 2017-08-01 22:47:26 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/2013_2015_FemPregSetup.sas' 2017-08-01 22:47:26 cached in 2017-08-01 22:47:26 'E:/eanthony/r-tmp/nsfg/1df14c8c6f0c1679bbe9b3faa9d38df2.Rcache' 2017-08-01 22:47:26 copying to 2017-08-01 22:47:26 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:47:26 2017-08-01 22:47:27 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/2013_2015_FemPregData.dat' 2017-08-01 22:47:27 cached in 2017-08-01 22:47:27 'E:/eanthony/r-tmp/nsfg/64cda4fd54dddc2f441a568964909365.Rcache' 2017-08-01 22:47:27 copying to 2017-08-01 22:47:27 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:47:27 2017-08-01 22:47:49 nsfg catalog entry 22 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/2013_2015_FemPregData.rds' 2017-08-01 22:47:49 2017-08-01 22:47:49 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/2013_2015_FemRespSetup.sas' 2017-08-01 22:47:49 cached in 2017-08-01 22:47:49 'E:/eanthony/r-tmp/nsfg/5f1672fe165b01a5263bcd9f0b3fb978.Rcache' 2017-08-01 22:47:49 copying to 2017-08-01 22:47:49 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:47:49 2017-08-01 22:47:56 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/2013_2015_FemRespData.dat' 2017-08-01 22:47:56 cached in 2017-08-01 22:47:56 'E:/eanthony/r-tmp/nsfg/8c9846a7c7ab096e590a84e883fb868c.Rcache' 2017-08-01 22:47:56 copying to 2017-08-01 22:47:56 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:47:56 2017-08-01 22:49:51 nsfg catalog entry 23 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/2013_2015_FemRespData.rds' 2017-08-01 22:49:51 2017-08-01 22:49:51 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/sas/2013_2015_MaleSetup.sas' 2017-08-01 22:49:51 cached in 2017-08-01 22:49:51 'E:/eanthony/r-tmp/nsfg/92fe9382a48c7f729e520e55e61645b5.Rcache' 2017-08-01 22:49:51 copying to 2017-08-01 22:49:51 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd07f5526f3' 2017-08-01 22:49:51 2017-08-01 22:50:22 'ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NSFG/2013_2015_MaleData.dat' 2017-08-01 22:50:22 cached in 2017-08-01 22:50:22 'E:/eanthony/r-tmp/nsfg/78bd91584c27b59ac4061a4f02cbf552.Rcache' 2017-08-01 22:50:22 copying to 2017-08-01 22:50:22 'E:\eanthony\r-tmp\nsfg\Rtmp4QtAzx\file3fd06d5c25c' 2017-08-01 22:50:22 2017-08-01 22:51:34 nsfg catalog entry 24 of 24 stored at 'e:/eanthony/r-wd/nsfg-1501649007/2013_2015_MaleData.rds' 2017-08-01 22:51:34 2017-08-01 22:51:34 nsfg local download completed 2017-08-01 22:51:34 2017-08-01 22:51:34 There were 12 warnings (use warnings() to see them) 2017-08-01 22:51:34 > 2017-08-01 22:51:34 2017-08-01 22:51:34 R version 3.4.0 (2017-04-21) -- "You Stupid Darkness" 2017-08-01 22:51:34 Copyright (C) 2017 The R Foundation for Statistical Computing 2017-08-01 22:51:34 Platform: x86_64-w64-mingw32/x64 (64-bit) 2017-08-01 22:51:34 2017-08-01 22:51:34 R is free software and comes with ABSOLUTELY NO WARRANTY. 2017-08-01 22:51:34 You are welcome to redistribute it under certain conditions. 2017-08-01 22:51:34 Type 'license()' or 'licence()' for distribution details. 2017-08-01 22:51:34 2017-08-01 22:51:34 Natural language support but running in an English locale 2017-08-01 22:51:34 2017-08-01 22:51:34 R is a collaborative project with many contributors. 2017-08-01 22:51:34 Type 'contributors()' for more information and 2017-08-01 22:51:34 'citation()' on how to cite R or R packages in publications. 2017-08-01 22:51:34 2017-08-01 22:51:34 Type 'demo()' for some demos, 'help()' for on-line help, or 2017-08-01 22:51:34 'help.start()' for an HTML browser interface to help. 2017-08-01 22:51:34 Type 'q()' to quit R. 2017-08-01 22:51:34 2017-08-01 22:51:35 > setwd( Sys.getenv( "RWD" ) ) 2017-08-01 22:51:35 > 2017-08-01 22:51:35 > machine_specific_replacements <- 2017-08-01 22:51:35 + list( 2017-08-01 22:51:35 + 2017-08-01 22:51:35 + # replace the folder path on macnix 2017-08-01 22:51:35 + c( 'path.expand( \"~\" ) , \"NSFG\"' , paste0( '"' , getwd() , '"' ) ) , 2017-08-01 22:51:35 + 2017-08-01 22:51:35 + # change other things in the script to be run 2017-08-01 22:51:35 + c( "hello" , "howdy" ) 2017-08-01 22:51:35 + 2017-08-01 22:51:35 + ) 2017-08-01 22:51:35 > 2017-08-01 22:51:35 > source( lodown::syntaxtractor( "nsfg" , replacements = machine_specific_replacements , setup_test = "test" ) , echo = TRUE ) 2017-08-01 22:51:36 2017-08-01 22:51:36 > library(lodown) 2017-08-01 22:51:36 2017-08-01 22:51:36 > nsfg_cat <- get_catalog("nsfg", output_dir = file.path("e:/eanthony/r-wd/nsfg-1501649007")) 2017-08-01 22:51:36 building catalog for nsfg 2017-08-01 22:51:36 2017-08-01 22:51:39 2017-08-01 22:51:39 > nsfg_cat <- subset(nsfg_cat, grepl("2013_2015", full_url)) 2017-08-01 22:51:39 2017-08-01 22:51:39 > stopifnot(nrow(nsfg_cat) > 0) 2017-08-01 22:51:39 2017-08-01 22:51:39 > options(survey.lonely.psu = "adjust") 2017-08-01 22:51:39 2017-08-01 22:51:39 > library(survey) 2017-08-01 22:51:39 Loading required package: grid 2017-08-01 22:51:40 Loading required package: Matrix 2017-08-01 22:51:41 Loading required package: survival 2017-08-01 22:51:41 2017-08-01 22:51:41 Attaching package: 'survey' 2017-08-01 22:51:41 2017-08-01 22:51:41 The following object is masked from 'package:graphics': 2017-08-01 22:51:41 2017-08-01 22:51:41 dotchart 2017-08-01 22:51:41 2017-08-01 22:51:41 2017-08-01 22:51:41 > nsfg_df <- readRDS(file.path("e:/eanthony/r-wd/nsfg-1501649007", 2017-08-01 22:51:41 + "2013_2015_FemRespData.rds")) 2017-08-01 22:51:42 2017-08-01 22:51:42 > nsfg_design <- svydesign(id = ~secu, strata = ~sest, 2017-08-01 22:51:42 + data = nsfg_df, weights = ~wgt2013_2015, nest = TRUE) 2017-08-01 22:51:43 2017-08-01 22:51:43 > nsfg_design <- update(nsfg_design, one = 1, birth_control_pill = as.numeric(constat1 == 2017-08-01 22:51:43 + 6), age_categories = factor(findInterval(ager, c(15, .... [TRUNCATED] 2017-08-01 22:51:43 2017-08-01 22:51:43 > sum(weights(nsfg_design, "sampling") != 0) 2017-08-01 22:51:43 [1] 5699 2017-08-01 22:51:43 2017-08-01 22:51:43 > svyby(~one, ~age_categories, nsfg_design, unwtd.count) 2017-08-01 22:51:44 age_categories counts se 2017-08-01 22:51:44 15-19 15-19 1010 0 2017-08-01 22:51:44 20-24 20-24 953 0 2017-08-01 22:51:44 25-29 25-29 1047 0 2017-08-01 22:51:44 30-34 30-34 1035 0 2017-08-01 22:51:44 35-39 35-39 873 0 2017-08-01 22:51:44 40-44 40-44 781 0 2017-08-01 22:51:44 2017-08-01 22:51:44 > svytotal(~one, nsfg_design) 2017-08-01 22:51:44 total SE 2017-08-01 22:51:44 one 61491766 2611759 2017-08-01 22:51:44 2017-08-01 22:51:44 > svyby(~one, ~age_categories, nsfg_design, svytotal) 2017-08-01 22:51:45 age_categories one se 2017-08-01 22:51:45 15-19 15-19 9426382 536558.7 2017-08-01 22:51:45 20-24 20-24 10472125 815824.6 2017-08-01 22:51:45 25-29 25-29 10724623 569294.9 2017-08-01 22:51:45 30-34 30-34 10646711 678580.1 2017-08-01 22:51:45 35-39 35-39 9917768 578726.5 2017-08-01 22:51:45 40-44 40-44 10304157 803784.2 2017-08-01 22:51:45 2017-08-01 22:51:45 > svymean(~npregs_s, nsfg_design, na.rm = TRUE) 2017-08-01 22:51:45 mean SE 2017-08-01 22:51:45 npregs_s 1.6886 0.0581 2017-08-01 22:51:45 2017-08-01 22:51:45 > svyby(~npregs_s, ~age_categories, nsfg_design, svymean, 2017-08-01 22:51:45 + na.rm = TRUE) 2017-08-01 22:51:46 age_categories npregs_s se 2017-08-01 22:51:46 15-19 15-19 0.1044526 0.01747426 2017-08-01 22:51:46 20-24 20-24 0.6760492 0.07212752 2017-08-01 22:51:46 25-29 25-29 1.5442176 0.10256152 2017-08-01 22:51:46 30-34 30-34 2.2417327 0.09220219 2017-08-01 22:51:46 35-39 35-39 2.7476990 0.22007088 2017-08-01 22:51:46 40-44 40-44 2.7225015 0.09713659 2017-08-01 22:51:46 2017-08-01 22:51:46 > svymean(~marstat, nsfg_design) 2017-08-01 22:51:47 mean 2017-08-01 22:51:47 marstatMarried to a person of the opposite sex 0.38115505 2017-08-01 22:51:47 marstatNot married but living together with a partner of the opposite sex 0.14597780 2017-08-01 22:51:47 marstatWidowed 0.00202044 2017-08-01 22:51:47 marstatDivorced or annulled 0.04837955 2017-08-01 22:51:47 marstatSeparated, because you and your spouse are not getting along 0.02536482 2017-08-01 22:51:47 marstatNever been married 0.39663715 2017-08-01 22:51:47 marstatRefused 0.00000000 2017-08-01 22:51:47 marstatDon't know 0.00046518 2017-08-01 22:51:47 SE 2017-08-01 22:51:47 marstatMarried to a person of the opposite sex 0.0108 2017-08-01 22:51:47 marstatNot married but living together with a partner of the opposite sex 0.0077 2017-08-01 22:51:47 marstatWidowed 0.0006 2017-08-01 22:51:47 marstatDivorced or annulled 0.0043 2017-08-01 22:51:47 marstatSeparated, because you and your spouse are not getting along 0.0030 2017-08-01 22:51:47 marstatNever been married 0.0113 2017-08-01 22:51:47 marstatRefused 0.0000 2017-08-01 22:51:47 marstatDon't know 0.0003 2017-08-01 22:51:47 2017-08-01 22:51:47 > svyby(~marstat, ~age_categories, nsfg_design, svymean) 2017-08-01 22:51:47 age_categories marstatMarried to a person of the opposite sex 2017-08-01 22:51:47 15-19 15-19 0.006900736 2017-08-01 22:51:47 20-24 20-24 0.136181528 2017-08-01 22:51:47 25-29 25-29 0.365847960 2017-08-01 22:51:47 30-34 30-34 0.532438288 2017-08-01 22:51:47 35-39 35-39 0.608289555 2017-08-01 22:51:47 40-44 40-44 0.613496624 2017-08-01 22:51:47 marstatNot married but living together with a partner of the opposite sex 2017-08-01 22:51:47 15-19 0.03761569 2017-08-01 22:51:47 20-24 0.21739485 2017-08-01 22:51:47 25-29 0.23339480 2017-08-01 22:51:47 30-34 0.15634098 2017-08-01 22:51:47 35-39 0.12358063 2017-08-01 22:51:47 40-44 0.09239324 2017-08-01 22:51:47 marstatWidowed marstatDivorced or annulled 2017-08-01 22:51:47 15-19 0.0000000000 0.000000000 2017-08-01 22:51:47 20-24 0.0000000000 0.006075908 2017-08-01 22:51:47 25-29 0.0007725922 0.028797700 2017-08-01 22:51:47 30-34 0.0013146841 0.054400961 2017-08-01 22:51:47 35-39 0.0031270716 0.070894555 2017-08-01 22:51:47 40-44 0.0068849863 0.128119656 2017-08-01 22:51:47 marstatSeparated, because you and your spouse are not getting along 2017-08-01 22:51:47 15-19 0.00000000 2017-08-01 22:51:47 20-24 0.01319865 2017-08-01 22:51:47 25-29 0.02627488 2017-08-01 22:51:47 30-34 0.03798614 2017-08-01 22:51:47 35-39 0.03736612 2017-08-01 22:51:47 40-44 0.03539401 2017-08-01 22:51:47 marstatNever been married marstatRefused marstatDon't know 2017-08-01 22:51:47 15-19 0.9554836 0 0.0000000000 2017-08-01 22:51:47 20-24 0.6271491 0 0.0000000000 2017-08-01 22:51:47 25-29 0.3449121 0 0.0000000000 2017-08-01 22:51:47 30-34 0.2157851 0 0.0017338829 2017-08-01 22:51:47 35-39 0.1567421 0 0.0000000000 2017-08-01 22:51:47 40-44 0.1227270 0 0.0009845235 2017-08-01 22:51:47 se.marstatMarried to a person of the opposite sex 2017-08-01 22:51:47 15-19 0.003390952 2017-08-01 22:51:47 20-24 0.018318235 2017-08-01 22:51:47 25-29 0.019349042 2017-08-01 22:51:47 30-34 0.025450057 2017-08-01 22:51:47 35-39 0.026416885 2017-08-01 22:51:47 40-44 0.021385228 2017-08-01 22:51:47 se.marstatNot married but living together with a partner of the opposite sex 2017-08-01 22:51:47 15-19 0.007822393 2017-08-01 22:51:47 20-24 0.021938392 2017-08-01 22:51:47 25-29 0.019776757 2017-08-01 22:51:47 30-34 0.016349854 2017-08-01 22:51:47 35-39 0.016438784 2017-08-01 22:51:47 40-44 0.014179930 2017-08-01 22:51:47 se.marstatWidowed se.marstatDivorced or annulled 2017-08-01 22:51:47 15-19 0.0000000000 0.000000000 2017-08-01 22:51:47 20-24 0.0000000000 0.002152415 2017-08-01 22:51:47 25-29 0.0007753056 0.006478277 2017-08-01 22:51:47 30-34 0.0009241929 0.008628707 2017-08-01 22:51:47 35-39 0.0019157851 0.011930366 2017-08-01 22:51:47 40-44 0.0031139702 0.018144051 2017-08-01 22:51:47 se.marstatSeparated, because you and your spouse are not getting along 2017-08-01 22:51:47 15-19 0.000000000 2017-08-01 22:51:47 20-24 0.007381398 2017-08-01 22:51:47 25-29 0.007673585 2017-08-01 22:51:47 30-34 0.006612985 2017-08-01 22:51:47 35-39 0.011237441 2017-08-01 22:51:47 40-44 0.009404115 2017-08-01 22:51:47 se.marstatNever been married se.marstatRefused se.marstatDon't know 2017-08-01 22:51:47 15-19 0.008124667 0 0.0000000000 2017-08-01 22:51:47 20-24 0.026407025 0 0.0000000000 2017-08-01 22:51:47 25-29 0.023354651 0 0.0000000000 2017-08-01 22:51:47 30-34 0.018386686 0 0.0017364316 2017-08-01 22:51:47 35-39 0.018161198 0 0.0000000000 2017-08-01 22:51:47 40-44 0.014918586 0 0.0009991063 2017-08-01 22:51:47 2017-08-01 22:51:47 > svytotal(~npregs_s, nsfg_design, na.rm = TRUE) 2017-08-01 22:51:47 total SE 2017-08-01 22:51:47 npregs_s 103768306 6000597 2017-08-01 22:51:47 2017-08-01 22:51:47 > svyby(~npregs_s, ~age_categories, nsfg_design, svytotal, 2017-08-01 22:51:47 + na.rm = TRUE) 2017-08-01 22:51:49 age_categories npregs_s se 2017-08-01 22:51:49 15-19 15-19 982642.8 156593.9 2017-08-01 22:51:49 20-24 20-24 7071761.0 810463.0 2017-08-01 22:51:49 25-29 25-29 16561151.6 1340015.1 2017-08-01 22:51:49 30-34 30-34 23862178.3 1797726.9 2017-08-01 22:51:49 35-39 35-39 27251041.4 2835483.9 2017-08-01 22:51:49 40-44 40-44 28039531.2 2443407.0 2017-08-01 22:51:49 2017-08-01 22:51:49 > svytotal(~marstat, nsfg_design) 2017-08-01 22:51:49 total 2017-08-01 22:51:49 marstatMarried to a person of the opposite sex 23437897 2017-08-01 22:51:49 marstatNot married but living together with a partner of the opposite sex 8976433 2017-08-01 22:51:49 marstatWidowed 124240 2017-08-01 22:51:49 marstatDivorced or annulled 2974944 2017-08-01 22:51:49 marstatSeparated, because you and your spouse are not getting along 1559728 2017-08-01 22:51:49 marstatNever been married 24389919 2017-08-01 22:51:49 marstatRefused 0 2017-08-01 22:51:49 marstatDon't know 28605 2017-08-01 22:51:49 SE 2017-08-01 22:51:49 marstatMarried to a person of the opposite sex 1259554 2017-08-01 22:51:49 marstatNot married but living together with a partner of the opposite sex 576348 2017-08-01 22:51:49 marstatWidowed 36342 2017-08-01 22:51:49 marstatDivorced or annulled 310785 2017-08-01 22:51:49 marstatSeparated, because you and your spouse are not getting along 202381 2017-08-01 22:51:49 marstatNever been married 1172716 2017-08-01 22:51:49 marstatRefused 0 2017-08-01 22:51:49 marstatDon't know 21064 2017-08-01 22:51:49 2017-08-01 22:51:49 > svyby(~marstat, ~age_categories, nsfg_design, svytotal) 2017-08-01 22:51:49 age_categories marstatMarried to a person of the opposite sex 2017-08-01 22:51:49 15-19 15-19 65048.97 2017-08-01 22:51:49 20-24 20-24 1426109.99 2017-08-01 22:51:49 25-29 25-29 3923581.45 2017-08-01 22:51:49 30-34 30-34 5668716.58 2017-08-01 22:51:49 35-39 35-39 6032874.68 2017-08-01 22:51:49 40-44 40-44 6321565.53 2017-08-01 22:51:49 marstatNot married but living together with a partner of the opposite sex 2017-08-01 22:51:49 15-19 354579.9 2017-08-01 22:51:49 20-24 2276586.0 2017-08-01 22:51:49 25-29 2503071.2 2017-08-01 22:51:49 30-34 1664517.3 2017-08-01 22:51:49 35-39 1225644.1 2017-08-01 22:51:49 40-44 952034.4 2017-08-01 22:51:49 marstatWidowed marstatDivorced or annulled 2017-08-01 22:51:49 15-19 0.00 0.00 2017-08-01 22:51:49 20-24 0.00 63627.67 2017-08-01 22:51:49 25-29 8285.76 308844.47 2017-08-01 22:51:49 30-34 13997.06 579191.31 2017-08-01 22:51:49 35-39 31013.57 703115.75 2017-08-01 22:51:49 40-44 70943.98 1320165.05 2017-08-01 22:51:49 marstatSeparated, because you and your spouse are not getting along 2017-08-01 22:51:49 15-19 0.0 2017-08-01 22:51:49 20-24 138217.9 2017-08-01 22:51:49 25-29 281788.2 2017-08-01 22:51:49 30-34 404427.5 2017-08-01 22:51:49 35-39 370588.5 2017-08-01 22:51:49 40-44 364705.5 2017-08-01 22:51:49 marstatNever been married marstatRefused marstatDon't know 2017-08-01 22:51:49 15-19 9006753 0 0.00 2017-08-01 22:51:49 20-24 6567583 0 0.00 2017-08-01 22:51:49 25-29 3699052 0 0.00 2017-08-01 22:51:49 30-34 2297401 0 18460.15 2017-08-01 22:51:49 35-39 1554531 0 0.00 2017-08-01 22:51:49 40-44 1264598 0 10144.68 2017-08-01 22:51:49 se.marstatMarried to a person of the opposite sex 2017-08-01 22:51:49 15-19 32383.29 2017-08-01 22:51:49 20-24 204366.54 2017-08-01 22:51:49 25-29 289505.17 2017-08-01 22:51:49 30-34 470695.57 2017-08-01 22:51:49 35-39 423584.86 2017-08-01 22:51:49 40-44 536439.31 2017-08-01 22:51:49 se.marstatNot married but living together with a partner of the opposite sex 2017-08-01 22:51:49 15-19 69688.02 2017-08-01 22:51:49 20-24 281190.89 2017-08-01 22:51:49 25-29 256580.07 2017-08-01 22:51:49 30-34 202020.85 2017-08-01 22:51:49 35-39 182611.17 2017-08-01 22:51:49 40-44 150829.24 2017-08-01 22:51:49 se.marstatWidowed se.marstatDivorced or annulled 2017-08-01 22:51:49 15-19 0.000 0.00 2017-08-01 22:51:49 20-24 0.000 22608.09 2017-08-01 22:51:49 25-29 8285.760 71931.34 2017-08-01 22:51:49 30-34 9923.848 83623.66 2017-08-01 22:51:49 35-39 18770.621 126686.83 2017-08-01 22:51:49 40-44 32043.253 237825.31 2017-08-01 22:51:49 se.marstatSeparated, because you and your spouse are not getting along 2017-08-01 22:51:49 15-19 0.00 2017-08-01 22:51:49 20-24 77863.07 2017-08-01 22:51:49 25-29 81189.42 2017-08-01 22:51:49 30-34 73645.26 2017-08-01 22:51:49 35-39 119184.99 2017-08-01 22:51:49 40-44 101670.52 2017-08-01 22:51:49 se.marstatNever been married se.marstatRefused se.marstatDon't know 2017-08-01 22:51:49 15-19 540336.1 0 0.00 2017-08-01 22:51:49 20-24 625062.4 0 0.00 2017-08-01 22:51:49 25-29 322064.3 0 0.00 2017-08-01 22:51:49 30-34 257059.8 0 18460.15 2017-08-01 22:51:49 35-39 190349.2 0 0.00 2017-08-01 22:51:49 40-44 172217.9 0 10144.68 2017-08-01 22:51:49 2017-08-01 22:51:49 > svyquantile(~npregs_s, nsfg_design, 0.5, na.rm = TRUE) 2017-08-01 22:51:49 0.5 2017-08-01 22:51:49 npregs_s 1 2017-08-01 22:51:49 2017-08-01 22:51:49 > svyby(~npregs_s, ~age_categories, nsfg_design, svyquantile, 2017-08-01 22:51:49 + 0.5, ci = TRUE, keep.var = TRUE, na.rm = TRUE) 2017-08-01 22:51:51 age_categories npregs_s se 2017-08-01 22:51:51 15-19 15-19 0 0.0000000 2017-08-01 22:51:51 20-24 20-24 0 0.0000000 2017-08-01 22:51:51 25-29 25-29 1 0.0000000 2017-08-01 22:51:51 30-34 30-34 2 0.0000000 2017-08-01 22:51:51 35-39 35-39 2 0.2551067 2017-08-01 22:51:51 40-44 40-44 3 0.2551067 2017-08-01 22:51:51 2017-08-01 22:51:51 > svyratio(numerator = ~npregs_s, denominator = ~nbabes_s, 2017-08-01 22:51:51 + nsfg_design, na.rm = TRUE) 2017-08-01 22:51:51 Ratio estimator: svyratio.survey.design2(numerator = ~npregs_s, denominator = ~nbabes_s, 2017-08-01 22:51:51 nsfg_design, na.rm = TRUE) 2017-08-01 22:51:51 Ratios= 2017-08-01 22:51:51 nbabes_s 2017-08-01 22:51:51 npregs_s 1.440832 2017-08-01 22:51:51 SEs= 2017-08-01 22:51:51 nbabes_s 2017-08-01 22:51:51 npregs_s 0.02745592 2017-08-01 22:51:51 2017-08-01 22:51:51 > sub_nsfg_design <- subset(nsfg_design, timescoh > 2017-08-01 22:51:51 + 0) 2017-08-01 22:51:51 2017-08-01 22:51:51 > svymean(~npregs_s, sub_nsfg_design, na.rm = TRUE) 2017-08-01 22:51:51 mean SE 2017-08-01 22:51:51 npregs_s 2.2883 0.0712 2017-08-01 22:51:51 2017-08-01 22:51:51 > this_result <- svymean(~npregs_s, nsfg_design, na.rm = TRUE) 2017-08-01 22:51:51 2017-08-01 22:51:51 > coef(this_result) 2017-08-01 22:51:51 npregs_s 2017-08-01 22:51:51 1.688551 2017-08-01 22:51:51 2017-08-01 22:51:51 > SE(this_result) 2017-08-01 22:51:51 npregs_s 2017-08-01 22:51:51 npregs_s 0.05807052 2017-08-01 22:51:51 2017-08-01 22:51:51 > confint(this_result) 2017-08-01 22:51:51 2.5 % 97.5 % 2017-08-01 22:51:51 npregs_s 1.574734 1.802367 2017-08-01 22:51:51 2017-08-01 22:51:51 > cv(this_result) 2017-08-01 22:51:51 npregs_s 2017-08-01 22:51:51 npregs_s 0.03439075 2017-08-01 22:51:51 2017-08-01 22:51:51 > grouped_result <- svyby(~npregs_s, ~age_categories, 2017-08-01 22:51:51 + nsfg_design, svymean, na.rm = TRUE) 2017-08-01 22:51:52 2017-08-01 22:51:52 > coef(grouped_result) 2017-08-01 22:51:52 15-19 20-24 25-29 30-34 35-39 40-44 2017-08-01 22:51:52 0.1044526 0.6760492 1.5442176 2.2417327 2.7476990 2.7225015 2017-08-01 22:51:52 2017-08-01 22:51:52 > SE(grouped_result) 2017-08-01 22:51:52 [1] 0.01747426 0.07212752 0.10256152 0.09220219 0.22007088 0.09713659 2017-08-01 22:51:52 2017-08-01 22:51:52 > confint(grouped_result) 2017-08-01 22:51:52 2.5 % 97.5 % 2017-08-01 22:51:52 15-19 0.07020364 0.1387015 2017-08-01 22:51:52 20-24 0.53468188 0.8174166 2017-08-01 22:51:52 25-29 1.34320072 1.7452345 2017-08-01 22:51:52 30-34 2.06101974 2.4224457 2017-08-01 22:51:52 35-39 2.31636801 3.1790300 2017-08-01 22:51:52 40-44 2.53211724 2.9128857 2017-08-01 22:51:52 2017-08-01 22:51:52 > cv(grouped_result) 2017-08-01 22:51:52 15-19 20-24 25-29 30-34 35-39 40-44 2017-08-01 22:51:52 0.16729376 0.10668974 0.06641649 0.04112987 0.08009279 0.03567917 2017-08-01 22:51:52 2017-08-01 22:51:52 > degf(nsfg_design) 2017-08-01 22:51:52 [1] 54 2017-08-01 22:51:52 2017-08-01 22:51:52 > svyvar(~npregs_s, nsfg_design, na.rm = TRUE) 2017-08-01 22:51:53 variance SE 2017-08-01 22:51:53 npregs_s 7.9192 2.5882 2017-08-01 22:51:53 2017-08-01 22:51:53 > svymean(~npregs_s, nsfg_design, na.rm = TRUE, deff = TRUE) 2017-08-01 22:51:54 mean SE DEff 2017-08-01 22:51:54 npregs_s 1.688551 0.058071 2.424 2017-08-01 22:51:54 2017-08-01 22:51:54 > svymean(~npregs_s, nsfg_design, na.rm = TRUE, deff = "replace") 2017-08-01 22:51:55 mean SE DEff 2017-08-01 22:51:55 npregs_s 1.688551 0.058071 2.4238 2017-08-01 22:51:55 2017-08-01 22:51:55 > svyciprop(~birth_control_pill, nsfg_design, method = "likelihood", 2017-08-01 22:51:55 + na.rm = TRUE) 2017-08-01 22:52:08 2.5% 97.5% 2017-08-01 22:52:08 birth_control_pill 0.156 0.141 0.17 2017-08-01 22:52:08 2017-08-01 22:52:08 > svyttest(npregs_s ~ birth_control_pill, nsfg_design) 2017-08-01 22:52:08 2017-08-01 22:52:08 Design-based t-test 2017-08-01 22:52:08 2017-08-01 22:52:08 data: npregs_s ~ birth_control_pill 2017-08-01 22:52:08 t = -13.613, df = 53, p-value < 2.2e-16 2017-08-01 22:52:08 alternative hypothesis: true difference in mean is not equal to 0 2017-08-01 22:52:08 sample estimates: 2017-08-01 22:52:08 difference in mean 2017-08-01 22:52:08 -1.068648 2017-08-01 22:52:08 2017-08-01 22:52:08 2017-08-01 22:52:08 > svychisq(~birth_control_pill + marstat, nsfg_design) 2017-08-01 22:52:09 2017-08-01 22:52:09 Pearson's X^2: Rao & Scott adjustment 2017-08-01 22:52:09 2017-08-01 22:52:09 data: svychisq(~birth_control_pill + marstat, nsfg_design) 2017-08-01 22:52:09 F = NaN, ndf = 4.9806, ddf = 268.9500, p-value = NA 2017-08-01 22:52:09 2017-08-01 22:52:09 2017-08-01 22:52:09 > glm_result <- svyglm(npregs_s ~ birth_control_pill + 2017-08-01 22:52:09 + marstat, nsfg_design) 2017-08-01 22:52:09 2017-08-01 22:52:09 > summary(glm_result) 2017-08-01 22:52:09 2017-08-01 22:52:09 Call: 2017-08-01 22:52:09 svyglm(formula = npregs_s ~ birth_control_pill + marstat, nsfg_design) 2017-08-01 22:52:09 2017-08-01 22:52:09 Survey design: 2017-08-01 22:52:09 update(nsfg_design, one = 1, birth_control_pill = as.numeric(constat1 == 2017-08-01 22:52:09 6), age_categories = factor(findInterval(ager, c(15, 20, 2017-08-01 22:52:09 25, 30, 35, 40)), labels = c("15-19", "20-24", "25-29", "30-34", 2017-08-01 22:52:09 "35-39", "40-44")), marstat = factor(marstat, levels = c(1:6, 2017-08-01 22:52:09 8:9), labels = c("Married to a person of the opposite sex", 2017-08-01 22:52:09 "Not married but living together with a partner of the opposite sex", 2017-08-01 22:52:09 "Widowed", "Divorced or annulled", "Separated, because you and your spouse are not getting along", 2017-08-01 22:52:09 "Never been married", "Refused", "Don't know"))) 2017-08-01 22:52:09 2017-08-01 22:52:09 Coefficients: 2017-08-01 22:52:09 Estimate 2017-08-01 22:52:09 (Intercept) 2.53046 2017-08-01 22:52:09 birth_control_pill -0.83337 2017-08-01 22:52:09 marstatNot married but living together with a partner of the opposite sex -0.47046 2017-08-01 22:52:09 marstatWidowed 1.29611 2017-08-01 22:52:09 marstatDivorced or annulled 0.30571 2017-08-01 22:52:09 marstatSeparated, because you and your spouse are not getting along 0.55406 2017-08-01 22:52:09 marstatNever been married -1.70058 2017-08-01 22:52:09 marstatDon't know -1.99264 2017-08-01 22:52:09 Std. Error 2017-08-01 22:52:09 (Intercept) 0.09512 2017-08-01 22:52:09 birth_control_pill 0.06958 2017-08-01 22:52:09 marstatNot married but living together with a partner of the opposite sex 0.11601 2017-08-01 22:52:09 marstatWidowed 0.26973 2017-08-01 22:52:09 marstatDivorced or annulled 0.23680 2017-08-01 22:52:09 marstatSeparated, because you and your spouse are not getting along 0.28450 2017-08-01 22:52:09 marstatNever been married 0.11416 2017-08-01 22:52:09 marstatDon't know 0.29427 2017-08-01 22:52:09 t value 2017-08-01 22:52:09 (Intercept) 26.603 2017-08-01 22:52:09 birth_control_pill -11.977 2017-08-01 22:52:09 marstatNot married but living together with a partner of the opposite sex -4.055 2017-08-01 22:52:09 marstatWidowed 4.805 2017-08-01 22:52:09 marstatDivorced or annulled 1.291 2017-08-01 22:52:09 marstatSeparated, because you and your spouse are not getting along 1.947 2017-08-01 22:52:09 marstatNever been married -14.896 2017-08-01 22:52:09 marstatDon't know -6.772 2017-08-01 22:52:09 Pr(>|t|) 2017-08-01 22:52:09 (Intercept) < 2e-16 2017-08-01 22:52:09 birth_control_pill 6.95e-16 2017-08-01 22:52:09 marstatNot married but living together with a partner of the opposite sex 0.000187 2017-08-01 22:52:09 marstatWidowed 1.62e-05 2017-08-01 22:52:09 marstatDivorced or annulled 0.203013 2017-08-01 22:52:09 marstatSeparated, because you and your spouse are not getting along 0.057466 2017-08-01 22:52:09 marstatNever been married < 2e-16 2017-08-01 22:52:09 marstatDon't know 1.82e-08 2017-08-01 22:52:09 2017-08-01 22:52:09 (Intercept) *** 2017-08-01 22:52:09 birth_control_pill *** 2017-08-01 22:52:09 marstatNot married but living together with a partner of the opposite sex *** 2017-08-01 22:52:09 marstatWidowed *** 2017-08-01 22:52:09 marstatDivorced or annulled 2017-08-01 22:52:09 marstatSeparated, because you and your spouse are not getting along . 2017-08-01 22:52:09 marstatNever been married *** 2017-08-01 22:52:09 marstatDon't know *** 2017-08-01 22:52:09 --- 2017-08-01 22:52:09 Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 2017-08-01 22:52:09 2017-08-01 22:52:09 (Dispersion parameter for gaussian family taken to be 7.091573) 2017-08-01 22:52:09 2017-08-01 22:52:09 Number of Fisher Scoring iterations: 2 2017-08-01 22:52:09 2017-08-01 22:52:09 2017-08-01 22:52:09 > library(srvyr) 2017-08-01 22:52:10 2017-08-01 22:52:10 Attaching package: 'srvyr' 2017-08-01 22:52:10 2017-08-01 22:52:10 The following object is masked from 'package:stats': 2017-08-01 22:52:10 2017-08-01 22:52:10 filter 2017-08-01 22:52:10 2017-08-01 22:52:10 2017-08-01 22:52:10 > nsfg_srvyr_design <- as_survey(nsfg_design) 2017-08-01 22:52:10 2017-08-01 22:52:10 > nsfg_srvyr_design %>% summarize(mean = survey_mean(npregs_s, 2017-08-01 22:52:10 + na.rm = TRUE)) 2017-08-01 22:52:10 # A tibble: 1 x 2 2017-08-01 22:52:10 mean mean_se 2017-08-01 22:52:10 2017-08-01 22:52:10 1 1.688551 0.05807052 2017-08-01 22:52:10 2017-08-01 22:52:10 > nsfg_srvyr_design %>% group_by(age_categories) %>% 2017-08-01 22:52:10 + summarize(mean = survey_mean(npregs_s, na.rm = TRUE)) 2017-08-01 22:52:10 # A tibble: 6 x 3 2017-08-01 22:52:10 age_categories mean mean_se 2017-08-01 22:52:10 2017-08-01 22:52:10 1 15-19 0.1044526 0.01747426 2017-08-01 22:52:10 2 20-24 0.6760492 0.07212752 2017-08-01 22:52:10 3 25-29 1.5442176 0.10256152 2017-08-01 22:52:10 4 30-34 2.2417327 0.09220219 2017-08-01 22:52:10 5 35-39 2.7476990 0.22007088 2017-08-01 22:52:10 6 40-44 2.7225015 0.09713659 2017-08-01 22:52:10 Warning messages: 2017-08-01 22:52:10 1: In vcov.svyquantile(X[[i]], ...) : Only diagonal of vcov() available 2017-08-01 22:52:10 2: In vcov.svyquantile(X[[i]], ...) : Only diagonal of vcov() available 2017-08-01 22:52:10 3: In vcov.svyquantile(X[[i]], ...) : Only diagonal of vcov() available 2017-08-01 22:52:10 4: In vcov.svyquantile(X[[i]], ...) : Only diagonal of vcov() available 2017-08-01 22:52:10 5: In vcov.svyquantile(X[[i]], ...) : Only diagonal of vcov() available 2017-08-01 22:52:10 6: In vcov.svyquantile(X[[i]], ...) : Only diagonal of vcov() available 2017-08-01 22:52:10 >