{
  "_id": "6ad09cf3576abc75bd5cd9fd",
  "Package": "stratifyR",
  "Type": "Package",
  "Title": "Optimal Stratification of Univariate Populations",
  "Version": "2.0-2",
  "Date": "2026-10-14",
  "Authors@R": "c(\nperson(\"Karuna G.\", \"Reddy\",\nemail   = \"karuna.reddy@auckland.ac.nz\",\nrole    = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \"0000-0002-9467-4668\")),\nperson(\"M. G. M.\", \"Khan\",\nemail  = \"mgm.khan@usp.ac.fj\",\nrole   = \"aut\")\n)",
  "Description": "Determines Optimum Strata Boundaries (OSB) and Optimum\nSample Sizes (OSS) for univariate stratified sampling designs\nunder Neyman allocation.  The stratification variable is\ndescribed by a best-fitting parametric distribution, selected\nautomatically by AIC from a set of continuous families (normal,\nlog-normal, gamma, Weibull, exponential, Cauchy, uniform,\nPareto, triangular and right-triangular), and the optimum\nboundaries are obtained by minimising the Neyman objective.\nVersion 2.0 keeps the Dynamic Programming (DP) solver of Reddy\nand Khan (2020), which is globally optimal for the fitted\ndistribution, as the default.  It adds two fast derivative-free\nsolvers, a multi-start 'COBYLA' solver and a two-phase global\nsolver that couples 'DIRECT-L' with 'BOBYQA' refinement, and an\nexact solver that runs dynamic programming on the sorted data\nand returns the partition with the smallest empirical Neyman\ncost.  It also provides cost-constrained allocation with\nunequal per-stratum costs, a design-efficiency comparison\n(compare_designs), two- and three-dimensional and interactive\nvisualisations, solution-quality diagnostics (a Cauchy-Schwarz\noptimality gap and KKT first-order residuals for the\nderivative-free solvers) and a self-contained 'shiny'\napplication, while remaining backward compatible with the\nstrata.data() and strata.distr() interface of version 1.x.  The\nmethodology follows Khan et al. (2008)\n<https://www150.statcan.gc.ca/n1/pub/12-001-x/2008002/article/10761-eng.pdf>,\nReddy and Khan (2018) <doi:10.1111/anzs.12244> and Reddy and\nKhan (2020) <doi:10.1111/anzs.12301>.",
  "License": "GPL (>= 3)",
  "URL": "https://github.com/karunaredz/stratifyR",
  "BugReports": "https://github.com/karunaredz/stratifyR/issues",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "VignetteBuilder": "knitr",
  "RoxygenNote": "7.3.1",
  "NeedsCompilation": "no",
  "Config/pak/sysreqs": "cmake make libicu-dev",
  "Repository": "https://karunaredz.r-universe.dev",
  "Date/Publication": "2026-10-14 22:06:22 UTC",
  "RemoteUrl": "https://github.com/karunaredz/stratifyr",
  "RemoteRef": "HEAD",
  "RemoteSha": "dc7fdb5630b128d83cd397d373a0d399fad75962",
  "Packaged": {
    "Date": "2026-10-15 09:10:20 UTC",
    "User": "root"
  },
  "Author": "Karuna G. Reddy [aut, cre] (ORCID:\n<https://orcid.org/0000-0002-9467-4668>),\nM. G. M. Khan [aut]",
  "Maintainer": "Karuna G. Reddy <karuna.reddy@auckland.ac.nz>",
  "_user": "karunaredz",
  "_type": "src",
  "_file": "stratifyR_2.0-2.tar.gz",
  "_fileid": "https://r2.ropensci.org/3f22c41d759bfc9337711b61443d32e8ddcdeec928f05237dfb1defe5a45d880",
  "_filesize": 1374313,
  "_sha256": "3f22c41d759bfc9337711b61443d32e8ddcdeec928f05237dfb1defe5a45d880",
  "_expires": "2027-01-23T09:29:21.000Z",
  "_created": "2026-10-15T09:10:20.000Z",
  "_published": "2026-10-15T09:29:23.469Z",
  "_buildurl": "https://github.com/r-universe/karunaredz/actions/runs/38710202414",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_jobs": [
    {
      "job": 116342177103,
      "time": 188,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11960686994"
    },
    {
      "job": 116342177138,
      "time": 175,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11960676653"
    },
    {
      "job": 116342177231,
      "time": 211,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11961312458"
    },
    {
      "job": 116342177232,
      "time": 223,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11960689799"
    },
    {
      "job": 116339561550,
      "time": 381,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11960795924"
    },
    {
      "job": 116342176962,
      "time": 126,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "11960881159"
    },
    {
      "job": 116342176975,
      "time": 135,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11960851299"
    },
    {
      "job": 116342176979,
      "time": 121,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11960801330"
    },
    {
      "job": 116342177072,
      "time": 123,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11960421974"
    }
  ],
  "_upstream": "https://github.com/karunaredz/stratifyr",
  "_commit": {
    "id": "dc7fdb5630b128d83cd397d373a0d399fad75962",
    "author": "Karuna Reddy <karunaredz@gmail.com>",
    "committer": "Karuna Reddy <karunaredz@gmail.com>",
    "message": "Vignette: working with results; quieter fitting\n",
    "time": 1792015582
  },
  "_maintainer": {
    "name": "Karuna G. Reddy",
    "email": "karuna.reddy@auckland.ac.nz",
    "orcid": "0000-0002-9467-4668"
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1.0",
      "role": "Depends"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "graphics",
      "role": "Imports"
    },
    {
      "package": "grDevices",
      "role": "Imports"
    },
    {
      "package": "MASS",
      "role": "Imports"
    },
    {
      "package": "fitdistrplus",
      "version": ">= 1.1.0",
      "role": "Imports"
    },
    {
      "package": "nloptr",
      "version": ">= 2.0.0",
      "role": "Imports"
    },
    {
      "package": "actuar",
      "role": "Imports"
    },
    {
      "package": "mc2d",
      "role": "Imports"
    },
    {
      "package": "shiny",
      "role": "Suggests"
    },
    {
      "package": "bslib",
      "role": "Suggests"
    },
    {
      "package": "DT",
      "role": "Suggests"
    },
    {
      "package": "readxl",
      "role": "Suggests"
    },
    {
      "package": "stratification",
      "role": "Suggests"
    },
    {
      "package": "plotly",
      "version": ">= 4.10.0",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "role": "Suggests"
    },
    {
      "package": "crayon",
      "role": "Suggests"
    },
    {
      "package": "kableExtra",
      "role": "Suggests"
    },
    {
      "package": "triangle",
      "role": "Suggests"
    }
  ],
  "_owner": "karunaredz",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-42",
      "n": 3
    }
  ],
  "_tags": [],
  "_stars": 0,
  "_contributors": [
    {
      "user": "karunaredz",
      "count": 3,
      "uuid": 4474536
    }
  ],
  "_userbio": {
    "uuid": 4474536,
    "type": "user",
    "name": "karunaredz",
    "followers": 2
  },
  "_downloads": {
    "count": 703,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/stratifyR"
  },
  "_devurl": "https://github.com/karunaredz/stratifyr",
  "_searchresults": 25,
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/stratifyR.html"
  ],
  "_homeurl": "https://github.com/karunaredz/stratifyr",
  "_realowner": "karunaredz",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0-1",
      "date": "2018-04-12"
    },
    {
      "version": "1.0-2",
      "date": "2019-09-27"
    },
    {
      "version": "1.0-3",
      "date": "2021-12-07"
    },
    {
      "version": "1.0-4",
      "date": "2025-02-23"
    },
    {
      "version": "1.0-5",
      "date": "2026-06-23"
    },
    {
      "version": "2.0-1",
      "date": "2026-09-10"
    },
    {
      "version": "2.0-2",
      "date": "2026-10-15"
    }
  ],
  "_exports": [
    "compare_designs",
    "strata.data",
    "strata.distr",
    "stratifyRApp"
  ],
  "_datasets": [
    {
      "name": "anaemia",
      "title": "Micronutrient data on Anaemia in Fiji",
      "object": "anaemia",
      "class": [
        "data.frame"
      ],
      "fields": [
        "Haemoglobin",
        "Iron",
        "Folate"
      ],
      "rows": 724,
      "table": true,
      "tojson": true
    },
    {
      "name": "hies",
      "title": "Household Income Expenditure Survey (HIES) in Fiji",
      "object": "hies",
      "class": [
        "data.frame"
      ],
      "fields": [
        "Expenditure",
        "Income"
      ],
      "rows": 3566,
      "table": true,
      "tojson": true
    },
    {
      "name": "math",
      "title": "Mathematics Marks for First-year University Students",
      "object": "math",
      "class": [
        "data.frame"
      ],
      "fields": [
        "cw",
        "end_exam",
        "final_marks",
        "grade"
      ],
      "rows": 487,
      "table": true,
      "tojson": true
    },
    {
      "name": "sugarcane",
      "title": "Sugarcane Farming Data in Fiji",
      "object": "sugarcane",
      "class": [
        "data.frame"
      ],
      "fields": [
        "DispArea",
        "Production",
        "Income"
      ],
      "rows": 13894,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "anaemia",
      "title": "Micronutrient data on Anaemia in Fiji",
      "topics": [
        "anaemia"
      ]
    },
    {
      "page": "compare_designs",
      "title": "Compare Survey Design Efficiencies",
      "topics": [
        "compare_designs",
        "compare_designs.strata",
        "print.compare_designs"
      ]
    },
    {
      "page": "create.mat",
      "title": "To create and store calculated values of the objective function",
      "topics": [
        "create.mat"
      ]
    },
    {
      "page": "data.alloc",
      "title": "Allocate data To calculate the stratum sample sizes (nh) for a fixed sample size (n) directly based on the data",
      "topics": [
        "data.alloc"
      ]
    },
    {
      "page": "data.optim",
      "title": "To implement the Dynamic Programming (DP) solution procedure on the stratification problem presented in the form of a Mathematical Programming Problem (MPP)",
      "topics": [
        "data.optim"
      ]
    },
    {
      "page": "data.root",
      "title": "Calculate the objective function value for a given (d, y)",
      "topics": [
        "data.root"
      ]
    },
    {
      "page": "distr.alloc",
      "title": "To calculate the stratum sample sizes (nh) for a fixed sample size (n) based on the hypothetical distribution of the data",
      "topics": [
        "distr.alloc"
      ]
    },
    {
      "page": "distr.optim",
      "title": "To implement the Dynamic Programming (DP) solution procedure on the stratification problem presented in the form of a Mathematical Programming Problem (MPP)",
      "topics": [
        "distr.optim"
      ]
    },
    {
      "page": "distr.root",
      "title": "Calculate the objective function value for a given (d, y) under a hypothesized distribution (scaled-data formulation)",
      "topics": [
        "distr.root"
      ]
    },
    {
      "page": "erf",
      "title": "To calculate the error for a normal variable",
      "topics": [
        "erf"
      ]
    },
    {
      "page": "get.dist",
      "title": "Determine best-fit distribution Identify the best-fit distribution for a univariate numeric vector",
      "topics": [
        "get.dist"
      ]
    },
    {
      "page": "hies",
      "title": "Household Income Expenditure Survey (HIES) in Fiji",
      "topics": [
        "hies"
      ]
    },
    {
      "page": "math",
      "title": "Mathematics Marks for First-year University Students",
      "topics": [
        "math"
      ]
    },
    {
      "page": "minim.val",
      "title": "To identify the minimum value out of two given sets of values",
      "topics": [
        "minim.val"
      ]
    },
    {
      "page": "mode.val",
      "title": "To calculate the modal value of the data",
      "topics": [
        "mode.val"
      ]
    },
    {
      "page": "plot.strata",
      "title": "Plot Method for Stratified Survey Design Objects",
      "topics": [
        "plot.strata"
      ]
    },
    {
      "page": "print.strata",
      "title": "Print Method for Stratified Survey Design Objects",
      "topics": [
        "print.strata"
      ]
    },
    {
      "page": "realloc",
      "title": "To re-allocate the stratum sample sizes (nh)",
      "topics": [
        "realloc"
      ]
    },
    {
      "page": "strata.data",
      "title": "Stratification of Univariate Survey Population Using the Data",
      "topics": [
        "strata.data"
      ]
    },
    {
      "page": "strata.distr",
      "title": "Stratification of Univariate Survey Population Using the Distribution",
      "topics": [
        "strata.distr"
      ]
    },
    {
      "page": "stratifyRApp",
      "title": "Launch the stratifyR 2.0 Interactive Shiny Application",
      "topics": [
        "stratifyRApp"
      ]
    },
    {
      "page": "sugarcane",
      "title": "Sugarcane Farming Data in Fiji",
      "topics": [
        "sugarcane"
      ]
    },
    {
      "page": "summary.strata",
      "title": "Format and Present Results",
      "topics": [
        "summary.strata"
      ]
    }
  ],
  "_pkglogo": "https://github.com/karunaredz/stratifyr/raw/HEAD/man/figures/logo.png",
  "_rundeps": [
    "abind",
    "actuar",
    "backports",
    "boot",
    "broom",
    "car",
    "carData",
    "cli",
    "colorspace",
    "corrplot",
    "cowplot",
    "cpp11",
    "Deriv",
    "doBy",
    "dplyr",
    "expint",
    "farver",
    "fitdistrplus",
    "forecast",
    "Formula",
    "fracdiff",
    "generics",
    "ggplot2",
    "ggpubr",
    "ggrepel",
    "ggsci",
    "ggsignif",
    "glue",
    "gridExtra",
    "gtable",
    "isoband",
    "labeling",
    "lattice",
    "lifecycle",
    "lme4",
    "lmtest",
    "magrittr",
    "MASS",
    "Matrix",
    "MatrixModels",
    "mc2d",
    "mgcv",
    "minqa",
    "modelr",
    "mvtnorm",
    "nlme",
    "nloptr",
    "nnet",
    "numDeriv",
    "pbkrtest",
    "pillar",
    "pkgconfig",
    "polynom",
    "purrr",
    "quantreg",
    "R6",
    "rbibutils",
    "RColorBrewer",
    "Rcpp",
    "RcppArmadillo",
    "RcppEigen",
    "Rdpack",
    "reformulas",
    "rlang",
    "rstatix",
    "S7",
    "scales",
    "SparseM",
    "stringi",
    "stringr",
    "survival",
    "tibble",
    "tidyr",
    "tidyselect",
    "timeDate",
    "urca",
    "utf8",
    "vctrs",
    "viridisLite",
    "withr",
    "zoo"
  ],
  "_vignettes": [
    {
      "source": "stratifyR-vignette.Rmd",
      "filename": "stratifyR-vignette.html",
      "title": "R Package 'stratifyR'",
      "author": "K.G. Reddy & M.G.M. Khan",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Using stratifyR through the interactive app",
        "Introduction",
        "The Package in a Glance",
        "General Formulation of the Univariate Stratification Problem \\label",
        "Dynamic Programming Technique as a Solution Procedure",
        "Optimum Sample Sizes Using Neyman Allocation",
        "Overview of Package Functionalities",
        "The Function strata.data()",
        "The Function strata.distr()",
        "Alternative Optimisation Methods: COBYLA, GLOBAL and EXACT",
        "Motivation",
        "The COBYLA Method (method = \"cobyla\")",
        "The GLOBAL Method (method = \"global\")",
        "The EXACT Method (method = \"exact\")",
        "Which method should I use?",
        "Application: Comparing Methods for strata.distr",
        "Application: Comparing Methods for strata.data",
        "Working with the Results",
        "What is in a result",
        "How many strata?",
        "Comparing with simpler designs",
        "Different costs per stratum",
        "Plots",
        "Large frames and the exact solver",
        "Application to Numerous Survey Populations",
        "Stratification for a Survey Variable with Pareto Type II Distribution",
        "MPP Formulation for Pareto Type II Distribution",
        "DP Solution for Pareto Type II Distribution",
        "A Numerical Example for Pareto Type II Distribution",
        "Stratification for a Survey Variable with Triangular Distribution",
        "DP Solution for Triangular Distribution",
        "A Numerical Example for Triangular Distribution",
        "Stratification for a Survey Variable with Right-Triangular Distribution",
        "DP Solution for Right-Triangular Distribution",
        "A Numerical Example for Right-Triangular Distribution",
        "Stratification for a Survey Variable with Weibull Distribution",
        "DP Solution for Weibull Distribution",
        "A Numerical Example for Weibull Distribution",
        "Stratification for a Survey Variable with Gamma Distribution",
        "DP Solution for Gamma Distribution",
        "A Numerical Example for Gamma Distribution",
        "Stratification for a Survey Variable with Exponential Distribution",
        "DP Solution for Exponential Distribution",
        "A Numerical Example for Exponential Distribution",
        "Stratification for a Survey Variable with Uniform Distribution",
        "DP Solution for Uniform Distribution",
        "A Numerical Example for Uniform Distribution",
        "Stratification for a Survey Variable with Normal Distribution",
        "DP Solution for Normal Distribution",
        "A Numerical Example for Normal Distribution",
        "Stratification for a Survey Variable with Log-Normal Distribution",
        "DP Solution for Log-Normal Distribution",
        "A Numerical Example for Log-Normal Distribution",
        "Stratification for a Survey Variable with Cauchy Distribution",
        "DP Solution for Cauchy Distribution",
        "A Numerical Example for Cauchy Distribution",
        "Summary of Method Comparison Across All Supported Distributions",
        "References"
      ],
      "created": "2026-10-14 20:47:24",
      "modified": "2026-10-14 22:06:22",
      "commits": 2
    }
  ],
  "_score": 3.3979400086720375,
  "_indexed": true,
  "_nocasepkg": "stratifyr",
  "_universes": [
    "karunaredz"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "2.0-2",
      "date": "2026-10-15T09:12:59.000Z",
      "distro": "resolute",
      "commit": "dc7fdb5630b128d83cd397d373a0d399fad75962",
      "fileid": "https://r2.ropensci.org/57d5d14ba42f3e9e03f2da26b83387d7ba6cc386f71c141528dac633e4cbf9f5",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/karunaredz/actions/runs/38710202414"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "2.0-2",
      "date": "2026-10-15T09:13:06.000Z",
      "distro": "resolute",
      "commit": "dc7fdb5630b128d83cd397d373a0d399fad75962",
      "fileid": "https://r2.ropensci.org/488d7c2bd35cb3e2dac3e65a5ed734b8a4d69c61e453a5a2fccfb574bab77e66",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/karunaredz/actions/runs/38710202414"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "2.0-2",
      "date": "2026-10-15T09:23:00.000Z",
      "commit": "dc7fdb5630b128d83cd397d373a0d399fad75962",
      "fileid": "https://r2.ropensci.org/ba4b3f665e05041c5d5081d5c672831575e9a5cd0fd9e9e6897d263704b7213e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/karunaredz/actions/runs/38710202414"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "2.0-2",
      "date": "2026-10-15T09:27:22.000Z",
      "commit": "dc7fdb5630b128d83cd397d373a0d399fad75962",
      "fileid": "https://r2.ropensci.org/f3e4780cb5e7cf3a38db7b8337b1e48b89aecbfc9e852339a40246add3e4dec6",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/karunaredz/actions/runs/38710202414"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "2.0-2",
      "date": "2026-10-15T09:12:56.000Z",
      "commit": "dc7fdb5630b128d83cd397d373a0d399fad75962",
      "fileid": "https://r2.ropensci.org/00eb698db8755f2c8bb830a7f7a6e96622eb6496c624a6037bc1a028b3086533",
      "status": "success",
      "buildurl": "https://github.com/r-universe/karunaredz/actions/runs/38710202414"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "2.0-2",
      "date": "2026-10-15T09:11:54.000Z",
      "commit": "dc7fdb5630b128d83cd397d373a0d399fad75962",
      "fileid": "https://r2.ropensci.org/284dbe135056250b683b9df2dca54dd9e95c68690bc8dd8845e08004f5713370",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/karunaredz/actions/runs/38710202414"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "2.0-2",
      "date": "2026-10-15T09:11:46.000Z",
      "commit": "dc7fdb5630b128d83cd397d373a0d399fad75962",
      "fileid": "https://r2.ropensci.org/3b5d0f58e38e71b640cb765fa51f5af9a71c1991e986a9310f9b27df8c5ce6e3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/karunaredz/actions/runs/38710202414"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "2.0-2",
      "date": "2026-10-15T09:11:48.000Z",
      "commit": "dc7fdb5630b128d83cd397d373a0d399fad75962",
      "fileid": "https://r2.ropensci.org/ca6828a6bb6f51ce9858ed6503053c858304e4b88e4fa279f867455f612e2634",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/karunaredz/actions/runs/38710202414"
    }
  ]
}