Updated variance( ) function #745
Annotations
10 errors and 2 warnings
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
|
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
|
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:72
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:72
Stacktrace:
[1] top-level scope
@ none:1
|
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, :enroll, bclus1)
1×2 DataFrame
Row │ estimator SE
│ Float64 Float64
─────┼─────────────────────
1 │ 1.17182 0.131518
```
Subexpression:
ratio(:api00, :enroll, bclus1)
Evaluated output:
ERROR: MethodError: no method matching ratio(::Symbol, ::Symbol, ::ReplicateDesign{BootstrapReplicates})
Closest candidates are:
ratio(!Matched::Vector{Symbol}, ::Any, ::AbstractSurveyDesign)
@ Survey ~/work/Survey.jl/Survey.jl/src/ratio.jl:72
Stacktrace:
[1] top-level scope
@ none:1
Expected output:
diff =
Warning: Diff output requires color.
ERROR: MethodError: no method matching ratio(::Symbol, ::Symbol, ::ReplicateDesign{BootstrapReplicates})
Closest candidates are:
ratio(!Matched::Vector{Symbol}, ::Any, ::AbstractSurveyDesign)
@ Survey ~/work/Survey.jl/Survey.jl/src/ratio.jl:72
Stacktrace:
[1] top-level scope
@ none:1
|
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
|
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
|
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:
11×1 DataFrame
Row │ total
│ Float64
─────┼────────────────
1 │ 3.7362e6
2 │ 9.58547e5
3 │ 459473.0
4 │ 2.46465e6
5 │ 1.26571e6
6 │ 1.0545e6
7 │ 5.7721e6
8 │ 3.2422e6
9 │ 9.20698e6
10 │ 1.03541e7
11 │ 3.22122e6
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 11×1 DataFrame
Row │ cname total
│ String15 Float64
─────┼─────────────────────────────
─────┼────────────────
1 │ Alameda 249080.0
│ 3.7362e6
2 │ Fresno 63903.1
│ 9.58547e5
3 │ Kern 30631.5
459473.0
4 │ Los Angeles 3.2862e5
│ 2.46465e6
5 │ Mendocino 84380.6
│ 1.26571e6
6 │ Merced 70300.2
│ 1.0545e6
7 │ Orange 3.84807e5
│ 5.7721e6
8 │ Plumas 2.16147e5
│ 3.2422e6
9 │ San Diego 1.2276e6
│ 9.20698e6
10 │ San Joaquin 6.90276e5
│ 1.03541e7
11 │ Santa Clara 6.44244e5│ 3.22122e6
|
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:
11×2 DataFrame
Row │ total SE
│ Float64 Float64
─────┼───────────────────────────
1 │ 3.22122e6 2.6143e6
2 │ 9.20698e6 8.00251e6
3 │ 1.0545e6 9.85983e5
4 │ 2.46465e6 2.15017e6
5 │ 5.7721e6 5.40929e6
6 │ 9.58547e5 8.95488e5
7 │ 3.2422e6 3.03494e6
8 │ 3.7362e6 3.49184e6
9 │ 1.03541e7 9.69862e6
10 │ 459473.0 4.30027e5
11 │ 1.26571e6 1.18696e6
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 11×2 DataFrame
Row │ cname total SE
│ String15 Float64 Float64
─────┼────────────────────────────────────────────
─────┼───────────────────────────
1 │ Santa Clara 6.44244e5 4.2273e5
│ 3.22122e6 2.6143e6
2 │ San Diego 1.2276e6 8.62727e5
│ 9.20698e6 8.00251e6
3 │ Merced 70300.2 71336.3
│ 1.0545e6 9.85983e5
4 │ Los Angeles 3.2862e5 2.93936e5
│ 2.46465e6 2.15017e6
5 │ Orange 3.84807e5 3.88014e5
│ 5.7721e6 5.40929e6
6 │ Fresno 63903.1 64781.7
│ 9.58547e5 8.95488e5
7 │ Plumas 2.16147e5 2.12089e5
│ 3.2422e6 3.03494e6
8 │ Alameda 249080.0 2.49228e5
│ 3.7362e6 3.49184e6
9 │ San Joaquin 6.90276e5 6.81604e5
│ 1.03541e7 9.69862e6
10 │ Kern 30631.5 30870.3
459473.0 4.30027e5
11 │ Mendocino 84380.6 80215.9│ 1.26571e6 1.18696e6
|
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
|
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
|
|
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/
|
The logs for this run have expired and are no longer available.
Loading