diff --git a/Makefile b/Makefile index 512d1e1b..dadd7b89 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,8 @@ puf-files: data/cps-matched-puf.csv \ data/cps-matched-puf.csv: taxdata/puf/finalprep.py \ taxdata/puf/impute_itmexp.py \ - taxdata/puf/impute_pencon.py + taxdata/puf/impute_pencon.py\ + createpuf.py python createpuf.py # Above recipe also makes data/puf.csv diff --git a/Manifest.toml b/Manifest.toml deleted file mode 100644 index 193dd5ee..00000000 --- a/Manifest.toml +++ /dev/null @@ -1,332 +0,0 @@ -# This file is machine-generated - editing it directly is not advised - -[[Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" - -[[BenchmarkTools]] -deps = ["JSON", "Logging", "Printf", "Statistics", "UUIDs"] -git-tree-sha1 = "9e62e66db34540a0c919d72172cc2f642ac71260" -uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" -version = "0.5.0" - -[[BinaryProvider]] -deps = ["Libdl", "Logging", "SHA"] -git-tree-sha1 = "ecdec412a9abc8db54c0efc5548c64dfce072058" -uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232" -version = "0.5.10" - -[[Bzip2_jll]] -deps = ["Libdl", "Pkg"] -git-tree-sha1 = "5ccb0770e3d1c185a52e6d36e3ffb830639ed3d2" -uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.6+3" - -[[CEnum]] -git-tree-sha1 = "1b77a77c3b28e0b3f413f7567c9bb8dd9bdccd14" -uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" -version = "0.3.0" - -[[Calculus]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" -uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" -version = "0.5.1" - -[[Cbc]] -deps = ["BinaryProvider", "CEnum", "Cbc_jll", "Libdl", "MathOptInterface", "SparseArrays"] -git-tree-sha1 = "72e4299de0995a60a6230079adc7e47580870815" -uuid = "9961bab8-2fa3-5c5a-9d89-47fab24efd76" -version = "0.7.0" - -[[Cbc_jll]] -deps = ["Cgl_jll", "Clp_jll", "CoinUtils_jll", "CompilerSupportLibraries_jll", "Libdl", "OpenBLAS32_jll", "Osi_jll", "Pkg"] -git-tree-sha1 = "16b8ffa56b3ded6b201aa2f50623f260448aa205" -uuid = "38041ee0-ae04-5750-a4d2-bb4d0d83d27d" -version = "2.10.3+4" - -[[Cgl_jll]] -deps = ["Clp_jll", "CompilerSupportLibraries_jll", "Libdl", "Pkg"] -git-tree-sha1 = "32be20ec1e4c40e5c5d1bbf949ba9918a92a7569" -uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782" -version = "0.60.2+5" - -[[Clp_jll]] -deps = ["CoinUtils_jll", "CompilerSupportLibraries_jll", "Libdl", "OpenBLAS32_jll", "Osi_jll", "Pkg"] -git-tree-sha1 = "79263d9383ca89b35f31c33ab5b880536a8413a4" -uuid = "06985876-5285-5a41-9fcb-8948a742cc53" -version = "1.17.6+6" - -[[CodecBzip2]] -deps = ["Bzip2_jll", "Libdl", "TranscodingStreams"] -git-tree-sha1 = "2e62a725210ce3c3c2e1a3080190e7ca491f18d7" -uuid = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd" -version = "0.7.2" - -[[CodecZlib]] -deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da" -uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.0" - -[[CoinUtils_jll]] -deps = ["CompilerSupportLibraries_jll", "Libdl", "OpenBLAS32_jll", "Pkg"] -git-tree-sha1 = "ee1f06ab89337b7f194c29377ab174e752cdf60d" -uuid = "be027038-0da8-5614-b30d-e42594cb92df" -version = "2.11.3+3" - -[[CommonSubexpressions]] -deps = ["MacroTools", "Test"] -git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" -uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.0" - -[[Compat]] -deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] -git-tree-sha1 = "083e7e5ec3ef443e9dcb6dd3fbcb815879823bfa" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "3.14.0" - -[[CompilerSupportLibraries_jll]] -deps = ["Libdl", "Pkg"] -git-tree-sha1 = "7c4f882c41faa72118841185afc58a2eb00ef612" -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "0.3.3+0" - -[[DataStructures]] -deps = ["InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "88d48e133e6d3dd68183309877eac74393daa7eb" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.17.20" - -[[Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" - -[[DelimitedFiles]] -deps = ["Mmap"] -uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" - -[[DiffResults]] -deps = ["StaticArrays"] -git-tree-sha1 = "da24935df8e0c6cf28de340b958f6aac88eaa0cc" -uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" -version = "1.0.2" - -[[DiffRules]] -deps = ["NaNMath", "Random", "SpecialFunctions"] -git-tree-sha1 = "eb0c34204c8410888844ada5359ac8b96292cfd1" -uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.0.1" - -[[Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" - -[[ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "NaNMath", "Random", "SpecialFunctions", "StaticArrays"] -git-tree-sha1 = "1d090099fb82223abc48f7ce176d3f7696ede36d" -uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "0.10.12" - -[[HTTP]] -deps = ["Base64", "Dates", "IniFile", "MbedTLS", "Sockets"] -git-tree-sha1 = "2ac03263ce44be4222342bca1c51c36ce7566161" -uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "0.8.17" - -[[IniFile]] -deps = ["Test"] -git-tree-sha1 = "098e4d2c533924c921f9f9847274f2ad89e018b8" -uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f" -version = "0.5.0" - -[[InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - -[[JSON]] -deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "b34d7cef7b337321e97d22242c3c2b91f476748e" -uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.0" - -[[JSONSchema]] -deps = ["HTTP", "JSON", "ZipFile"] -git-tree-sha1 = "2646fb3efdb60f35a8c053250a2647358ae0629f" -uuid = "7d188eb4-7ad8-530c-ae41-71a32a6d4692" -version = "0.3.1" - -[[JuMP]] -deps = ["Calculus", "DataStructures", "ForwardDiff", "LinearAlgebra", "MathOptInterface", "MutableArithmetics", "NaNMath", "Random", "SparseArrays", "Statistics"] -git-tree-sha1 = "cbab42e2e912109d27046aa88f02a283a9abac7c" -uuid = "4076af6c-e467-56ae-b986-b466b2749572" -version = "0.21.3" - -[[LibGit2]] -deps = ["Printf"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" - -[[Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[LinearAlgebra]] -deps = ["Libdl"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - -[[Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" - -[[MacroTools]] -deps = ["Markdown", "Random"] -git-tree-sha1 = "f7d2e3f654af75f01ec49be82c231c382214223a" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.5" - -[[Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" - -[[MathOptInterface]] -deps = ["BenchmarkTools", "CodecBzip2", "CodecZlib", "JSON", "JSONSchema", "LinearAlgebra", "MutableArithmetics", "OrderedCollections", "SparseArrays", "Test", "Unicode"] -git-tree-sha1 = "cd2049c055c7d192a235670d50faa375361624ba" -uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" -version = "0.9.14" - -[[MbedTLS]] -deps = ["Dates", "MbedTLS_jll", "Random", "Sockets"] -git-tree-sha1 = "426a6978b03a97ceb7ead77775a1da066343ec6e" -uuid = "739be429-bea8-5141-9913-cc70e7f3736d" -version = "1.0.2" - -[[MbedTLS_jll]] -deps = ["Libdl", "Pkg"] -git-tree-sha1 = "a0cb0d489819fa7ea5f9fa84c7e7eba19d8073af" -uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.16.6+1" - -[[Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" - -[[MutableArithmetics]] -deps = ["LinearAlgebra", "SparseArrays", "Test"] -git-tree-sha1 = "6cf09794783b9de2e662c4e8b60d743021e338d0" -uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" -version = "0.2.10" - -[[NPZ]] -deps = ["Compat", "ZipFile"] -git-tree-sha1 = "a9837d6dc62c8a159f8e788d51c81ccee248db0e" -uuid = "15e1cf62-19b3-5cfa-8e77-841668bca605" -version = "0.4.0" - -[[NaNMath]] -git-tree-sha1 = "c84c576296d0e2fbb3fc134d3e09086b3ea617cd" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "0.3.4" - -[[OpenBLAS32_jll]] -deps = ["CompilerSupportLibraries_jll", "Libdl", "Pkg"] -git-tree-sha1 = "793b33911239d2651c356c823492b58d6490d36a" -uuid = "656ef2d0-ae68-5445-9ca0-591084a874a2" -version = "0.3.9+4" - -[[OpenSpecFun_jll]] -deps = ["CompilerSupportLibraries_jll", "Libdl", "Pkg"] -git-tree-sha1 = "d51c416559217d974a1113522d5919235ae67a87" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.3+3" - -[[OrderedCollections]] -git-tree-sha1 = "293b70ac1780f9584c89268a6e2a560d938a7065" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.3.0" - -[[Osi_jll]] -deps = ["CoinUtils_jll", "CompilerSupportLibraries_jll", "Libdl", "OpenBLAS32_jll", "Pkg"] -git-tree-sha1 = "bd436a97280df40938e66ae8d18e57aceb072856" -uuid = "7da25872-d9ce-5375-a4d3-7a845f58efdd" -version = "0.108.5+3" - -[[Parsers]] -deps = ["Dates", "Test"] -git-tree-sha1 = "8077624b3c450b15c087944363606a6ba12f925e" -uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "1.0.10" - -[[Pkg]] -deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" - -[[Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - -[[Random]] -deps = ["Serialization"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" - -[[Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[SharedArrays]] -deps = ["Distributed", "Mmap", "Random", "Serialization"] -uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" - -[[Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - -[[SparseArrays]] -deps = ["LinearAlgebra", "Random"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - -[[SpecialFunctions]] -deps = ["OpenSpecFun_jll"] -git-tree-sha1 = "d8d8b8a9f4119829410ecd706da4cc8594a1e020" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "0.10.3" - -[[StaticArrays]] -deps = ["LinearAlgebra", "Random", "Statistics"] -git-tree-sha1 = "016d1e1a00fabc556473b07161da3d39726ded35" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "0.12.4" - -[[Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[Test]] -deps = ["Distributed", "InteractiveUtils", "Logging", "Random"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[TranscodingStreams]] -deps = ["Random", "Test"] -git-tree-sha1 = "7c53c35547de1c5b9d46a4797cf6d8253807108c" -uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -version = "0.9.5" - -[[UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" - -[[ZipFile]] -deps = ["Libdl", "Printf", "Zlib_jll"] -git-tree-sha1 = "254975fef2fc526583bb9b7c9420fe66ffe09f2f" -uuid = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea" -version = "0.9.2" - -[[Zlib_jll]] -deps = ["Libdl", "Pkg"] -git-tree-sha1 = "d5bba6485811931e4b8958e2d7ca3738273ac468" -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.11+15" diff --git a/Project.toml b/Project.toml deleted file mode 100644 index f8e32228..00000000 --- a/Project.toml +++ /dev/null @@ -1,4 +0,0 @@ -[deps] -Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76" -JuMP = "4076af6c-e467-56ae-b986-b466b2749572" -NPZ = "15e1cf62-19b3-5cfa-8e77-841668bca605" diff --git a/README.md b/README.md index 3d8128a9..c6f8c145 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,8 @@ To run the scripts that produce `puf.csv` and `cps.csv.gz`, activate the `Julia` must also be installed to solve for the PUF and CPS weights. You can download `Julia` from their [website](https://julialang.org/downloads/) -or by using `homebrew`. +or by using `homebrew`. After installing Julia, you will need to also install +these three packages: `JuMP, Cbc, NPZ`. Data-Preparation Documentation and Workflow ------------------------------------------- diff --git a/createpuf.py b/createpuf.py index 3e08a4c7..51e55abb 100644 --- a/createpuf.py +++ b/createpuf.py @@ -96,7 +96,6 @@ def dataprep(data): print("Prepping PUF") puf2011 = pd.read_csv(Path(DATA_PATH, "puf2011.csv")) raw_puf = puf.preppuf(puf2011, PUF_YEAR) -# raw_puf.to_csv(Path(DATA_PATH, "raw_puf.csv"), index=False) # rename CPS file to match PUF print("Prepping CPS") @@ -118,12 +117,6 @@ def dataprep(data): raw_cps["e19800"] = raw_cps["charitable"] * cash raw_cps["e20100"] = raw_cps["charitable"] * non_cash -# cap number of dependents in CPS to line up with PUF -# raw_cps["depne"] = np.where( -# raw_cps["mars"] == 2, -# np.minimum(5, raw_cps["depne"]), -# np.minimum(3, raw_cps["depne"]), -# ) raw_cps = dataprep(raw_cps) raw_puf = dataprep(raw_puf) raw_cps["recid"] = range(1, len(raw_cps.index) + 1) @@ -166,6 +159,7 @@ def dataprep(data): data.drop(list(data.filter(regex=".*_cps")), axis=1, inplace=True) # add back non-filers print("Adding non-filers") +nonfilers.rename(columns={"s006": "matched_weight"}, inplace=True) data = pd.concat([data, nonfilers], sort=False, ignore_index=True) data = data.fillna(0.0) data.reset_index(inplace=True) diff --git a/puf_stage2/puf_weights.csv.gz b/puf_stage2/puf_weights.csv.gz index e4973d47..2040eb82 100644 Binary files a/puf_stage2/puf_weights.csv.gz and b/puf_stage2/puf_weights.csv.gz differ diff --git a/puf_stage3/puf_ratios.csv b/puf_stage3/puf_ratios.csv index 55614c33..044bd80e 100644 --- a/puf_stage3/puf_ratios.csv +++ b/puf_stage3/puf_ratios.csv @@ -1,21 +1,21 @@ agi_bin,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18 -INT2011,1.0197,0.9209,0.9391,0.9622,0.9670,0.9407,0.8339,0.8942,0.9654,0.9183,0.9286,0.9356,0.9440,0.9453,0.9635,0.9643,0.9511,1.0062,1.6912 -INT2012,0.7787,0.9573,0.8484,0.8207,0.7186,0.8150,0.8009,0.7950,0.8526,0.9112,0.9147,0.9142,1.0263,1.0493,1.0187,1.1506,1.1052,1.2274,1.3294 -INT2013,1.1348,0.7603,0.7822,0.7738,0.8969,0.8706,0.9557,0.9069,0.8346,0.8581,0.9766,1.0157,1.0541,1.0496,1.0895,0.9632,1.0432,0.9793,1.1523 -INT2014,0.9117,0.8482,0.8492,0.7777,0.8414,0.8802,0.9732,0.8779,0.8278,1.0094,0.8349,1.0622,1.0305,0.9293,1.0609,1.1539,1.0639,1.0723,1.0786 -INT2015,0.9785,0.9266,0.9328,0.9486,0.9513,0.9234,0.9367,0.9384,0.9533,0.9648,0.9864,1.0155,0.9962,0.9911,1.0227,0.9815,1.0195,1.1266,1.1889 -INT2016,0.9830,1.0328,1.0452,1.0303,1.0468,1.0346,1.0093,1.0001,1.0067,1.0221,0.9620,0.9533,0.9710,1.0068,1.0650,1.0096,1.0704,1.0976,0.9898 -INT2017,0.9952,0.8826,0.8952,0.8907,0.8946,0.9129,0.9173,0.9391,0.9568,0.9770,1.0129,1.0675,1.0352,0.9885,0.9342,0.9802,0.9613,1.0316,1.1996 -INT2018,0.9974,0.9716,0.9718,0.9628,0.9763,0.9718,0.9791,0.9797,0.9786,1.0004,0.9912,1.0050,1.0136,1.0055,1.0214,0.9886,1.0136,1.0854,0.9971 -INT2019,1.0006,0.9771,0.9753,0.9875,0.9728,0.9779,0.9786,0.9793,0.9815,0.9906,0.9919,1.0120,1.0040,1.0057,1.0044,0.9970,1.0208,1.0482,1.0197 -INT2020,1.0023,0.9781,0.9744,0.9813,0.9812,0.9937,0.9791,0.9929,0.9841,0.9958,0.9975,1.0096,1.0049,1.0026,1.0055,0.9953,1.0191,1.0115,1.0064 -INT2021,0.9934,0.9796,0.9772,0.9806,0.9843,0.9816,0.9868,0.9852,0.9956,0.9984,0.9912,1.0095,1.0035,1.0114,1.0032,1.0054,1.0237,1.0077,1.0068 -INT2022,0.9936,0.9814,0.9786,0.9784,0.9803,0.9851,0.9849,0.9884,0.9934,1.0053,1.0013,0.9990,1.0073,1.0080,1.0065,0.9989,1.0207,1.0030,1.0126 -INT2023,1.0042,0.9807,0.9783,0.9787,0.9830,0.9818,0.9846,1.0116,0.9951,0.9952,1.0062,1.0020,1.0012,1.0068,1.0003,1.0079,1.0236,1.0002,0.9927 -INT2024,1.0054,0.9848,0.9818,0.9760,0.9755,0.9863,0.9892,0.9948,0.9947,0.9962,1.0008,0.9986,1.0054,1.0092,1.0044,1.0106,1.0191,1.0112,1.0075 -INT2025,1.0078,0.9832,0.9748,0.9772,0.9814,0.9814,0.9804,1.0091,0.9909,1.0021,1.0011,0.9977,1.0050,1.0047,1.0160,1.0129,1.0233,0.9997,0.9928 -INT2026,1.0123,0.9977,0.9773,0.9808,0.9874,0.9840,1.0059,0.9872,0.9910,0.9928,0.9931,0.9941,1.0056,1.0136,1.0331,1.0228,1.0259,0.9975,0.9921 -INT2027,1.0059,0.9827,0.9857,0.9777,0.9896,0.9836,1.0023,0.9892,0.9972,0.9966,0.9911,0.9934,1.0091,1.0156,1.0239,1.0262,1.0235,0.9941,0.9947 -INT2028,1.0107,0.9947,0.9776,0.9752,0.9866,0.9957,0.9884,0.9870,0.9900,0.9965,0.9917,0.9939,1.0056,1.0247,1.0254,1.0306,1.0236,1.0037,0.9918 -INT2029,1.0117,0.9840,0.9801,0.9847,0.9820,0.9909,1.0225,1.0034,0.9778,0.9896,0.9916,0.9912,1.0037,1.0234,1.0288,1.0440,1.0263,0.9939,0.9924 -INT2030,1.0191,0.9838,0.9786,0.9916,0.9850,0.9883,0.9825,0.9787,0.9930,0.9934,0.9888,0.9892,1.0049,1.0363,1.0370,1.0488,1.0308,0.9949,0.9922 +INT2011,1.0259,0.5597,0.9448,0.9681,0.9728,0.9464,0.8390,0.8997,0.9713,0.9239,0.9342,0.9413,0.9497,0.9510,0.9693,0.9702,0.9569,1.0123,1.7014 +INT2012,0.7778,0.9454,0.8433,0.8157,0.7153,0.8101,0.7961,0.7940,0.8481,0.9063,0.9130,0.9182,1.0343,1.0435,1.0129,1.1436,1.0975,1.2339,1.3445 +INT2013,1.1325,0.7670,0.7821,0.7778,0.8935,0.8699,0.9558,0.9045,0.8342,0.8596,0.9746,1.0271,1.0498,1.0505,1.0891,0.9632,1.0448,0.9690,1.1441 +INT2014,0.9106,0.8669,0.8492,0.7737,0.8431,0.8802,0.9729,0.8840,0.8368,1.0108,0.8443,1.0534,1.0274,0.9291,1.0609,1.1524,1.0626,1.0728,1.0862 +INT2015,0.9813,0.9511,0.9323,0.9470,0.9543,0.9246,0.9367,0.9315,0.9463,0.9699,0.9891,1.0163,0.9966,0.9906,1.0241,0.9827,1.0221,1.1437,1.1672 +INT2016,0.9843,1.0086,1.0453,1.0314,1.0447,1.0342,1.0116,1.0025,1.0025,1.0175,0.9484,0.9531,0.9752,1.0131,1.0723,1.0130,1.0804,1.0810,0.9935 +INT2017,0.9929,0.9161,0.8978,0.8911,0.8936,0.9131,0.9193,0.9401,0.9611,0.9766,1.0158,1.0694,1.0315,0.9881,0.9403,0.9756,0.9565,1.0515,1.1945 +INT2018,0.9993,0.9758,0.9681,0.9665,0.9766,0.9721,0.9766,0.9770,0.9751,0.9991,0.9931,1.0037,1.0140,1.0066,1.0183,0.9897,1.0193,1.0882,0.9982 +INT2019,0.9980,0.9765,0.9762,0.9919,0.9792,0.9812,0.9770,0.9863,0.9817,0.9947,0.9912,1.0110,1.0024,1.0074,0.9980,1.0006,1.0246,1.0290,1.0196 +INT2020,1.0019,0.9803,0.9743,0.9754,0.9840,0.9864,0.9831,0.9832,0.9931,0.9966,0.9961,1.0100,1.0059,1.0053,1.0076,0.9998,1.0137,1.0108,1.0110 +INT2021,0.9955,0.9801,0.9764,0.9784,0.9829,0.9883,0.9897,0.9869,0.9922,0.9966,1.0064,0.9979,1.0065,1.0113,1.0046,1.0033,1.0297,1.0091,1.0024 +INT2022,1.0062,0.9808,0.9811,0.9780,0.9734,0.9820,0.9829,0.9905,0.9935,1.0054,1.0020,1.0042,1.0030,1.0050,1.0046,1.0063,1.0131,0.9980,1.0111 +INT2023,0.9986,0.9817,0.9773,0.9788,0.9894,0.9889,0.9858,1.0148,0.9943,0.9951,1.0021,1.0026,1.0029,1.0064,1.0005,1.0085,1.0218,1.0031,0.9942 +INT2024,1.0010,0.9843,0.9811,0.9788,0.9695,0.9788,0.9896,1.0154,0.9902,0.9971,0.9982,0.9975,1.0039,1.0080,1.0115,1.0085,1.0235,1.0136,1.0079 +INT2025,1.0090,0.9935,0.9766,0.9773,0.9851,0.9824,1.0010,0.9910,0.9948,1.0028,0.9996,0.9955,1.0063,1.0074,1.0128,1.0135,1.0242,0.9942,0.9915 +INT2026,1.0098,0.9839,0.9811,0.9792,0.9866,0.9897,0.9952,0.9932,0.9948,0.9942,0.9894,0.9948,1.0066,1.0147,1.0383,1.0261,1.0210,0.9985,0.9936 +INT2027,1.0105,0.9894,0.9830,0.9790,0.9893,0.9917,0.9862,0.9903,0.9927,0.9931,1.0005,0.9919,1.0071,1.0188,1.0188,1.0278,1.0252,0.9940,0.9946 +INT2028,1.0064,0.9973,0.9730,0.9848,0.9872,0.9868,1.0216,1.0003,0.9897,0.9957,0.9913,0.9918,1.0060,1.0168,1.0237,1.0224,1.0231,0.9958,0.9918 +INT2029,1.0129,0.9941,0.9822,0.9797,0.9815,0.9847,0.9922,0.9852,0.9928,0.9919,0.9956,0.9916,1.0049,1.0295,1.0289,1.0500,1.0227,1.0009,0.9925 +INT2030,1.0287,1.0011,0.9819,0.9846,0.9817,0.9930,0.9818,0.9787,0.9853,0.9912,0.9831,0.9924,1.0050,1.0358,1.0394,1.0421,1.0303,0.9955,0.9921 diff --git a/tests/puf_agg_expected.txt b/tests/puf_agg_expected.txt index 914af385..8d30f44f 100644 --- a/tests/puf_agg_expected.txt +++ b/tests/puf_agg_expected.txt @@ -14,8 +14,8 @@ blind_head 3115 0 1 blind_spouse 602 0 1 cmbtp 4308353701 -23842830 83355100 data_source 234486 0 1 -e00200 39329015080 0 56530000 -e00200p 23688258792 0 28265000 +e00200 39329015123 0 56530000 +e00200p 23688258835 0 28265000 e00200s 15640756288 0 28265000 e00300 3541845122 0 29460000 e00400 2464032363 0 14350000 @@ -92,9 +92,9 @@ other_ben 250906580 0 88060 p08000 810824 0 31600 p22250 -630200978 -124900000 39410000 p23250 23291182672 -28160000 91220000 -pencon_p 426354298 0 16500 -pencon_s 280149178 0 16500 -s006 14949905937 0 207455 +pencon_p 426344886 0 16500 +pencon_s 280151210 0 16500 +s006 18297348057 1 723334 snap_ben 65755832 0 24999 ssi_ben 47359967 0 39600 tanf_ben 6399833 0 36000 diff --git a/tests/test_weights.py b/tests/test_weights.py index c5ec42b7..da18a3bc 100644 --- a/tests/test_weights.py +++ b/tests/test_weights.py @@ -47,8 +47,8 @@ def test_weights( MIN_WEIGHT = 0 # weight must be non-negative, MAX_WEIGHT = 2000000 # but can be quite large for col in weights: - if weights[col].min() < MIN_WEIGHT: - msg = "{} weights[{}].min()={} < {}" + if weights[col].min() <= MIN_WEIGHT: + msg = "{} weights[{}].min()={} <= {}" raise ValueError(msg.format(kind, col, weights[col].min(), MIN_WEIGHT)) if weights[col].max() > MAX_WEIGHT: msg = "{} weights[{}].max()={} > {}"