You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/index.md
+13-14Lines changed: 13 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,18 +12,20 @@ The routine calculates a set of weights that are closest in some sense to an ini
12
12
13
13
```julia
14
14
15
-
functiondoreweighting(
16
-
data ::AbstractArray{ <:Real, 2 },
17
-
initial_weights ::AbstractArray{ <:Real, 1 }, # a column
18
-
target_populations ::AbstractArray{ <:Real, 1 }, # a row
15
+
functiondo_reweighting(
16
+
;
17
+
data, # either AbstractMatrix or e.g dataframe
18
+
initial_weights ::AbstractVector, # a column
19
+
target_populations ::AbstractVector, # a row
19
20
functiontype ::DistanceFunctionType,
20
-
ru::Real=0.0,
21
-
rl::Real=0.0,
22
-
tolx::Real=0.000001,
23
-
tolf::Real=0.000001 ) ::NamedTuple
21
+
upper_multiple=0.0,
22
+
lower_multiple=0.0,
23
+
tol=10^(-10),
24
+
max_iterations=100 )
24
25
25
26
```
26
-
See the for a simple example, based on examples from the Creedy paper.
27
+
28
+
See the tests for simple examples, based on examples from the Creedy paper.
27
29
28
30
The form of 'closeness' used is determined by the `functiontype` parameter of
29
31
enumerated type `DistanceFunctionType`. See the [Creedy and Deville and
@@ -34,6 +36,8 @@ Sarndal](#Bibliography) papers on these. Notes on these:
34
36
* the other measures are taken from the Deville and Sarndal paper and pass simple tests but sometimes fail to converge in real-world situations; whether this is because of something inherent or some mistake I've made I'm unsure;
35
37
* I believe Calmar implements different measures; see also D’Souza.
36
38
39
+
see: Merz (1994) for a good discussion on how to lay out the dataset.
* I really need to use standard Julia optimiser packages, such as [Optim.jl](https://github.com/JuliaNLSolvers/Optim.jl);
50
53
* Chase up and add different closeness measures, e.g the Entropy measure I remember from an old Atkinson and Gomulka working paper, and whatever I can find elsewhere;
0 commit comments