Updated variance( ) function #743
Annotations
10 errors and 2 warnings
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×1 DataFrame
Row │ mean
│ Float64
─────┼─────────
1 │ 669.0
2 │ 472.0
3 │ 452.5
4 │ 647.267
5 │ 623.25
6 │ 519.25
7 │ 710.563
8 │ 709.556
9 │ 659.436
10 │ 551.189
11 │ 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 11×1 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
|
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/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/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#L99
doctest failure in ~/work/Survey.jl/Survey.jl/src/total.jl:99-116
```jldoctest totallabel; setup = :(apiclus1 = load_data("apiclus1"); dclus1 = SurveyDesign(apiclus1; clusters = :dnum, weights = :pw); bclus1 = dclus1 |> bootweights)
julia> total(:api00, :cname, dclus1)
11×2 DataFrame
Row │ cname total
│ String15 Float64
─────┼─────────────────────────────
1 │ Alameda 249080.0
2 │ Fresno 63903.1
3 │ Kern 30631.5
4 │ Los Angeles 3.2862e5
5 │ Mendocino 84380.6
6 │ Merced 70300.2
7 │ Orange 3.84807e5
8 │ Plumas 2.16147e5
9 │ San Diego 1.2276e6
10 │ San Joaquin 6.90276e5
11 │ Santa Clara 6.44244e5
```
Subexpression:
total(:api00, :cname, dclus1)
Evaluated output:
ERROR: MethodError: no method matching wsum(::Symbol, ::SurveyDesign)
Stacktrace:
[1] bydomain(::Symbol, ::Symbol, ::SurveyDesign, ::Function; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Survey ~/work/Survey.jl/Survey.jl/src/by.jl:6
[2] bydomain
@ ~/work/Survey.jl/Survey.jl/src/by.jl:1 [inlined]
[3] total(x::Symbol, domain::Symbol, design::SurveyDesign)
@ Survey ~/work/Survey.jl/Survey.jl/src/total.jl:139
[4] top-level scope
@ none:1
Expected output:
11×2 DataFrame
Row │ cname total
│ String15 Float64
─────┼─────────────────────────────
1 │ Alameda 249080.0
2 │ Fresno 63903.1
3 │ Kern 30631.5
4 │ Los Angeles 3.2862e5
5 │ Mendocino 84380.6
6 │ Merced 70300.2
7 │ Orange 3.84807e5
8 │ Plumas 2.16147e5
9 │ San Diego 1.2276e6
10 │ San Joaquin 6.90276e5
11 │ Santa Clara 6.44244e5
diff =
Warning: Diff output requires color.
11×2 DataFrame
Row │ cname total
│ String15 Float64
─────┼─────────────────────────────
1 │ Alameda 249080.0
2 │ Fresno 63903.1
3 │ Kern 30631.5
4 │ Los Angeles 3.2862e5
5 │ Mendocino 84380.6
6 │ Merced 70300.2
7 │ Orange 3.84807e5
8 │ Plumas 2.16147e5
9 │ San Diego 1.2276e6
10 │ San Joaquin 6.90276e5
11 │ Santa Clara 6.44244e5ERROR: MethodError: no method matching wsum(::Symbol, ::SurveyDesign)
Stacktrace:
[1] bydomain(::Symbol, ::Symbol, ::SurveyDesign, ::Function; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Survey ~/work/Survey.jl/Survey.jl/src/by.jl:6
[2] bydomain
@ ~/work/Survey.jl/Survey.jl/src/by.jl:1 [inlined]
[3] total(x::Symbol, domain::Symbol, design::SurveyDesign)
@ Survey ~/work/Survey.jl/Survey.jl/src/total.jl:139
[4] top-level scope
@ none:1
|
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}, ::Function; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Survey ~/work/Survey.jl/Survey.jl/src/by.jl:16
[2] bydomain
@ ~/work/Survey.jl/Survey.jl/src/by.jl:11 [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}, ::Function; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Survey ~/work/Survey.jl/Survey.jl/src/by.jl:16
[2] bydomain
@ ~/work/Survey.jl/Survey.jl/src/by.jl:11 [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:
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/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
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/
|