Package: spsurvey 5.5.1

Michael Dumelle

spsurvey: Spatial Sampling Design and Analysis

A design-based approach to statistical inference, with a focus on spatial data. Spatially balanced samples are selected using the Generalized Random Tessellation Stratified (GRTS) algorithm. The GRTS algorithm can be applied to finite resources (point geometries) and infinite resources (linear / linestring and areal / polygon geometries) and flexibly accommodates a diverse set of sampling design features, including stratification, unequal inclusion probabilities, proportional (to size) inclusion probabilities, legacy (historical) sites, a minimum distance between sites, and two options for replacement sites (reverse hierarchical order and nearest neighbor). Data are analyzed using a wide range of analysis functions that perform categorical variable analysis, continuous variable analysis, attributable risk analysis, risk difference analysis, relative risk analysis, change analysis, and trend analysis. spsurvey can also be used to summarize objects, visualize objects, select samples that are not spatially balanced, select panel samples, measure the amount of spatial balance in a sample, adjust design weights, and more. For additional details, see Dumelle et al. (2023) <doi:10.18637/jss.v105.i03>.

Authors:Michael Dumelle [aut, cre], Tom Kincaid [aut], Tony Olsen [aut], Marc Weber [aut], Don Stevens [ctb], Denis White [ctb]

spsurvey_5.5.1.tar.gz
spsurvey_5.5.1.zip(r-4.5)spsurvey_5.5.1.zip(r-4.4)spsurvey_5.5.1.zip(r-4.3)
spsurvey_5.5.1.tgz(r-4.4-any)spsurvey_5.5.1.tgz(r-4.3-any)
spsurvey_5.5.1.tar.gz(r-4.5-noble)spsurvey_5.5.1.tar.gz(r-4.4-noble)
spsurvey_5.5.1.tgz(r-4.4-emscripten)spsurvey_5.5.1.tgz(r-4.3-emscripten)
spsurvey.pdf |spsurvey.html
spsurvey/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/usepa/spsurvey/issues

Datasets:

On CRAN:

ord

34 exports 15 stars 3.33 score 32 dependencies 1 dependents 12 mentions 233 scripts 945 downloads

Last updated 19 days agofrom:d95ce2a887. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKAug 29 2024
R-4.5-winOKAug 29 2024
R-4.5-linuxOKAug 29 2024
R-4.4-winOKAug 29 2024
R-4.4-macOKAug 29 2024
R-4.3-winOKAug 29 2024
R-4.3-macOKAug 29 2024

Exports:adjwgtadjwgtNRash1_wgtattrisk_analysiscat_analysiscdf_plotchange_analysiscont_analysiscont_cdfplotcont_cdftestcov_panel_dsgndiffrisk_analysiserrorprntgrtsirslocalmean_covlocalmean_varlocalmean_weightpd_summarypower_dsgnppd_plotrelrisk_analysisrevisit_bibdrevisit_dsgnrevisit_randsp_balancesp_framesp_plotsp_rbindsp_summarysp_unframestopprnttrend_analysiswarnprnt

Dependencies:AlgDesignbootclassclassIntcrossdesDBIdeldire1071gtoolsKernSmoothlatticelme4lpSolvemagrittrMASSMatrixminqamitoolsnlmenloptrnumDerivproxyRcppRcppArmadilloRcppEigens2samplingsfsurveysurvivalunitswk

Analyzing Data

Rendered fromanalysis.Rmdusingknitr::rmarkdownon Aug 29 2024.

Last update: 2022-11-22
Started: 2021-08-17

Spatially Balanced Sampling

Rendered fromsampling.Rmdusingknitr::rmarkdownon Aug 29 2024.

Last update: 2022-11-22
Started: 2021-08-17

Start Here

Rendered fromstart-here.Rmdusingknitr::rmarkdownon Aug 29 2024.

Last update: 2022-11-22
Started: 2021-10-05

Summarizing and Visualizing Sampling Frames, Design Sites, and Analysis Data

Rendered fromEDA.Rmdusingknitr::rmarkdownon Aug 29 2024.

Last update: 2022-11-22
Started: 2021-10-05

Readme and manuals

Help Manual

Help pageTopics
spsurvey: Spatial Sampling Design and Analysisspsurvey-package spsurvey
Adjust survey design weights by categoriesadjwgt
Adjust survey design weights for non-response by categoriesadjwgtNR
Compute the average shifted histogram (ASH) for one-dimensional weighted dataash1_wgt
Attributable risk analysisattrisk_analysis
Categorical variable analysiscat_analysis
Plot a cumulative distribution function (CDF)cdf_plot
Change analysischange_analysis
Continuous variable analysiscont_analysis
Create a PDF file containing cumulative distribution functions (CDF) plotscont_cdfplot
Cumulative distribution function (CDF) inference for a probability surveycont_cdftest
Create a covariance matrix for a panel designcov_panel_dsgn
Risk difference analysisdiffrisk_analysis
Print errors from analysis functionserrorprnt
Select a generalized random tessellation stratified (GRTS) samplegrts
Illinois River dataIllinois_River
Illinois River legacy dataIllinois_River_Legacy
Select an independent random sample (IRS)irs
Lake Ontario dataLake_Ontario
Internal Function: Variance-Covariance Matrix Based on Local Mean Estimatorlocalmean_cov
Internal Function: Local Mean Variance Estimatorlocalmean_var
Internal Function: Local Mean Variance Neighbors and Weightslocalmean_weight
New England Lakes dataNE_Lakes
New England Lakes data (as a data frame)NE_Lakes_df
New England Lakes legacy dataNE_Lakes_Legacy
NLA PNW dataNLA_PNW
NRSA EPA7 dataNRSA_EPA7
Summary characteristics of a panel revisit designpd_summary
Plot sampling frames, design sites, and analysis data.plot plot.sp_design plot.sp_frame
Plot a cumulative distribution function (CDF)plot.sp_CDF
Power calculation for multiple panel designspower_dsgn
Plot power curves for panel designsppd_plot
Relative risk analysisrelrisk_analysis
Create a balanced incomplete block panel revisit designrevisit_bibd
Create a panel revisit designrevisit_dsgn
Create a revisit design with random assignment to panels and time periodsrevisit_rand
Calculate spatial balance metricssp_balance
'sp_frame' objectssp_frame sp_unframe
Plot sampling frames, design sites, and analysis data.sp_plot sp_plot.default sp_plot.sp_design
Combine rows from GRTS or IRS samples.sp_rbind
Summarize sampling frames, design sites, and analysis data.sp_summary sp_summary.default sp_summary.sp_design
Print grts() and irs() errors.stopprnt
Summarize sampling frames, design sites, and analysis data.summary summary.sp_design summary.sp_frame
Trend analysistrend_analysis
Print grts(), irs()), and analysis function warningswarnprnt