Skip to content

Updated variance( ) function #742

Updated variance( ) function

Updated variance( ) function #742

Triggered via pull request August 4, 2023 03:19
Status Success
Total duration 23m 53s
Artifacts

documentation.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

9 errors and 2 warnings
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/quantile.jl#L51
doctest failure in ~/work/Survey.jl/Survey.jl/src/quantile.jl:51-59 ```jldoctest; setup = :(using Survey, StatsBase; apisrs = load_data("apisrs");srs = SurveyDesign(apisrs; weights=:pw); bsrs = srs |> bootweights;) julia> quantile(:api00, bsrs, 0.5) 1×2 DataFrame Row │ 0.5th percentile SE │ Float64 Float64 ─────┼─────────────────────────── 1 │ 659.0 14.9764 ``` Subexpression: quantile(:api00, bsrs, 0.5) Evaluated output: 1×2 DataFrame Row │ 0.5th percentile SE │ Float64 Float64 ─────┼─────────────────────────── 1 │ 659.0 14.9764 Expected output: diff = Warning: Diff output requires color. 1×2 DataFrame Row │ 0.5th percentile SE │ Float64 Float64 ─────┼─────────────────────────── 1 │ 659.0 14.9764
build: src/ratio.jl#L42
doctest failure in ~/work/Survey.jl/Survey.jl/src/ratio.jl:42-50 ```jldoctest; setup = :(using Survey, StatsBase; apiclus1 = load_data("apiclus1"); dclus1 = SurveyDesign(apiclus1; clusters = :dnum, weights = :pw); bclus1 = bootweights(dclus1);) julia> ratio(:api00, :enroll, bclus1) 1×2 DataFrame Row │ estimator SE │ Float64 Float64 ─────┼───────────────────── 1 │ 1.17182 0.131518 ``` Subexpression: ratio(:api00, :enroll, bclus1) Evaluated output: 1×2 DataFrame Row │ estimator SE │ Float64 Float64 ─────┼───────────────────── 1 │ 1.17182 0.131518 Expected output: diff = Warning: Diff output requires color. 1×2 DataFrame Row │ estimator SE │ Float64 Float64 ─────┼───────────────────── 1 │ 1.17182 0.131518
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: src/mean.jl#L108
doctest failure in ~/work/Survey.jl/Survey.jl/src/mean.jl:108-125 ```jldoctest meanlabel; setup = :(apiclus1 = load_data("apiclus1"); dclus1 = SurveyDesign(apiclus1; clusters = :dnum, weights = :pw); bclus1 = dclus1 |> bootweights) julia> mean(:api00, :cname, dclus1) 11×2 DataFrame Row │ cname mean │ String15 Float64 ─────┼────────────────────── 1 │ Alameda 669.0 2 │ Fresno 472.0 3 │ Kern 452.5 4 │ Los Angeles 647.267 5 │ Mendocino 623.25 6 │ Merced 519.25 7 │ Orange 710.563 8 │ Plumas 709.556 9 │ San Diego 659.436 10 │ San Joaquin 551.189 11 │ Santa Clara 732.077 ``` Subexpression: mean(:api00, :cname, dclus1) Evaluated output: 11×2 DataFrame Row │ cname statistic │ String15 Float64 ─────┼──────────────────────── 1 │ Alameda 669.0 2 │ Fresno 472.0 3 │ Kern 452.5 4 │ Los Angeles 647.267 5 │ Mendocino 623.25 6 │ Merced 519.25 7 │ Orange 710.563 8 │ Plumas 709.556 9 │ San Diego 659.436 10 │ San Joaquin 551.189 11 │ Santa Clara 732.077 Expected output: 11×2 DataFrame Row │ cname mean │ String15 Float64 ─────┼────────────────────── 1 │ Alameda 669.0 2 │ Fresno 472.0 3 │ Kern 452.5 4 │ Los Angeles 647.267 5 │ Mendocino 623.25 6 │ Merced 519.25 7 │ Orange 710.563 8 │ Plumas 709.556 9 │ San Diego 659.436 10 │ San Joaquin 551.189 11 │ Santa Clara 732.077 diff = Warning: Diff output requires color. 11×2 DataFrame Row │ cname mean statistic │ String15 Float64 ─────┼────────────────────── ─────┼──────────────────────── 1 │ Alameda Alameda 669.0 2 │ Fresno Fresno 472.0 3 │ Kern Kern 452.5 4 │ Los Angeles Angeles 647.267 5 │ Mendocino Mendocino 623.25 6 │ Merced Merced 519.25 7 │ Orange Orange 710.563 8 │ Plumas Plumas 709.556 9 │ San Diego Diego 659.436 10 │ San Joaquin Joaquin 551.189 11 │ Santa Clara Clara 732.077
build: src/mean.jl#L128
doctest failure in ~/work/Survey.jl/Survey.jl/src/mean.jl:128-145 ```jldoctest meanlabel julia> mean(:api00, :cname, bclus1) 11×3 DataFrame Row │ cname mean SE │ String15 Float64 Float64 ─────┼──────────────────────────────────── 1 │ Santa Clara 732.077 58.2169 2 │ San Diego 659.436 2.66703 3 │ Merced 519.25 2.28936e-15 4 │ Los Angeles 647.267 47.6233 5 │ Orange 710.563 2.19826e-13 6 │ Fresno 472.0 1.13687e-13 7 │ Plumas 709.556 1.26058e-13 8 │ Alameda 669.0 1.27527e-13 9 │ San Joaquin 551.189 2.1791e-13 10 │ Kern 452.5 0.0 11 │ Mendocino 623.25 1.09545e-13 ``` Subexpression: mean(:api00, :cname, bclus1) Evaluated output: 11×2 DataFrame Row │ mean SE │ Float64 Float64 ─────┼────────────────── 1 │ 732.077 NaN 2 │ 659.436 NaN 3 │ 519.25 NaN 4 │ 647.267 NaN 5 │ 710.563 NaN 6 │ 472.0 NaN 7 │ 709.556 NaN 8 │ 669.0 NaN 9 │ 551.189 NaN 10 │ 452.5 NaN 11 │ 623.25 NaN Expected output: 11×3 DataFrame Row │ cname mean SE │ String15 Float64 Float64 ─────┼──────────────────────────────────── 1 │ Santa Clara 732.077 58.2169 2 │ San Diego 659.436 2.66703 3 │ Merced 519.25 2.28936e-15 4 │ Los Angeles 647.267 47.6233 5 │ Orange 710.563 2.19826e-13 6 │ Fresno 472.0 1.13687e-13 7 │ Plumas 709.556 1.26058e-13 8 │ Alameda 669.0 1.27527e-13 9 │ San Joaquin 551.189 2.1791e-13 10 │ Kern 452.5 0.0 11 │ Mendocino 623.25 1.09545e-13 diff = Warning: Diff output requires color. 11×3 11×2 DataFrame Row │ cname mean SE │ String15 Float64 Float64 ─────┼──────────────────────────────────── ─────┼────────────────── 1 │ Santa Clara 732.077 58.2169 732.077 NaN 2 │ San Diego 659.436 2.66703 659.436 NaN 3 │ Merced 519.25 2.28936e-15 519.25 NaN 4 │ Los Angeles 647.267 47.6233 647.267 NaN 5 │ Orange 710.563 2.19826e-13 710.563 NaN 6 │ Fresno 472.0 1.13687e-13 472.0 NaN 7 │ Plumas 709.556 1.26058e-13 709.556 NaN 8 │ Alameda 669.0 1.27527e-13 669.0 NaN 9 │ San Joaquin 551.189 2.1791e-13 551.189 NaN 10 │ Kern 452.5 0.0 452.5 NaN 11 │ Mendocino 623.25 1.09545e-13623.25 NaN
build: src/total.jl#L38
doctest failure in ~/work/Survey.jl/Survey.jl/src/total.jl:38-46 ```jldoctest; setup = :(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#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 │ cname total SE │ String15 Float64 Float64 ─────┼──────────────────────────────────────────── 1 │ Santa Clara 6.44244e5 4.2273e5 2 │ San Diego 1.2276e6 8.62727e5 3 │ Merced 70300.2 71336.3 4 │ Los Angeles 3.2862e5 2.93936e5 5 │ Orange 3.84807e5 3.88014e5 6 │ Fresno 63903.1 64781.7 7 │ Plumas 2.16147e5 2.12089e5 8 │ Alameda 249080.0 2.49228e5 9 │ San Joaquin 6.90276e5 6.81604e5 10 │ Kern 30631.5 30870.3 11 │ Mendocino 84380.6 80215.9 ``` Subexpression: total(:api00, :cname, bclus1) Evaluated output: ERROR: MethodError: no method matching wsum(::Symbol, ::ReplicateDesign{BootstrapReplicates}) Stacktrace: [1] bydomain(::Symbol, ::Symbol, ::ReplicateDesign{BootstrapReplicates}, ::typeof(StatsBase.wsum); kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ Survey ~/work/Survey.jl/Survey.jl/src/by.jl:12 [2] bydomain @ ~/work/Survey.jl/Survey.jl/src/by.jl:7 [inlined] [3] total(x::Symbol, domain::Symbol, design::ReplicateDesign{BootstrapReplicates}) @ Survey ~/work/Survey.jl/Survey.jl/src/total.jl:139 [4] top-level scope @ none:1 Expected output: 11×3 DataFrame Row │ cname total SE │ String15 Float64 Float64 ─────┼──────────────────────────────────────────── 1 │ Santa Clara 6.44244e5 4.2273e5 2 │ San Diego 1.2276e6 8.62727e5 3 │ Merced 70300.2 71336.3 4 │ Los Angeles 3.2862e5 2.93936e5 5 │ Orange 3.84807e5 3.88014e5 6 │ Fresno 63903.1 64781.7 7 │ Plumas 2.16147e5 2.12089e5 8 │ Alameda 249080.0 2.49228e5 9 │ San Joaquin 6.90276e5 6.81604e5 10 │ Kern 30631.5 30870.3 11 │ Mendocino 84380.6 80215.9 diff = Warning: Diff output requires color. 11×3 DataFrame Row │ cname total SE │ String15 Float64 Float64 ─────┼──────────────────────────────────────────── 1 │ Santa Clara 6.44244e5 4.2273e5 2 │ San Diego 1.2276e6 8.62727e5 3 │ Merced 70300.2 71336.3 4 │ Los Angeles 3.2862e5 2.93936e5 5 │ Orange 3.84807e5 3.88014e5 6 │ Fresno 63903.1 64781.7 7 │ Plumas 2.16147e5 2.12089e5 8 │ Alameda 249080.0 2.49228e5 9 │ San Joaquin 6.90276e5 6.81604e5 10 │ Kern 30631.5 30870.3 11 │ Mendocino 84380.6 80215.9ERROR: MethodError: no method matching wsum(::Symbol, ::ReplicateDesign{BootstrapReplicates}) Stacktrace: [1] bydomain(::Symbol, ::Symbol, ::ReplicateDesign{BootstrapReplicates}, ::typeof(StatsBase.wsum); kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ Survey ~/work/Survey.jl/Survey.jl/src/by.jl:12 [2] bydomain @ ~/work/Survey.jl/Survey.jl/src/by.jl:7 [inlined] [3] total(x::Symbol, domain::Symbol, design::ReplicateDesign{BootstrapReplicates}) @ Survey ~/work/Survey.jl/Survey.jl/src/total.jl:139 [4] top-level scope @ none:1
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/