Description Usage Details Value Required Inputs Optional Weighting Inputs Dialog Buttons Author(s) References See Also Examples
Initiates a dialog box via a GUI to analyze samples from 2-D resources.
1 |
This routine is intended to be called from the SDrawNPS
menu,
but it can also be called from the command line in non-interactive
environments, such as RStudio. This routine uses the RGtk2
package
windowing capabilities to construct a pop-up dialog box, or GUI. In the
dialog box, users specify at least the required input parameters, then
press the ‘Run’ button to analyze the sample.
On submission, the GUI internally packages its inputs, processes the
necessary data, and executes the spsurvey
-package
cat.analysis
function for the analysis of categorical variables and
cont.analysis
function for the same with respect to numeric
variables. All SDrawNPS
GUI submissions utilizing the
spsurvey
package analysis methodologies lead to the creation of a
text-based log file, which records all code utilized. The log file thus
serves as a historical record containing analysis information. It also
serves as a tool for enhancing methodological understanding.
See ‘References’ for additional resources.
A data frame with the name specified by the user in the GUI's
Output File
box. This data frame contains the sampling analysis
specifications, along with coordinates and projection information. Analysis
data frames are stored in the current workspace, while any export files,
including a txt
log of the commands utilized to generate the sample,
as well as plots of empirical distribution functions and a csv
of
their underlying data, are saved to the file directory specified via
getwd
.
‘CSV file OR data.frame object’ – Specify the data frame or
csv
containing the data for which analysis is required, or click
‘Browse’ to browse for a data file with a .csv
extension.
When specifying the name of a data file via use of the input box, do not
include the .csv
extension. Following identification of the data,
click the ‘Inspect Sample’ button to list its variables.
‘Output File’ – Specify the sample's R object name to which all analysis results will be assigned. The output will be a data frame containing analysis results.
‘Site-ID Variable’ – The case-sensitive variable in the input
data frame or csv
identifying unique site identifiers.
‘Evaluation Status Variable’ – The case-sensitive variable in
the input data frame or csv
identifying which sites consitute the
surveyed targets. See ‘Inclusion Identifier.’
‘Inclusion Identifier’ – The case-sensitive text string that identifies surveyed targets of sites in the variable identified via the ‘Evaluation Status Variable’ box.
‘Stratum / Subpopulation 1’ – The case-sensitive variable in
the input data frame or csv
containing a stratification variable.
For example, this could be an elevational class associated with every point
in the shapefile. Constant values of this variable define the strata. This
box can be left blank if analysis requires no consideration of any strata.
‘Stratum / Subpopulation 2’ – Same as ‘Stratum / Subpopuation 1’.
‘Weight Variable’ – The case-sensitive variable in the input
data frame or csv
containing the design weights of included sites.
Adjustment of included design weights, if appropriate, occurs via the
‘Adjust Weights?’ and ‘Population Inference’ sections of the
GUI. See ‘Optional Weighting Inputs.’
‘X-Coordinate’ – The case-sensitive variable in the input
data frame or csv
containing the x-coordinate of included
sites. Units do not matter.
‘Y-Coordinate’ – The case-sensitive variable in the input
data frame or csv
containing the y-coordinate of included
sites. Units do not matter.
‘Outcome(s)’ – The list of case-sensitive variables in the
input data frame or csv
for which analysis is required. Enter
multiple variables separated by commas and a space.
‘Confidence Level’ – The confidence level to be utilized in the analysis.
‘Adjust Weights?’ – When set to ‘Yes’, design weights
specified via the ‘Weight Variable’ box are adjusted for frame
error. See function Adjwgt_FrameNR
. No adjustment occurs when set
to ‘No’.
‘Population Inference’ – Assuming that the ‘Adjust
Weights?’ radio button is set to ‘Yes’, selection of the
‘Population Inference’ radio button specifies the value of the
popn
argument in function Adjwgt_FrameNR
. Explicitly,
selection of ‘Target’ specifies popn="Target"
in
Adjwgt_FrameNR
, while selection of ‘Sampled’ specifies
popn="Sampled"
.
‘Inspect Sample.’ After specifying the csv
file or data
frame object name, pressing the ‘Inspect Sample’ button lists all of
its constituent variables and vector classes.
‘Run.’ After specifying all required and optional inputs, the
‘Run’ button analyzes the sample. The .GlobalEnv
workspace
holds the resulting data frame entitled via the name specified in the GUI
‘Output File’ box. A confirmation dialog appears following
completion of the analysis.
‘Tabulate Sample.’ Following analysis, display the GRTS analysis file in a tabular format. The GRTS analysis file contains information on each sampled unit, such as coordinates, and design variables, e.g., stratum or multi-density category. It also contains possibly adjusted design weights.
‘Done.’ Dismisses the GUI dialog box, leaving any analysis
objects in the .GlobalEnv
workspace.
Jason Mitchell (jmitchell@west-inc.com)
Kincaid, T. (2015). Analysis of a GRTS Survey Design for a Finite
Resource. Accessed online May 6, 2016.
https://cran.r-project.org/web/packages/spsurvey/vignettes/Finite_Analysis.pdf
.
Kincaid, T. (2015). Analysis of a GRTS Survey Design for an Area Resource.
Accessed online May 6, 2016.
https://cran.r-project.org/web/packages/spsurvey/vignettes/Area_Analysis.pdf
.
Starcevich L. A., DiDonato G., McDonald T., Mitchell, J. (2016). A GRTS User's Manual for the SDrawNPS Package: A graphical user interface for Generalized Random Tessellation Stratified (GRTS) sampling and estimation. National Park Service, U.S. Department of the Interior. Natural Resource Report NPS/XXXX/NRR—20XX/XXX.
Stevens, D. L. and A. R. Olsen (2004). Spatially balanced sampling of natural resources. Journal of the American Statistical Association 99, 262-278.
spsurvey::cat.analysis
, spsurvey::cont.analysis
1 2 3 | # Open a GUI for analysis of a GRTS-obtained sample.
analysis.GUI()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.