Title: | Total Survey Error Under Multiple, Different Weighting Schemes |
---|---|
Description: | Calculates total survey error (TSE) for a survey under multiple, different weighting schemes, using both scale-dependent and scale-independent metrics. Package works directly from the data set, with no hand calculations required: just upload a properly structured data set (see TESTWGT and its documentation), properly input column names (see functions documentation), and run your functions. For more on TSE, see: Weisberg, Herbert (2005, ISBN:0-226-89128-3); Biemer, Paul (2010) <doi:10.1093/poq/nfq058>; Biemer, Paul et.al. (2017, ISBN:9781119041672); etc. |
Authors: | Joshua Miller [aut, cre] |
Maintainer: | Joshua Miller <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.0 |
Built: | 2025-02-14 02:39:36 UTC |
Source: | https://github.com/cran/TSEwgt |
Calculates average mean absolute error (aMAE) under multiple, different weighting schemes
AVEMAEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
AVEMAEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
Actual |
data from a "gold standard" survey; objects are variable columns from "gold standard" survey that corruspond to variable columns Survey |
Survey |
data from a survey; objects are variable columns from a survey that corruspond to variable columns from Actual |
Weights |
weights to be applied to Survey data; objects are weights columns |
aMAE for weighting scheme # => mean value of the MAEs for specified variables under weighting scheme # => mean value of MAEs for objects in Survey=data.frame() * objects in Weights=data.frame()
Average mean absolute error (aMAE) under multiple, different weighting schemes
Make sure to properly order inputs, per the example: Actual=data.frame() objects and corrusponding Survey=data.frame() objects must be given in the same order as each other; and Weights=data.frame() objects must be given in sequence of weighting scheme #.
AVEMAEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
AVEMAEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
Calculates average mean absolute percentage error (aMAPE) under multiple, different weighting schemes
AVEMAPEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
AVEMAPEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
Actual |
data from a "gold standard" survey; objects are variable columns from "gold standard" survey that corruspond to variable columns Survey |
Survey |
data from a survey; objects are variable columns from a survey that corruspond to variable columns from Actual |
Weights |
weights to be applied to Survey data; objects are weights columns |
aMAPE for weighting scheme # => mean value of the aMAPEs for specified variables under weighting scheme # => mean value of aMAPEs for objects in Survey=data.frame() * objects in Weights=data.frame()
Average mean absolute percentage error (aMAPE) under multiple, different weighting schemes
Make sure to properly order inputs, per the example: Actual=data.frame() objects and corrusponding Survey=data.frame() objects must be given in the same order as each other; and Weights=data.frame() objects must be given in sequence of weighting scheme #.
AVEMAPEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
AVEMAPEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
Calculates average mean squared error (aMSE) with bias-variance decomposition under multiple, different weighting schemes
AVEMSEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
AVEMSEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
Actual |
data from a "gold standard" survey; objects are variable columns from "gold standard" survey that corruspond to variable columns Survey |
Survey |
data from a survey; objects are variable columns from a survey that corruspond to variable columns from Actual |
Weights |
weights to be applied to Survey data; objects are weights columns |
aMSE for weighting scheme # => mean value of the MSEs for specified variables under weighting scheme # => mean value of MSEs for objects in Survey=data.frame() * objects in Weights=data.frame()
Average mean squared error (aMSE) with bias-variance decomposition under multiple, different weighting schemes
Make sure to properly order inputs, per the example: Actual=data.frame() objects and corrusponding Survey=data.frame() objects must be given in the same order as each other; and Weights=data.frame() objects must be given in sequence of weighting scheme #.
AVEMSEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
AVEMSEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
Calculates average mean squared logarithmic error (aMSLE) under multiple, different weighting schemes
AVEMSLEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
AVEMSLEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
Actual |
data from a "gold standard" survey; objects are variable columns from "gold standard" survey that corruspond to variable columns Survey |
Survey |
data from a survey; objects are variable columns from a survey that corruspond to variable columns from Actual |
Weights |
weights to be applied to Survey data; objects are weights columns |
aMSLE for weighting scheme # => mean value of the aMSLEs for specified variables under weighting scheme # => mean value of aMSLEs for objects in Survey=data.frame() * objects in Weights=data.frame()
Average mean squared logarithmic error (aMSLE) under multiple, different weighting schemes
Make sure to properly order inputs, per the example: Actual=data.frame() objects and corrusponding Survey=data.frame() objects must be given in the same order as each other; and Weights=data.frame() objects must be given in sequence of weighting scheme #.
AVEMSLEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
AVEMSLEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
Calculates average relative absolute error (aRAE) under multiple, different weighting schemes
AVERAEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
AVERAEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
Actual |
data from a "gold standard" survey; objects are variable columns from "gold standard" survey that corruspond to variable columns Survey |
Survey |
data from a survey; objects are variable columns from a survey that corruspond to variable columns from Actual |
Weights |
weights to be applied to Survey data; objects are weights columns |
aRAE for weighting scheme # => mean value of the aRAEs for specified variables under weighting scheme # => mean value of aRAEs for objects in Survey=data.frame() * objects in Weights=data.frame()
Average relative absolute error (aRAE) under multiple, different weighting schemes
Make sure to properly order inputs, per the example: Actual=data.frame() objects and corrusponding Survey=data.frame() objects must be given in the same order as each other; and Weights=data.frame() objects must be given in sequence of weighting scheme #.
AVERAEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
AVERAEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
Calculates average root mean squared error (aRMSE) under multiple, different weighting schemes
AVERMSEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
AVERMSEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
Actual |
data from a "gold standard" survey; objects are variable columns from "gold standard" survey that corruspond to variable columns Survey |
Survey |
data from a survey; objects are variable columns from a survey that corruspond to variable columns from Actual |
Weights |
weights to be applied to Survey data; objects are weights columns |
aRMSE for weighting scheme # => mean value of the RMSEs for specified variables under weighting scheme # => mean value of RMSEs for objects in Survey=data.frame() * objects in Weights=data.frame()
Average root mean squared error (aRMSE) under multiple, different weighting schemes
Make sure to properly order inputs, per the example: Actual=data.frame() objects and corrusponding Survey=data.frame() objects must be given in the same order as each other; and Weights=data.frame() objects must be given in sequence of weighting scheme #.
AVERMSEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
AVERMSEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
Calculates average root mean squared logarithmic error (aRMSLE) under multiple, different weighting schemes
AVERMSLEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
AVERMSLEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
Actual |
data from a "gold standard" survey; objects are variable columns from "gold standard" survey that corruspond to variable columns Survey |
Survey |
data from a survey; objects are variable columns from a survey that corruspond to variable columns from Actual |
Weights |
weights to be applied to Survey data; objects are weights columns |
aRMSLE for weighting scheme # => mean value of the aRMSLEs for specified variables under weighting scheme # => mean value of aRMSLEs for objects in Survey=data.frame() * objects in Weights=data.frame()
Average root mean squared logarithmic error (aRMSLE) under multiple, different weighting schemes
Make sure to properly order inputs, per the example: Actual=data.frame() objects and corrusponding Survey=data.frame() objects must be given in the same order as each other; and Weights=data.frame() objects must be given in sequence of weighting scheme #.
AVERMSLEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
AVERMSLEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
Calculates average root relative squared error (aRRSE) under multiple, different weighting schemes
AVERRSEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
AVERRSEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
Actual |
data from a "gold standard" survey; objects are variable columns from "gold standard" survey that corruspond to variable columns Survey |
Survey |
data from a survey; objects are variable columns from a survey that corruspond to variable columns from Actual |
Weights |
weights to be applied to Survey data; objects are weights columns |
aRRSE for weighting scheme # => mean value of the aRRSEs for specified variables under weighting scheme # => mean value of aRRSEs for objects in Survey=data.frame() * objects in Weights=data.frame()
Average root relative squared error (aRRSE) under multiple, different weighting schemes
Make sure to properly order inputs, per the example: Actual=data.frame() objects and corrusponding Survey=data.frame() objects must be given in the same order as each other; and Weights=data.frame() objects must be given in sequence of weighting scheme #.
AVERRSEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
AVERRSEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
Calculates average relative squared error (aRSE) under multiple, different weighting schemes
AVERSEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
AVERSEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
Actual |
data from a "gold standard" survey; objects are variable columns from "gold standard" survey that corruspond to variable columns Survey |
Survey |
data from a survey; objects are variable columns from a survey that corruspond to variable columns from Actual |
Weights |
weights to be applied to Survey data; objects are weights columns |
aRSE for weighting scheme # => mean value of the aRSEs for specified variables under weighting scheme # => mean value of aRSEs for objects in Survey=data.frame() * objects in Weights=data.frame()
Average relative squared error (aRSE) under multiple, different weighting schemes
Make sure to properly order inputs, per the example: Actual=data.frame() objects and corrusponding Survey=data.frame() objects must be given in the same order as each other; and Weights=data.frame() objects must be given in sequence of weighting scheme #.
AVERSEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
AVERSEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
Calculates average symmetric mean absolute percentage error (aSMAPE) under multiple, different weighting schemes
AVESMAPEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
AVESMAPEw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
Actual |
data from a "gold standard" survey; objects are variable columns from "gold standard" survey that corruspond to variable columns Survey |
Survey |
data from a survey; objects are variable columns from a survey that corruspond to variable columns from Actual |
Weights |
weights to be applied to Survey data; objects are weights columns |
aSMAPE for weighting scheme # => mean value of the aSMAPEs for specified variables under weighting scheme # => mean value of aSMAPEs for objects in Survey=data.frame() * objects in Weights=data.frame()
Average symmetric mean absolute percentage error (aSMAPE) under multiple, different weighting schemes
Make sure to properly order inputs, per the example: Actual=data.frame() objects and corrusponding Survey=data.frame() objects must be given in the same order as each other; and Weights=data.frame() objects must be given in sequence of weighting scheme #.
AVESMAPEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
AVESMAPEw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
Calculates full scale-dependent statistics
FULLSDw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
FULLSDw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
Actual |
data from a "gold standard" survey; objects are variable columns from "gold standard" survey that corruspond to variable columns Survey |
Survey |
data from a survey; objects are variable columns from a survey that corruspond to variable columns from Actual |
Weights |
weights to be applied to Survey data; objects are weights columns |
Full scale-dependent statistics
Make sure to properly order inputs, per the example: Actual=data.frame() objects and corrusponding Survey=data.frame() objects must be given in the same order as each other; and Weights=data.frame() objects must be given in sequence of weighting scheme #.
FULLSDw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
FULLSDw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
Calculates full scale-independent statistics
FULLSIw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
FULLSIw(Actual = data.frame(), Survey = data.frame(), Weights = data.frame())
Actual |
data from a "gold standard" survey; objects are variable columns from "gold standard" survey that corruspond to variable columns Survey |
Survey |
data from a survey; objects are variable columns from a survey that corruspond to variable columns from Actual |
Weights |
weights to be applied to Survey data; objects are weights columns |
Full scale-independent statistics
Make sure to properly order inputs, per the example: Actual=data.frame() objects and corrusponding Survey=data.frame() objects must be given in the same order as each other; and Weights=data.frame() objects must be given in sequence of weighting scheme #.
FULLSIw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
FULLSIw(Actual=data.frame(TESTWGT$A1, TESTWGT$A2), Survey=data.frame(TESTWGT$Q1, TESTWGT$Q2), Weights=data.frame(TESTWGT$W1, TESTWGT$W2))
A data set created by merging 1) "actual" data from a "gold standard" survey (A1, A2), and 2) data from another survey (Q1, Q2), including weights columns for that data (W1, W2). A1/Q1 and A2/Q2 are responses to the same two questions, asked to the same 10 respondents (ID), along the same 1-99 response scale.
TESTWGT
TESTWGT
A data frame with 10 rows and 7 variables
Paired "actual"/survey data with weights columns for survey data
Example data generated by author