Package: fieldopt 0.1.0.9001

André Leite

fieldopt: Area-Frame and Dual-Frame Survey Design under Real Field Cost

Design of agricultural and other area-frame and dual-frame (area plus list) sample surveys that go to the field, with the real cost of field work (travel between sampling units plus interviews) next to the variance of the design-based estimator. Travel matrices from coordinates or a road network; GRASP routing of the field work for one or several teams; stratified spatially balanced (local pivotal) or spatially ordered systematic selection of segments with interpenetrating replicates; points inside segments with multiplicity (expected-hits) estimation; closed, open and weighted segment estimators; Horvitz-Thompson estimation with local-mean or replicate variances; cost-aware allocation across strata, Hartley's dual-frame allocation with an overlap, and two-stage allocation with a cost function; and the cost-variance frontier of a design by simulation. The computational engine is the Rust crate 'fieldopt-core'. The methods follow Grafström, Lundström and Schelin (2012) <doi:10.1111/j.1541-0420.2011.01699.x> for the local pivotal method, Grafström and Schelin (2014) <doi:10.1111/sjos.12016> for the local-mean variance, Hartley (1962) for the dual-frame design, and Beardwood, Halton and Hammersley (1959) <doi:10.1017/S0305004100034095> for the square-root law of travel behind the cost curve.

Authors:André Leite [aut, cre], Raydonal Ospina [aut], Cristiano Ferraz [aut], The authors of the dependency Rust crates [ctb]

fieldopt_0.1.0.9001.tar.gz
fieldopt_0.1.0.9001.zip(r-4.7-x86_64)fieldopt_0.1.0.9001.zip(r-4.7-arm64)fieldopt_0.1.0.9001.zip(r-4.6-x86_64)fieldopt_0.1.0.9001.zip(r-4.6-arm64)fieldopt_0.1.0.9001.zip(r-4.5-x86_64)
fieldopt_0.1.0.9001.tgz(r-4.6-x86_64)fieldopt_0.1.0.9001.tgz(r-4.6-arm64)fieldopt_0.1.0.9001.tgz(r-4.5-x86_64)fieldopt_0.1.0.9001.tgz(r-4.5-arm64)
fieldopt_0.1.0.9001.tar.gz(r-4.7-arm64)fieldopt_0.1.0.9001.tar.gz(r-4.7-x86_64)fieldopt_0.1.0.9001.tar.gz(r-4.6-arm64)fieldopt_0.1.0.9001.tar.gz(r-4.6-x86_64)
fieldopt_0.1.0.9001.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
fieldopt/json (API)

# Install 'fieldopt' in R:
install.packages('fieldopt', repos = c('https://castlaboratory.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/castlaboratory/fieldopt/issues

Pkgdown/docs site:https://castlaboratory.github.io

On CRAN:

Conda:

rustcargo

5.12 score 19 scripts 7 downloads 35 exports 23 dependencies

Last updated from:115376dac3. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK190
linux-devel-x86_64OK188
source / vignettesOK358
linux-release-arm64OK300
linux-release-x86_64OK262
macos-release-arm64OK157
macos-release-x86_64OK523
macos-oldrel-arm64OK192
macos-oldrel-x86_64OK487
windows-devel-arm64OK337
windows-devel-x86_64OK264
windows-release-arm64OK346
windows-release-x86_64OK502
windows-oldrel-x86_64OK211
wasm-releaseOK308

Exports:as_frameas_sfas_svydesignautoplotcore_versioncost_variance_frontierdesign_variancedual_frame_allocationdual_frame_designdual_frame_estimatorexpected_hitsfield_cost_modelframe_allocationframe_overlapglancemultivariate_allocationpoint_design_effectpoint_estimatorpoint_expected_hitsratio_estimatorread_areaframeroute_fieldworkrouted_cost_curverouted_unit_costsampledschedule_calendarschedule_fieldworksegment_estimatorselect_pointsselect_unitsspatial_balancetidytravel_matrixtwo_stage_allocationtwo_stage_design

Dependencies:clicpp11farvergenericsggplot2gluegtableisobandlabelinglifecyclemagrittrpillarpkgconfigR6RColorBrewerrlangS7scalestibbleutf8vctrsviridisLitewithr

An area frame with points, a list frame, and their joint design
The area frame: cells with intensity classes | Stratified selection of cells and points inside them | The multiplicity estimator | What the field work costs | The design effect of point sampling | Two-stage allocation: how many cells, how many points | Dual-frame allocation: area plus list | Estimating from both frames | Auxiliaries: the ratio estimator and balanced samples | References

Last update: 2026-10-22
Started: 2026-10-09

From the frame to the field: a survey plan end to end
1. The frame | 2. Targets and allocation | 3. Selection | 4. Field work: routes, teams and days | 5. The list frame and the overlap | 6. Estimation | 7. Scaling up

Last update: 2026-10-10
Started: 2026-10-10

Get started with fieldopt
A frame with a depot | Travel and cost | Select, route, estimate | The cost-variance frontier | References

Last update: 2026-10-10
Started: 2026-10-09

Validation and benchmarks
The routing solver | The estimators

Last update: 2026-10-10
Started: 2026-10-10

Frames, strata and cost-aware allocation
Minimum cost for a target variance | Minimum variance for a budget | Where the field cost comes in | Several study variables | References

Last update: 2026-10-10
Started: 2026-10-09

Routing for one or several teams
One tour | Routes limited by length | Routes limited by stops | Comparing | Road distances | Time at the unit, cost per team-day and the calendar | The solver and how good it is | The vrpr engine

Last update: 2026-10-10
Started: 2026-10-09

Where fieldopt applies: beyond agricultural surveys
Environmental monitoring: sites balanced on covariates | Household survey: enumeration areas from several offices | Establishment survey: a list and an area frame | What stays the same across settings

Last update: 2026-10-10
Started: 2026-10-10

Readme and manuals

Help Manual

Help pageTopics
Turn a spatial object into a frameas_frame
Put results back on the geometries of a spatial frameas_sf
Hand a sample to the survey packageas_svydesign
Plot the cost-variance frontierautoplot.fieldopt_frontier
Plot the routesautoplot.fieldopt_routes
Plot a sample of unitsautoplot.fieldopt_sample
Plot a field scheduleautoplot.fieldopt_schedule
Version of the Rust enginecore_version
Cost-variance frontier of a design by simulationcost_variance_frontier
Design-based estimate of a total with its variancedesign_variance
Dual-frame allocation (area frame plus list frame with overlap)dual_frame_allocation
Dual-frame allocation with the area-frame cost taken from the routingdual_frame_design
Dual-frame estimate of a totaldual_frame_estimator
Field cost modelfield_cost_model
Cost-aware allocation across strataframe_allocation
Overlap between a list frame and the area frameframe_overlap
Cost-aware allocation for several study variablesmultivariate_allocation
Design effect and bias of point sampling by simulationpoint_design_effect
Multiplicity (point) estimator of a total from an area sample of pointspoint_estimator
Expected number of point hits of each establishmentexpected_hits point_expected_hits
Ratio estimate of a total with an auxiliary variableratio_estimator
Read the cells of an area frame exported by the areaframe serviceread_areaframe
Route the field workroute_fieldwork
Routed cost curve of a design: the travel constant of Hansen, Hurwitz and Madowautoplot.fieldopt_cost_curve glance.fieldopt_cost_curve predict.fieldopt_cost_curve routed_cost_curve tidy.fieldopt_cost_curve
Field cost per sampled unit at a given sample size, from the routingrouted_unit_cost
Tidy and glance methods for routes and frontiersglance.fieldopt_frontier glance.fieldopt_routes glance.fieldopt_schedule routes-methods tidy.fieldopt_routes tidy.fieldopt_schedule
The sampled units of a samplesampled
Redistribute the routes of a schedule over teams and days with constraintsschedule_calendar
Schedule the field work of several teams from several basesschedule_fieldwork
Segment estimators of a total from an area sample of segmentssegment_estimator
Select points inside sampled grid cellsselect_points
Select units with a spatially balanced or systematic probability sampleselect_units
Spatial balance of a samplespatial_balance
Tidy and glance methods for allocationsallocation-methods glance.fieldopt_allocation glance.fieldopt_dual_frame glance.fieldopt_multi_allocation glance.fieldopt_two_stage tidy.fieldopt_allocation tidy.fieldopt_dual_frame tidy.fieldopt_multi_allocation tidy.fieldopt_two_stage
Travel matrix between the units of a frametravel_matrix
Two-stage allocation with a field cost functiontwo_stage_allocation
Two-stage allocation with the primary-unit cost taken from the routingtwo_stage_design