Closed nadiaenh closed 1 year ago
Have you considered how this would work with domain estimation? Where we have mean(:variable, :domain, design)
?
Overall, I think it's a good idea to be able to do ans.estimate
, ans.CI
and ans.SE
. Need to think through the implementation.
It will need a few show methods to make it beautiful.
I suggest having
struct Estimate
value::Number
SE::Number
end
Instead of SummaryStat
and Mean
mean
, quantile
and total
can be factory functions for the structure.
For domain estimation, we'll need a separate struct perhaps
struct DomainEstimates
values::Vector{Number}
SE::Vector{Number}
end
After this, we can have a function confint(x::Estimate).
struct Estimate value::Number SE::Number end
How does this broadcast to estimates which are vectors?
Any reason not to use https://github.com/JuliaPhysics/Measurements.jl here? It's fundamentally the same data structure but probably supported more widely across the ecosystem. In this case a vector estimate would be a vector of Measurement
s.
Merging #277 (bc220b2) into next_release (e9362f9) will decrease coverage by
4.48%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## next_release #277 +/- ##
================================================
- Coverage 100.00% 95.52% -4.48%
================================================
Files 12 14 +2
Lines 200 268 +68
================================================
+ Hits 200 256 +56
- Misses 0 12 +12
Impacted Files | Coverage Δ | |
---|---|---|
src/SummaryStats.jl | 0.00% <0.00%> (ø) |
... and 3 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Any reason not to use https://github.com/JuliaPhysics/Measurements.jl here? It's fundamentally the same data structure but probably supported more widely across the ecosystem. In this case a vector estimate would be a vector of
Measurement
s.
Ayush and I looked at the Measurements.jl package, we see where you are coming from. Except for the pretty printing of uncertainty, their class would not be useful for other aspects of Survey.jl. But some ideas can be adapted from them
Resolves #275, #184, #274 Partial implementation of @smishr's confidence interval function Implemented Mean structure as an abstract SummaryStat
Remaining to do on this PR :
Can implement Total, Quantile, and Ratio later