ml_replicate(). Getting a replication algorithm now is guaranteed to work even without the mlfit package in the current environment. This can be an fatal issue when mlfit is internally called by another package. The root cause of this is in the .get_int_fnc() that uses as.environment(“package:mlfit”).
prior_weightsargument. The name of a weight column in the reference sample to be used as prior weights should be specified using the
NULLas their default value.
ml_problem()not allowing single-level control when the
geo_hierarchyargument is not
NULL. (#78, @walkerke)
ml_problem(). Simply specify the name of the weight column in your reference sample using the
special_field_names(). (#78, @walkerke)
Harmonize yaml formatting.
Revert changes to matrix section.
Also check dev on cran-* branches.
Update hash key for dev.
Remove R 3.3.
flat_weightsfield of an
ml_fitobject when there are one or more entries that correspond to zero-valued controls in its
geo_hierarchyargument, which let the user specifies a region and zone table for creating a list of
ml_problemobjects based on zones. See the
READMEpage for an example. Printing
ml_problemwill also show its zone, if exists.
ml_problem()to be consistent with the other main functions (
fitting_problemas first argument to better support pipe workflows (#41).
ml_replicate()which helps to replicate the reference sample of a fitted problem.
ml_replicate()for replicating the reference sample of a fitted problem (#38).
verbose = TRUEare prepended with a time stamp.
NAgroup ID found.
tolargument, which determines the success of a fitting operation.
ml_fitobjects have new members
as.flat_ml_fit_problem()is used to coerce input for the
print()methods for classes
model_matrix_typeargument that allows selecting an alternative model matrix building method where all cross-classifications are allocated to a column, regardless of overlaps. Flattened problems store the type of model matrix used, it is also shown with the
NAvalues in controls.
grakepackage again for calibration, because the alternatives are worse:
samplinguses a too low tolerance,
laekencould work but is unrelated (which is the reason
grakehas been started in the first place).
toy_example()allows easier access to bundled examples, load with
dplyrfunctions instead of
data.table(explicitly convert to
Matrixpackage if necessary
fitting_problem(as returned by the
import_IPAF_problemfunctions); former calls like
ml_fit(ref_sample, controls, field_names)now need to be written as
grakepackage instead of
ml_fit_dss, passed down to calibWeights
ml_fit_dss with an implementation very close to the paper by Deville et al. (1993); implementation in the
normalize weights to get rid of precision problems
allow partly uncontrolled attributes and controls without observations in the reference sample (with a warning, #24)
better error reporting for non-factor controls and existence of group ID column
improve warning and progress messages
return correct weights – regression introduced in # mlfit 0.0.9
rewrite transformation of weights using sparse matrices and a home-grown Moore-Penrose inverse for our (very special) transformation matrix (#17)
warn on missing observations for nonzero controls (#20)
ml_fit_entropy_o also returns flat weights
allow arbitrary order in control total tables (#19)
remove observations that correspond to zero-valued control totals, with warning; don’t warn if no corresponding observations need to be removed (#16)
support multiple controls at individual or group level, also detect conflicting control totals
support fitting one-dimensional problems (where only group-level controls are given)
flatten_ml_fit_problem: transform representation as returned by
import_IPAF_result into a matrix, a control vector and a weights vector
ml_fit: new parameter
aggregate identical household types, implement prior weights (so far only internally)
import_IPAF_resultsnow returns a class of type
ml_ipf_entropy_o, implementation does not yet return the same weights as the Python code
Fix importing configuration files with more than one control of any type and with comments in the control definition
import, defaults to
importthat allows importing also intermediate weights. The output format of
importhas changed, the weights for each algorithm are now always a list of weight vectors, even in the default case
all_weights == FALSE(#5).