Title: | Total Survey Error (Independent Samples) |
---|---|
Description: | Calculates total survey error (TSE) for one or more surveys, 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 TESTIND 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 03:40:42 UTC |
Source: | https://github.com/cran/TSEind |
Calculates MAE, MSE, RMSE, MSLE, and RMSLE when Actual# and Survey# have independent samples
FULLSDi(Actual1, Survey1, ...)
FULLSDi(Actual1, Survey1, ...)
Actual1 |
data from a "gold standard" survey; data are assumed to be the "actual" response, without survey error |
Survey1 |
data from another survey, but with survey error; function will calculate MAE, MSE, RMSE, MSLE, and RMSLE for this survey |
... |
used for additional surveys with survey error, survey 2 through survey # |
Matrix with MAE, MSE, RMSE, MSLE, and RMSLE values for survey 1 through survey #
Make sure to properly order inputs, per the example: for each survey, inputs must be paired as Actual#, Survey#, and each pair given in sequential order
FULLSDi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
FULLSDi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
Calculates MAPE, SMAPE, RAE, RSE, and RRSE when Actual# and Survey# have independent samples
FULLSIi(Actual1, Survey1, ...)
FULLSIi(Actual1, Survey1, ...)
Actual1 |
data from a "gold standard" survey; data are assumed to be the "actual" response, without survey error |
Survey1 |
data from another survey, but with survey error; function will calculate MAPE, SMAPE, RAE, RSE, and RRSE for this survey |
... |
used for additional surveys with survey error, survey 2 through survey # |
Matrix with MAPE, SMAPE, RAE, RSE, and RRSE values for survey 1 through survey #
Make sure to properly order inputs, per the example: for each survey, inputs must be paired as Actual#, Survey#, and each pair given in sequential order
FULLSIi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
FULLSIi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
Calculates MAE when Actual# and Survey# have independent samples
MAEi(Actual1, Survey1, ...)
MAEi(Actual1, Survey1, ...)
Actual1 |
data from a "gold standard" survey; data are assumed to be the "actual" response, without survey error |
Survey1 |
data from another survey, but with survey error; function will calculate MAE for this survey |
... |
used for additional surveys with survey error, survey 2 through survey # |
Matrix with MAE values for survey 1 through survey #
Make sure to properly order inputs, per the example: for each survey, inputs must be paired as Actual#, Survey#, and each pair given in sequential order
MAEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
MAEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
Calculates MAPE when Actual# and Survey# have independent samples
MAPEi(Actual1, Survey1, ...)
MAPEi(Actual1, Survey1, ...)
Actual1 |
data from a "gold standard" survey; data are assumed to be the "actual" response, without survey error |
Survey1 |
data from another survey, but with survey error; function will calculate MAPE for this survey |
... |
used for additional surveys with survey error, survey 2 through survey # |
Matrix with MAPE values for survey 1 through survey #
Make sure to properly order inputs, per the example: for each survey, inputs must be paired as Actual#, Survey#, and each pair given in sequential order
MAPEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
MAPEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
Calculates MSE with bias-variance decomposition when Actual# and Survey# have independent samples
MSEi(Actual1, Survey1, ...)
MSEi(Actual1, Survey1, ...)
Actual1 |
data from a "gold standard" survey; data are assumed to be the "actual" response, without survey error |
Survey1 |
data from another survey, but with survey error; function will calculate MSE with bias-variance decomposition for this survey |
... |
used for additional surveys with survey error, survey 2 through survey # |
Matrix with MSE, bias^2, and variance values for survey 1 through survey #
Make sure to properly order inputs, per the example: for each survey, inputs must be paired as Actual#, Survey#, and each pair given in sequential order
MSEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
MSEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
Calculates MSLE when Actual# and Survey# have independent samples
MSLEi(Actual1, Survey1, ...)
MSLEi(Actual1, Survey1, ...)
Actual1 |
data from a "gold standard" survey; data are assumed to be the "actual" response, without survey error |
Survey1 |
data from another survey, but with survey error; function will calculate MSLE for this survey |
... |
used for additional surveys with survey error, survey 2 through survey # |
Matrix with MSLE values for survey 1 through survey #
Make sure to properly order inputs, per the example: for each survey, inputs must be paired as Actual#, Survey#, and each pair given in sequential order
MSLEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
MSLEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
Calculates RAE when Actual# and Survey# have independent samples
RAEi(Actual1, Survey1, ...)
RAEi(Actual1, Survey1, ...)
Actual1 |
data from a "gold standard" survey; data are assumed to be the "actual" response, without survey error |
Survey1 |
data from another survey, but with survey error; function will calculate RAE for this survey |
... |
used for additional surveys with survey error, survey 2 through survey # |
Matrix with RAE values for survey 1 through survey #
Make sure to properly order inputs, per the example: for each survey, inputs must be paired as Actual#, Survey#, and each pair given in sequential order
RAEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
RAEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
Calculates RMSE when Actual# and Survey# have independent samples
RMSEi(Actual1, Survey1, ...)
RMSEi(Actual1, Survey1, ...)
Actual1 |
data from a "gold standard" survey; data are assumed to be the "actual" response, without survey error |
Survey1 |
data from another survey, but with survey error; function will calculate RMSE for this survey |
... |
used for additional surveys with survey error, survey 2 through survey # |
Matrix with RMSE values for survey 1 through survey #
Make sure to properly order inputs, per the example: for each survey, inputs must be paired as Actual#, Survey#, and each pair given in sequential order
RMSEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
RMSEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
Calculates RMSLE when Actual# and Survey# have independent samples
RMSLEi(Actual1, Survey1, ...)
RMSLEi(Actual1, Survey1, ...)
Actual1 |
data from a "gold standard" survey; data are assumed to be the "actual" response, without survey error |
Survey1 |
data from another survey, but with survey error; function will calculate RMSLE for this survey |
... |
used for additional surveys with survey error, survey 2 through survey # |
Matrix with RMSLE values for survey 1 through survey #
Make sure to properly order inputs, per the example: for each survey, inputs must be paired as Actual#, Survey#, and each pair given in sequential order
RMSLEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
RMSLEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
Calculates RRSE when Actual# and Survey# have independent samples
RRSEi(Actual1, Survey1, ...)
RRSEi(Actual1, Survey1, ...)
Actual1 |
data from a "gold standard" survey; data are assumed to be the "actual" response, without survey error |
Survey1 |
data from another survey, but with survey error; function will calculate RRSE for this survey |
... |
used for additional surveys with survey error, survey 2 through survey # |
Matrix with RRSE values for survey 1 through survey #
Make sure to properly order inputs, per the example: for each survey, inputs must be paired as Actual#, Survey#, and each pair given in sequential order
RRSEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
RRSEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
Calculates RSE when Actual# and Survey# have independent samples
RSEi(Actual1, Survey1, ...)
RSEi(Actual1, Survey1, ...)
Actual1 |
data from a "gold standard" survey; data are assumed to be the "actual" response, without survey error |
Survey1 |
data from another survey, but with survey error; function will calculate RSE for this survey |
... |
used for additional surveys with survey error, survey 2 through survey # |
Matrix with RSE values for survey 1 through survey #
Make sure to properly order inputs, per the example: for each survey, inputs must be paired as Actual#, Survey#, and each pair given in sequential order
RSEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
RSEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
Calculates SMAPE when Actual# and Survey# have independent samples
SMAPEi(Actual1, Survey1, ...)
SMAPEi(Actual1, Survey1, ...)
Actual1 |
data from a "gold standard" survey; data are assumed to be the "actual" response, without survey error |
Survey1 |
data from another survey, but with survey error; function will calculate SMAPE for this survey |
... |
used for additional surveys with survey error, survey 2 through survey # |
Matrix with SMAPE values for survey 1 through survey #
Make sure to properly order inputs, per the example: for each survey, inputs must be paired as Actual#, Survey#, and each pair given in sequential order
SMAPEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
SMAPEi(Actual1=TESTIND$A1, Survey1=TESTIND$S1, Actual2=TESTIND$A1, Survey2=TESTIND$S2, Actual3=TESTIND$A2, Survey3=TESTIND$S3)
A data set created by merging 1) data from a "gold standard" survey and 2) data from other surveys of the same universe. Data from the "gold standard" survey are assumed to be the survey universe's "actual" response; data from the other surveys have survey error which the functions in 'TSEind' can calculate. Data are organized by survey (columns) and survey question (rows), and their values are the aggregate, "topline" responses to the survey questions which can range from 1 to 99 (the scale used by each survey question).
TESTIND
TESTIND
A data frame with 10 rows and 6 variables
survey questions, numbered 1 through 10
data from "gold standard" survey; A1 is the "actual" data for all 10 survey questions, A2 is the "actual" data for all survey questions except Q2 (in function examples, A2 is paired with S3 which is missing data for Q2
data from other surveys; S3 is missing data for Q2
Example data generated by author