Package: RASbound
Title: Bounded RAS / Biproportional Matrix Balancing with Cell-Level
        Constraints
Version: 0.0.1
Authors@R: c(
    person(given = "Jose M.",
           family = "Pavía",
           role = c("aut", "cre"),
           email = "jose.m.pavia@uv.es",
           comment = c(ORCID = "0000-0002-0129-726X"))
    )
Description: Implements the RAS method for adjusting a matrix to match
    target row and column totals. In RAS, a matrix A is multiplied on the
    left by a diagonal matrix R and on the right by a diagonal matrix S,
    which gives the method its name. It is also known as biproportional
    matrix balancing, iterative proportional fitting (IPF) or raking.
    The package extends it with lower and upper bounds on individual cells. 
    Provides several algorithmic variants for handling bound violations: 
    hard cell-freezing with simultaneous, sequential, or hybrid fixation; 
    two dependency-free clamp-and-compensate heuristics (proportional 
    redistribution and iterative renormalization); and a naive 
    unconstrained-recompute baseline; together with thin wrapper functions 
    exposing equivalent bounded-calibration methods from the 'survey' 
    package under a common interface. 
    Intended for updating or regionalizing input-output tables, social 
    accounting matrices (SAMs), and other applications where classic RAS/IPF 
    is used but cell-level plausibility ranges must be respected.
    References:
    Deming and Stephan (1940) <doi:10.1214/aoms/1177731829>
    Deville, Saerndal and Sautory (1993) <doi:10.1080/01621459.1993.10476369>
    Acknowledgements:
    The author wishes to thank Conselleria de Educacion, Cultura y Universidades, 
    Generalitat Valenciana (grant CIAICO/2023/031) for supporting this research.
License: GPL-3
Encoding: UTF-8
RoxygenNote: 7.3.2
Depends: R (>= 3.6)
Imports: stats, graphics, grDevices, utils
Suggests: survey, MASS, testthat (>= 3.0.0), knitr, rmarkdown
Config/testthat/edition: 3
VignetteBuilder: knitr
URL: https://github.com/JMPavia/RASbound
BugReports: https://github.com/JMPavia/RASbound/issues
NeedsCompilation: no
Packaged: 2026-10-18 16:59:08 UTC; pavia
Author: Jose M. Pavía [aut, cre] (ORCID:
    <https://orcid.org/0000-0002-0129-726X>)
Maintainer: Jose M. Pavía <jose.m.pavia@uv.es>
Repository: CRAN
Date/Publication: 2026-10-28 11:30:10 UTC
