Skip to content

Commit 502ba76

Browse files
committed
scalarstats.jl
1 parent 17723d5 commit 502ba76

23 files changed

+127
-498
lines changed

Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name = "Statistics"
2-
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2+
uuid = "20745b16-79ce-11e8-11f9-7d13ad32a3b2"
33

44
[deps]
55
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
6+
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
67
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
78

89
[extras]

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33

44
[compat]
5-
Documenter = "0.24"
5+
Documenter = "0.27"

docs/make.jl

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,14 @@ if Base.HOME_PROJECT[] !== nothing
66
end
77

88
makedocs(
9-
sitename = "StatsBase.jl",
10-
modules = [StatsBase],
9+
sitename = "Statistics.jl",
10+
modules = [Statistics],
1111
pages = ["index.md",
1212
"weights.md",
13-
"means.md",
1413
"scalarstats.md",
15-
"robust.md",
16-
"deviation.md",
17-
"cov.md",
18-
"counts.md",
19-
"ranking.md",
20-
"sampling.md",
21-
"empirical.md",
22-
"signalcorr.md",
23-
"multivariate.md",
24-
"misc.md",
25-
"statmodels.md",
26-
"transformations.md"]
14+
"cov.md"]
2715
)
2816

2917
deploydocs(
30-
repo = "github.com/JuliaStats/StatsBase.jl.git"
18+
repo = "github.com/JuliaLang/Statistics.jl.git"
3119
)

docs/src/counts.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/src/cov.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,34 @@
1-
# Scatter Matrix and Covariance
1+
# Covariances and Correlations
22

3-
This package implements functions for computing scatter matrix, as well as weighted covariance matrix.
3+
Functions to computing various types of correlations and covariances are provided.
44

5+
## Covariance, Correlation and Scatter Matrix
56
```@docs
6-
scattermat
77
cov
8-
cov(::CovarianceEstimator, ::AbstractVector)
9-
cov(::CovarianceEstimator, ::AbstractVector, ::AbstractVector)
10-
cov(::CovarianceEstimator, ::AbstractMatrix)
118
cor
12-
mean_and_cov
13-
cov2cor
14-
cor2cov
15-
CovarianceEstimator
16-
SimpleCovariance
9+
```
10+
11+
## Autocovariance and Autocorrelation
12+
13+
```@docs
14+
autocov
15+
autocov!
16+
autocor
17+
autocor!
18+
```
19+
20+
## Cross-covariance and Cross-correlation
21+
22+
```@docs
23+
crosscov
24+
crosscov!
25+
crosscor
26+
crosscor!
27+
```
28+
29+
## Partial Autocorrelation Function
30+
31+
```@docs
32+
pacf
33+
pacf!
1734
```

docs/src/deviation.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/src/empirical.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/src/index.md

Lines changed: 4 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -9,78 +9,7 @@ standard deviation, variance, skewness, kurtosis, correlation and covariance.
99
Statistics can be weighted, and several weights types are distinguished to apply appropriate
1010
corrections where necessary.
1111

12-
## Mean, median and quantiles
13-
14-
```@docs
15-
Statistics.mean
16-
Statistics.mean!
17-
Statistics.median
18-
Statistics.median!
19-
Statistics.middle
20-
Statistics.quantile
21-
Statistics.quantile!
22-
```
23-
24-
## Moments
25-
26-
```@docs
27-
Statistics.std
28-
Statistics.stdm
29-
Statistics.var
30-
Statistics.varm
31-
Statistics.skewness
32-
Statistics.kurtosis
33-
```
34-
35-
## Correlation and covariance
36-
37-
```@docs
38-
Statistics.cor
39-
Statistics.cov
40-
```
41-
42-
## Weights types
43-
44-
Four statistical weights types are provided which inherit from the `AbstractWeights` type:
45-
46-
- `Weights` is a generic type for arbitary weights. Using this type will trigger an error
47-
with functions which rely on assumptions about a particular definition of weights.
48-
- `AnalyticWeights` describe the relative importance for each observation.
49-
These weights may also be referred to as reliability weights, precision weights
50-
or inverse variance weights. These are typically used when the observations
51-
are aggregate values (e.g. averages) with differing variances.
52-
- `FrequencyWeights` describe the number of times (or frequency) each observation
53-
was observed. These weights may also be referred to as case weights or repeat weights.
54-
- `ProbabilityWeights` represent the inverse of the sampling probability
55-
for each observation, providing a correction mechanism for under- or over-sampling
56-
certain population groups. These weights may also be referred to as sampling weights.
57-
58-
The choice of weights impacts how bias is corrected in several methods.
59-
See the [`var`](@ref), [`std`](@ref), [`cov`](@ref) and [`quantile`](@ref)
60-
docstrings for more details.
61-
62-
Short-hand constructors `weights`, `aweights`, `fweights` and `pweights`
63-
are provided for convenience.
64-
65-
!!! note
66-
- The weight vector is a light-weight wrapper of the input vector.
67-
The input vector is NOT copied during construction.
68-
- The weight vector maintains the sum of weights, which is computed upon construction.
69-
If the value of the sum is pre-computed, one can supply it as the second argument
70-
to the constructor and save the time of computing the sum again.
71-
72-
```@docs
73-
Statistics.AbstractWeights
74-
Statistics.Weights
75-
Statistics.AnalyticWeights
76-
Statistics.FrequencyWeights
77-
Statistics.ProbabilityWeights
78-
Statistics.weights
79-
Statistics.aweights
80-
Statistics.fweights
81-
Statistics.pweights
82-
```
83-
84-
```@meta
85-
DocTestSetup = nothing
86-
```
12+
```@contents
13+
Pages = ["weights.md", "scalarstats.md", "cov.md"]
14+
Depth = 2
15+
```

docs/src/means.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs/src/misc.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)