Skip to content

Updated variance( ) function #757

Updated variance( ) function

Updated variance( ) function #757

Triggered via pull request August 18, 2023 04:32
Status Success
Total duration 29m 50s
Artifacts

documentation.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 2 warnings
build: src/ratio.jl#L6
doctest failure in ~/work/Survey.jl/Survey.jl/src/ratio.jl:6-17 ```jldoctest julia> apiclus1 = load_data("apiclus1"); julia> dclus1 = SurveyDesign(apiclus1; clusters = :dnum, weights = :pw); julia> ratio(:api00, :enroll, dclus1) 1×1 DataFrame Row │ ratio │ Float64 ─────┼───────── 1 │ 1.17182 ``` Subexpression: ratio(:api00, :enroll, dclus1) Evaluated output: ERROR: MethodError: no method matching ratio(::Symbol, ::Symbol, ::SurveyDesign) Closest candidates are: ratio(!Matched::Vector{Symbol}, ::Any, ::AbstractSurveyDesign) @ Survey ~/work/Survey.jl/Survey.jl/src/ratio.jl:114 Stacktrace: [1] top-level scope @ none:1 Expected output: 1×1 DataFrame Row │ ratio │ Float64 ─────┼───────── 1 │ 1.17182 diff = Warning: Diff output requires color. 1×1 DataFrame Row │ ratio │ Float64 ─────┼───────── 1 │ 1.17182ERROR: MethodError: no method matching ratio(::Symbol, ::Symbol, ::SurveyDesign) Closest candidates are: ratio(!Matched::Vector{Symbol}, ::Any, ::AbstractSurveyDesign) @ Survey ~/work/Survey.jl/Survey.jl/src/ratio.jl:114 Stacktrace: [1] top-level scope @ none:1
build: src/ratio.jl#L45
doctest failure in ~/work/Survey.jl/Survey.jl/src/ratio.jl:45-53 ```jldoctest; setup = :(using Survey, StatsBase; apiclus1 = load_data("apiclus1"); dclus1 = SurveyDesign(apiclus1; clusters = :dnum, weights = :pw); bclus1 = bootweights(dclus1);) julia> ratio([:api00, :api99], bclus1) 1×2 DataFrame Row │ estimator SE │ Float64 Float64 ─────┼─────────────────────── 1 │ 1.06127 0.00672259 ``` Subexpression: ratio([:api00, :api99], bclus1) Evaluated output: 1×2 DataFrame Row │ estimator SE │ Float64 Float64 ─────┼─────────────────────── 1 │ 1.06127 0.00672259 Expected output: diff = Warning: Diff output requires color. 1×2 DataFrame Row │ estimator SE │ Float64 Float64 ─────┼─────────────────────── 1 │ 1.06127 0.00672259
build: src/ratio.jl#L74
doctest failure in ~/work/Survey.jl/Survey.jl/src/ratio.jl:74-91 ```jldoctest ratiolabel; setup = :(using Survey, StatsBase; apiclus1 = load_data("apiclus1"); dclus1 = SurveyDesign(apiclus1; clusters = :dnum, weights = :pw); bclus1 = dclus1 |> bootweights;) julia> ratio([:api00, :api99], :cname, dclus1) 11×2 DataFrame Row │ ratio cname │ Float64 String15 ─────┼────────────────────── 1 │ 1.09852 Alameda 2 │ 1.17779 Fresno 3 │ 1.11453 Kern 4 │ 1.06307 Los Angeles 5 │ 1.00565 Mendocino 6 │ 1.08121 Merced 7 │ 1.03628 Orange 8 │ 1.02127 Plumas 9 │ 1.06112 San Diego 10 │ 1.07331 San Joaquin 11 │ 1.05598 Santa Clara ``` Subexpression: ratio([:api00, :api99], :cname, dclus1) Evaluated output: unique(group[!, domain]) = InlineStrings.String15["Alameda"] unique(group[!, domain]) = InlineStrings.String15["Fresno"] unique(group[!, domain]) = InlineStrings.String15["Kern"] unique(group[!, domain]) = InlineStrings.String15["Los Angeles"] unique(group[!, domain]) = InlineStrings.String15["Mendocino"] unique(group[!, domain]) = InlineStrings.String15["Merced"] unique(group[!, domain]) = InlineStrings.String15["Orange"] unique(group[!, domain]) = InlineStrings.String15["Plumas"] unique(group[!, domain]) = InlineStrings.String15["San Diego"] unique(group[!, domain]) = InlineStrings.String15["San Joaquin"] unique(group[!, domain]) = InlineStrings.String15["Santa Clara"] 11×2 DataFrame Row │ ratio cname │ Float64 String15 ─────┼────────────────────── 1 │ 1.09852 Alameda 2 │ 1.17779 Fresno 3 │ 1.11453 Kern 4 │ 1.06307 Los Angeles 5 │ 1.00565 Mendocino 6 │ 1.08121 Merced 7 │ 1.03628 Orange 8 │ 1.02127 Plumas 9 │ 1.06112 San Diego 10 │ 1.07331 San Joaquin 11 │ 1.05598 Santa Clara Expected output: 11×2 DataFrame Row │ ratio cname │ Float64 String15 ─────┼────────────────────── 1 │ 1.09852 Alameda 2 │ 1.17779 Fresno 3 │ 1.11453 Kern 4 │ 1.06307 Los Angeles 5 │ 1.00565 Mendocino 6 │ 1.08121 Merced 7 │ 1.03628 Orange 8 │ 1.02127 Plumas 9 │ 1.06112 San Diego 10 │ 1.07331 San Joaquin 11 │ 1.05598 Santa Clara diff = Warning: Diff output requires color. unique(group[!, domain]) = InlineStrings.String15["Alameda"] unique(group[!, domain]) = InlineStrings.String15["Fresno"] unique(group[!, domain]) = InlineStrings.String15["Kern"] unique(group[!, domain]) = InlineStrings.String15["Los Angeles"] unique(group[!, domain]) = InlineStrings.String15["Mendocino"] unique(group[!, domain]) = InlineStrings.String15["Merced"] unique(group[!, domain]) = InlineStrings.String15["Orange"] unique(group[!, domain]) = InlineStrings.String15["Plumas"] unique(group[!, domain]) = InlineStrings.String15["San Diego"] unique(group[!, domain]) = InlineStrings.String15["San Joaquin"] unique(group[!, domain]) = InlineStrings.String15["Santa Clara"] 11×2 DataFrame Row │ ratio cname cname │ Float64 String15 String15 ─────┼────────────────────── 1 │ 1.09852 Alameda 2 │ 1.17779 Fresno 3 │ 1.11453 Kern 4 │ 1.06307 Los Angeles 5 │ 1.00565 Mendocino 6 │ 1.08121 Merced 7 │ 1.03628 Orange 8 │ 1.02127 Plumas 9 │ 1.06112 San Diego 10 │ 1.07331 San Joaquin 11 │ 1.05598 Santa Clara
build: src/ratio.jl#L95
doctest failure in ~/work/Survey.jl/Survey.jl/src/ratio.jl:95-112 ```jldoctest ratiolabel julia> ratio([:api00, :api99], :cname, bclus1) 11×3 DataFrame Row │ estimator SE cname │ Float64 Float64 String15 ─────┼───────────────────────────────── 1 │ 1.05598 NaN Santa Clara 2 │ 1.06112 NaN San Diego 3 │ 1.08121 NaN Merced 4 │ 1.06307 NaN Los Angeles 5 │ 1.03628 NaN Orange 6 │ 1.17779 NaN Fresno 7 │ 1.02127 NaN Plumas 8 │ 1.09852 NaN Alameda 9 │ 1.07331 NaN San Joaquin 10 │ 1.11453 NaN Kern 11 │ 1.00565 NaN Mendocino ``` Subexpression: ratio([:api00, :api99], :cname, bclus1) Evaluated output: unique(group[!, domain]) = InlineStrings.String15["Santa Clara"] unique(group[!, domain]) = InlineStrings.String15["San Diego"] unique(group[!, domain]) = InlineStrings.String15["Merced"] unique(group[!, domain]) = InlineStrings.String15["Los Angeles"] unique(group[!, domain]) = InlineStrings.String15["Orange"] unique(group[!, domain]) = InlineStrings.String15["Fresno"] unique(group[!, domain]) = InlineStrings.String15["Plumas"] unique(group[!, domain]) = InlineStrings.String15["Alameda"] unique(group[!, domain]) = InlineStrings.String15["San Joaquin"] unique(group[!, domain]) = InlineStrings.String15["Kern"] unique(group[!, domain]) = InlineStrings.String15["Mendocino"] 11×3 DataFrame Row │ estimator SE cname │ Float64 Float64 String15 ─────┼───────────────────────────────── 1 │ 1.05598 NaN Santa Clara 2 │ 1.06112 NaN San Diego 3 │ 1.08121 NaN Merced 4 │ 1.06307 NaN Los Angeles 5 │ 1.03628 NaN Orange 6 │ 1.17779 NaN Fresno 7 │ 1.02127 NaN Plumas 8 │ 1.09852 NaN Alameda 9 │ 1.07331 NaN San Joaquin 10 │ 1.11453 NaN Kern 11 │ 1.00565 NaN Mendocino Expected output: 11×3 DataFrame Row │ estimator SE cname │ Float64 Float64 String15 ─────┼───────────────────────────────── 1 │ 1.05598 NaN Santa Clara 2 │ 1.06112 NaN San Diego 3 │ 1.08121 NaN Merced 4 │ 1.06307 NaN Los Angeles 5 │ 1.03628 NaN Orange 6 │ 1.17779 NaN Fresno 7 │ 1.02127 NaN Plumas 8 │ 1.09852 NaN Alameda 9 │ 1.07331 NaN San Joaquin 10 │ 1.11453 NaN Kern 11 │ 1.00565 NaN Mendocino diff = Warning: Diff output requires color. unique(group[!, domain]) = InlineStrings.String15["Santa Clara"] unique(group[!, domain]) = InlineStrings.String15["San Diego"] unique(group[!, domain]) = InlineStrings.String15["Merced"] unique(group[!, domain]) = InlineStrings.String15["Los Angeles"] unique(group[!, domain]) = InlineStrings.String15["Orange"] unique(group[!, domain]) = InlineStrings.String15["Fresno"] unique(group[!, domain]) = InlineStrings.String15["Plumas"] unique(group[!, domain]) = InlineStrings.String15["Alameda"] unique(group[!, domain]) = InlineStrings.String15["San Joaquin"] unique(group[!, domain]) = InlineStrings.String15["Kern"] unique(group[!, domain]) = InlineStrings.String15["Mendocino"] 11×3 DataFrame Row │ estimator SE cname cname │ Float64 Float64 String15 String15 ─────┼───────────────────────────────── 1 │ 1.05598 NaN Santa Clara 2 │ 1.06112 NaN San Diego 3 │ 1.08121 NaN Merced 4 │ 1.06307 NaN Los Angeles 5 │ 1.03628 NaN Orange 6 │ 1.17779 NaN Fresno 7 │ 1.02127 NaN Plumas 8 │ 1.09852 NaN Alameda 9 │ 1.07331 NaN San Joaquin 10 │ 1.11453 NaN Kern 11 │ 1.00565 NaN Mendocino
build: src/total.jl#L38
doctest failure in ~/work/Survey.jl/Survey.jl/src/total.jl:38-46 ```jldoctest; setup = :(using Survey; apiclus1 = load_data("apiclus1"); dclus1 = SurveyDesign(apiclus1; clusters = :dnum, weights = :pw); bclus1 = dclus1 |> bootweights;) julia> total(:api00, bclus1) 1×2 DataFrame Row │ total SE │ Float64 Float64 ─────┼────────────────────── 1 │ 3.98999e6 9.01611e5 ``` Subexpression: total(:api00, bclus1) Evaluated output: 1×2 DataFrame Row │ total SE │ Float64 Float64 ─────┼────────────────────── 1 │ 3.98999e6 9.01611e5 Expected output: diff = Warning: Diff output requires color. 1×2 DataFrame Row │ total SE │ Float64 Float64 ─────┼────────────────────── 1 │ 3.98999e6 9.01611e5
build: src/total.jl#L99
doctest failure in ~/work/Survey.jl/Survey.jl/src/total.jl:99-116 ```jldoctest totallabel; setup = :(using Survey; apiclus1 = load_data("apiclus1"); dclus1 = SurveyDesign(apiclus1; clusters = :dnum, weights = :pw); bclus1 = dclus1 |> bootweights;) julia> total(:api00, :cname, dclus1) 11×2 DataFrame Row │ total cname │ Float64 String15 ─────┼───────────────────────────── 1 │ 3.7362e6 Alameda 2 │ 9.58547e5 Fresno 3 │ 459473.0 Kern 4 │ 2.46465e6 Los Angeles 5 │ 1.26571e6 Mendocino 6 │ 1.0545e6 Merced 7 │ 5.7721e6 Orange 8 │ 3.2422e6 Plumas 9 │ 9.20698e6 San Diego 10 │ 1.03541e7 San Joaquin 11 │ 3.22122e6 Santa Clara ``` Subexpression: total(:api00, :cname, dclus1) Evaluated output: unique(group[!, domain]) = InlineStrings.String15["Alameda"] unique(group[!, domain]) = InlineStrings.String15["Fresno"] unique(group[!, domain]) = InlineStrings.String15["Kern"] unique(group[!, domain]) = InlineStrings.String15["Los Angeles"] unique(group[!, domain]) = InlineStrings.String15["Mendocino"] unique(group[!, domain]) = InlineStrings.String15["Merced"] unique(group[!, domain]) = InlineStrings.String15["Orange"] unique(group[!, domain]) = InlineStrings.String15["Plumas"] unique(group[!, domain]) = InlineStrings.String15["San Diego"] unique(group[!, domain]) = InlineStrings.String15["San Joaquin"] unique(group[!, domain]) = InlineStrings.String15["Santa Clara"] 11×2 DataFrame Row │ total cname │ Float64 String15 ─────┼───────────────────────────── 1 │ 249080.0 Alameda 2 │ 63903.1 Fresno 3 │ 30631.5 Kern 4 │ 3.2862e5 Los Angeles 5 │ 84380.6 Mendocino 6 │ 70300.2 Merced 7 │ 3.84807e5 Orange 8 │ 2.16147e5 Plumas 9 │ 1.2276e6 San Diego 10 │ 6.90276e5 San Joaquin 11 │ 6.44244e5 Santa Clara Expected output: 11×2 DataFrame Row │ total cname │ Float64 String15 ─────┼───────────────────────────── 1 │ 3.7362e6 Alameda 2 │ 9.58547e5 Fresno 3 │ 459473.0 Kern 4 │ 2.46465e6 Los Angeles 5 │ 1.26571e6 Mendocino 6 │ 1.0545e6 Merced 7 │ 5.7721e6 Orange 8 │ 3.2422e6 Plumas 9 │ 9.20698e6 San Diego 10 │ 1.03541e7 San Joaquin 11 │ 3.22122e6 Santa Clara diff = Warning: Diff output requires color. unique(group[!, domain]) = InlineStrings.String15["Alameda"] unique(group[!, domain]) = InlineStrings.String15["Fresno"] unique(group[!, domain]) = InlineStrings.String15["Kern"] unique(group[!, domain]) = InlineStrings.String15["Los Angeles"] unique(group[!, domain]) = InlineStrings.String15["Mendocino"] unique(group[!, domain]) = InlineStrings.String15["Merced"] unique(group[!, domain]) = InlineStrings.String15["Orange"] unique(group[!, domain]) = InlineStrings.String15["Plumas"] unique(group[!, domain]) = InlineStrings.String15["San Diego"] unique(group[!, domain]) = InlineStrings.String15["San Joaquin"] unique(group[!, domain]) = InlineStrings.String15["Santa Clara"] 11×2 DataFrame Row │ total cname cname │ Float64 String15 String15 ─────┼───────────────────────────── 1 │ 3.7362e6 │ 249080.0 Alameda 2 │ 9.58547e5 │ 63903.1 Fresno 3 │ 459473.0 │ 30631.5 Kern 4 │ 2.46465e6 3.2862e5 Los Angeles 5 │ 1.26571e6 │ 84380.6 Mendocino 6 │ 1.0545e6 │ 70300.2 Merced 7 │ 5.7721e6 3.84807e5 Orange 8 │ 3.2422e6 2.16147e5 Plumas 9 │ 9.20698e6 1.2276e6 San Diego 10 │ 1.03541e7 6.90276e5 San Joaquin 11 │ 3.22122e6 6.44244e5 Santa Clara
build: src/total.jl#L119
doctest failure in ~/work/Survey.jl/Survey.jl/src/total.jl:119-136 ```jldoctest totallabel julia> total(:api00, :cname, bclus1) 11×3 DataFrame Row │ total SE cname │ Float64 Float64 String15 ─────┼──────────────────────────────────────── 1 │ 3.22122e6 2.6143e6 Santa Clara 2 │ 9.20698e6 8.00251e6 San Diego 3 │ 1.0545e6 9.85983e5 Merced 4 │ 2.46465e6 2.15017e6 Los Angeles 5 │ 5.7721e6 5.40929e6 Orange 6 │ 9.58547e5 8.95488e5 Fresno 7 │ 3.2422e6 3.03494e6 Plumas 8 │ 3.7362e6 3.49184e6 Alameda 9 │ 1.03541e7 9.69862e6 San Joaquin 10 │ 459473.0 4.30027e5 Kern 11 │ 1.26571e6 1.18696e6 Mendocino ``` Subexpression: total(:api00, :cname, bclus1) Evaluated output: unique(group[!, domain]) = InlineStrings.String15["Santa Clara"] unique(group[!, domain]) = InlineStrings.String15["San Diego"] unique(group[!, domain]) = InlineStrings.String15["Merced"] unique(group[!, domain]) = InlineStrings.String15["Los Angeles"] unique(group[!, domain]) = InlineStrings.String15["Orange"] unique(group[!, domain]) = InlineStrings.String15["Fresno"] unique(group[!, domain]) = InlineStrings.String15["Plumas"] unique(group[!, domain]) = InlineStrings.String15["Alameda"] unique(group[!, domain]) = InlineStrings.String15["San Joaquin"] unique(group[!, domain]) = InlineStrings.String15["Kern"] unique(group[!, domain]) = InlineStrings.String15["Mendocino"] 11×3 DataFrame Row │ total SE cname │ Float64 Float64 String15 ─────┼──────────────────────────────────────────── 1 │ 6.44244e5 4.2273e5 Santa Clara 2 │ 1.2276e6 8.62727e5 San Diego 3 │ 70300.2 71336.3 Merced 4 │ 3.2862e5 2.93936e5 Los Angeles 5 │ 3.84807e5 3.88014e5 Orange 6 │ 63903.1 64781.7 Fresno 7 │ 2.16147e5 2.12089e5 Plumas 8 │ 249080.0 2.49228e5 Alameda 9 │ 6.90276e5 6.81604e5 San Joaquin 10 │ 30631.5 30870.3 Kern 11 │ 84380.6 80215.9 Mendocino Expected output: 11×3 DataFrame Row │ total SE cname │ Float64 Float64 String15 ─────┼──────────────────────────────────────── 1 │ 3.22122e6 2.6143e6 Santa Clara 2 │ 9.20698e6 8.00251e6 San Diego 3 │ 1.0545e6 9.85983e5 Merced 4 │ 2.46465e6 2.15017e6 Los Angeles 5 │ 5.7721e6 5.40929e6 Orange 6 │ 9.58547e5 8.95488e5 Fresno 7 │ 3.2422e6 3.03494e6 Plumas 8 │ 3.7362e6 3.49184e6 Alameda 9 │ 1.03541e7 9.69862e6 San Joaquin 10 │ 459473.0 4.30027e5 Kern 11 │ 1.26571e6 1.18696e6 Mendocino diff = Warning: Diff output requires color. unique(group[!, domain]) = InlineStrings.String15["Santa Clara"] unique(group[!, domain]) = InlineStrings.String15["San Diego"] unique(group[!, domain]) = InlineStrings.String15["Merced"] unique(group[!, domain]) = InlineStrings.String15["Los Angeles"] unique(group[!, domain]) = InlineStrings.String15["Orange"] unique(group[!, domain]) = InlineStrings.String15["Fresno"] unique(group[!, domain]) = InlineStrings.String15["Plumas"] unique(group[!, domain]) = InlineStrings.String15["Alameda"] unique(group[!, domain]) = InlineStrings.String15["San Joaquin"] unique(group[!, domain]) = InlineStrings.String15["Kern"] unique(group[!, domain]) = InlineStrings.String15["Mendocino"] 11×3 DataFrame Row │ total SE cname SE cname │ Float64 Float64 String15 ─────┼──────────────────────────────────────── Float64 String15 ─────┼──────────────────────────────────────────── 1 │ 3.22122e6 2.6143e6 6.44244e5 4.2273e5 Santa Clara 2 │ 9.20698e6 8.00251e6 1.2276e6 8.62727e5 San Diego 3 │ 1.0545e6 9.85983e5 │ 70300.2
build: src/bootstrap.jl#L81
doctest failure in ~/work/Survey.jl/Survey.jl/src/bootstrap.jl:81-91 ```jldoctest; setup = :(using Survey, StatsBase, DataFrames; apiclus1 = load_data("apiclus1"); dclus1 = SurveyDesign(apiclus1; clusters = :dnum, weights = :pw); bclus1 = dclus1 |> bootweights;) julia> mean(df::DataFrame, column, weights) = StatsBase.mean(df[!, column], StatsBase.weights(df[!, weights])); julia> variance(:api00, mean, bclus1) 1×2 DataFrame Row │ estimator SE │ Float64 Float64 ─────┼──────────────────── 1 │ 644.169 23.4107 ``` Subexpression: variance(:api00, mean, bclus1) Evaluated output: 1×2 DataFrame Row │ estimator SE │ Float64 Float64 ─────┼──────────────────── 1 │ 644.169 23.4107 Expected output: diff = Warning: Diff output requires color. 1×2 DataFrame Row │ estimator SE │ Float64 Float64 ─────┼──────────────────── 1 │ 644.169 23.4107
build: src/jackknife.jl#L97
doctest failure in ~/work/Survey.jl/Survey.jl/src/jackknife.jl:97-107 ```jldoctest; setup = :(using Survey, StatsBase, DataFrames; apistrat = load_data("apistrat"); dstrat = SurveyDesign(apistrat; strata=:stype, weights=:pw); rstrat = jackknifeweights(dstrat);) julia> mean(df::DataFrame, column, weights) = StatsBase.mean(df[!, column], StatsBase.weights(df[!, weights])); julia> variance(:api00, mean, rstrat) 1×2 DataFrame Row │ estimator SE │ Float64 Float64 ─────┼──────────────────── 1 │ 662.287 9.53613 ``` Subexpression: variance(:api00, mean, rstrat) Evaluated output: 1×2 DataFrame Row │ estimator SE │ Float64 Float64 ─────┼──────────────────── 1 │ 662.287 9.53613 Expected output: diff = Warning: Diff output requires color. 1×2 DataFrame Row │ estimator SE │ Float64 Float64 ─────┼──────────────────── 1 │ 662.287 9.53613
build: src/mean.jl#L47
doctest failure in ~/work/Survey.jl/Survey.jl/src/mean.jl:47-55 ```jldoctest; setup = :(using Survey, StatsBase; apiclus1 = load_data("apiclus1"); dclus1 = SurveyDesign(apiclus1; clusters = :dnum, weights = :pw); bclus1 = dclus1 |> bootweights;) julia> mean(:api00, bclus1) 1×2 DataFrame Row │ mean SE │ Float64 Float64 ─────┼────────────────── 1 │ 644.169 23.4107 ``` Subexpression: mean(:api00, bclus1) Evaluated output: 1×2 DataFrame Row │ mean SE │ Float64 Float64 ─────┼────────────────── 1 │ 644.169 23.4107 Expected output: diff = Warning: Diff output requires color. 1×2 DataFrame Row │ mean SE │ Float64 Float64 ─────┼────────────────── 1 │ 644.169 23.4107
build: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
2 docstrings not included in the manual: Survey.freedman_diaconis :: Tuple{AbstractSurveyDesign, Symbol} Survey.sturges :: Tuple{AbstractSurveyDesign, Symbol} These are docstrings in the checked modules (configured with the modules keyword) that are not included in @docs or @autodocs blocks.
build
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/