diff --git a/man/computeConditionalCS_DeltaRM.Rd b/man/computeConditionalCS_DeltaRM.Rd index 42753ca..fbc7051 100644 --- a/man/computeConditionalCS_DeltaRM.Rd +++ b/man/computeConditionalCS_DeltaRM.Rd @@ -12,7 +12,7 @@ computeConditionalCS_DeltaRM(betahat, sigma, numPrePeriods, numPostPeriods, l_vec = .basisVector(index = 1, size = numPostPeriods), Mbar = 0, alpha = 0.05, hybrid_flag = "LF", hybrid_kappa = alpha/10, returnLength = FALSE, postPeriodMomentsOnly = TRUE, - gridPoints=10^3, grid.ub = NA, grid.lb = NA) + gridPoints=10^3, grid.ub = NA, grid.lb = NA, seed = 0) } %- maybe also 'usage' for other objects documented here. \arguments{ @@ -58,6 +58,9 @@ Logical value. If TRUE, function only returns the length of the robust confidenc \item{grid.lb}{ Lower bound of grid for test inversion. The user should only specify this if she wishes to manually specify the upper bound of the grid. Default equals NA sets grid lower bound to equal the lower bound of the identified set under parallel trends minus 20*standard deviation of the point estimate, l_vec'betahat. } + \item{seed}{ + Random seed for internal computations; included for reproducibility. + } } \value{ If returnLength equals TRUE, function returns a scalar that equals the length of the confidence interval. If returnLength equals FALSE, function returns a dataframe with columns diff --git a/man/computeConditionalCS_DeltaRMB.Rd b/man/computeConditionalCS_DeltaRMB.Rd index 6c15ba7..966b030 100644 --- a/man/computeConditionalCS_DeltaRMB.Rd +++ b/man/computeConditionalCS_DeltaRMB.Rd @@ -14,7 +14,7 @@ computeConditionalCS_DeltaRMB(betahat, sigma, numPrePeriods, numPostPeriods, Mbar = 0, alpha = 0.05, hybrid_flag = "LF", hybrid_kappa = alpha/10, returnLength = FALSE, biasDirection = "positive", postPeriodMomentsOnly = TRUE, - gridPoints=10^3, grid.ub = NA, grid.lb = NA) + gridPoints=10^3, grid.ub = NA, grid.lb = NA, seed = 0) } %- maybe also 'usage' for other objects documented here. \arguments{ @@ -63,6 +63,9 @@ Logical value. If TRUE, function only returns the length of the robust confidenc \item{grid.lb}{ Lower bound of grid for test inversion. The user should only specify this if she wishes to manually specify the upper bound of the grid. Default equals NA sets grid lower bound to equal the lower bound of the identified set under parallel trends minus 20*standard deviation of the point estimate, l_vec'betahat. } + \item{seed}{ + Random seed for internal computations; included for reproducibility. + } } \value{ If returnLength equals TRUE, function returns a scalar that equals the length of the confidence interval. If returnLength equals FALSE, function returns a dataframe with columns diff --git a/man/computeConditionalCS_DeltaRMM.Rd b/man/computeConditionalCS_DeltaRMM.Rd index 40647fb..132a4df 100644 --- a/man/computeConditionalCS_DeltaRMM.Rd +++ b/man/computeConditionalCS_DeltaRMM.Rd @@ -15,7 +15,7 @@ computeConditionalCS_DeltaRMM(betahat, sigma, numPrePeriods, numPostPeriods, alpha = 0.05, hybrid_flag = "LF", hybrid_kappa = alpha/10, returnLength = FALSE, postPeriodMomentsOnly = TRUE, monotonicityDirection = "increasing", - gridPoints=10^3, grid.ub = NA, grid.lb = NA) + gridPoints=10^3, grid.ub = NA, grid.lb = NA, seed = 0) } %- maybe also 'usage' for other objects documented here. \arguments{ @@ -64,6 +64,9 @@ Specifies direction of monotonicity restriction. If "increasing", underlying tre \item{grid.lb}{ Lower bound of grid for test inversion. The user should only specify this if she wishes to manually specify the upper bound of the grid. Default equals NA sets grid lower bound to equal the lower bound of the identified set under parallel trends minus 20*standard deviation of the point estimate, l_vec'betahat. } + \item{seed}{ + Random seed for internal computations; included for reproducibility. + } } \value{ If returnLength equals TRUE, function returns a scalar that equals the length of the confidence interval. If returnLength equals FALSE, function returns a dataframe with columns diff --git a/man/computeConditionalCS_DeltaSD.Rd b/man/computeConditionalCS_DeltaSD.Rd index ab5563f..3e2a43d 100644 --- a/man/computeConditionalCS_DeltaSD.Rd +++ b/man/computeConditionalCS_DeltaSD.Rd @@ -13,7 +13,7 @@ computeConditionalCS_DeltaSD(betahat, sigma, numPrePeriods, numPostPeriods, M = 0, alpha = 0.05, hybrid_flag = "FLCI", hybrid_kappa = alpha/10, returnLength = FALSE, postPeriodMomentsOnly = TRUE, - gridPoints =10^3, grid.ub = NA, grid.lb = NA) + gridPoints =10^3, grid.ub = NA, grid.lb = NA, seed = 0) } %- maybe also 'usage' for other objects documented here. \arguments{ @@ -59,6 +59,9 @@ Logical value. If TRUE, function only returns the length of the robust confidenc \item{grid.lb}{ Lower bound of grid for test inversion. The user should only specify this if she wishes to manually specify the upper bound of the grid. Default equals NA sets grid lower bound to equal the lower bound of the identified set under parallel trends minus 20*standard deviation of the point estimate, l_vec'betahat. } + \item{seed}{ + Random seed for internal computations; included for reproducibility. + } } \value{ If returnLength equals TRUE, function returns a scalar that equals the length of the confidence interval. If returnLength equals FALSE, function returns a dataframe with columns diff --git a/man/computeConditionalCS_DeltaSDB.Rd b/man/computeConditionalCS_DeltaSDB.Rd index 234adcc..4708fff 100644 --- a/man/computeConditionalCS_DeltaSDB.Rd +++ b/man/computeConditionalCS_DeltaSDB.Rd @@ -13,7 +13,7 @@ computeConditionalCS_DeltaSDB(betahat, sigma, numPrePeriods, numPostPeriods, alpha = 0.05, hybrid_flag = "FLCI", hybrid_kappa = alpha/10, returnLength = FALSE, biasDirection = "positive", postPeriodMomentsOnly = TRUE, - gridPoints = 10^3, grid.lb = NA, grid.ub = NA) + gridPoints = 10^3, grid.lb = NA, grid.ub = NA, seed = 0) } %- maybe also 'usage' for other objects documented here. \arguments{ @@ -62,6 +62,9 @@ Logical value. If TRUE, function only returns the length of the robust confidenc \item{grid.lb}{ Lower bound of grid for test inversion. The user should only specify this if she wishes to manually specify the upper bound of the grid. Default equals NA sets grid lower bound to equal the lower bound of the identified set under parallel trends minus 20*standard deviation of the point estimate, l_vec'betahat. } + \item{seed}{ + Random seed for internal computations; included for reproducibility. + } } \value{ If returnLength equals TRUE, function returns a scalar that equals the length of the confidence interval. If returnLength equals FALSE, function returns a dataframe with columns diff --git a/man/computeConditionalCS_DeltaSDM.Rd b/man/computeConditionalCS_DeltaSDM.Rd index a07270f..fa81c4d 100644 --- a/man/computeConditionalCS_DeltaSDM.Rd +++ b/man/computeConditionalCS_DeltaSDM.Rd @@ -13,7 +13,7 @@ computeConditionalCS_DeltaSDM(betahat, sigma, numPrePeriods, numPostPeriods, alpha = 0.05, monotonicityDirection = "increasing", hybrid_flag = "FLCI", hybrid_kappa = alpha/10, returnLength = FALSE, postPeriodMomentsOnly = TRUE, - gridPoints = 10^3, grid.lb = NA, grid.ub = NA) + gridPoints = 10^3, grid.lb = NA, grid.ub = NA, seed = 0) } %- maybe also 'usage' for other objects documented here. \arguments{ @@ -62,6 +62,9 @@ Specifies direction of monotonicity restriction. If "increasing", underlying tre \item{grid.lb}{ Lower bound of grid for test inversion. The user should only specify this if she wishes to manually specify the upper bound of the grid. Default equals NA sets grid lower bound to equal the lower bound of the identified set under parallel trends minus 20*standard deviation of the point estimate, l_vec'betahat. } + \item{seed}{ + Random seed for internal computations; included for reproducibility. + } } \value{ If returnLength equals TRUE, function returns a scalar that equals the length of the confidence interval. If returnLength equals FALSE, function returns a dataframe with columns diff --git a/man/computeConditionalCS_DeltaSDRM.Rd b/man/computeConditionalCS_DeltaSDRM.Rd index bd0dcea..83fa4b6 100644 --- a/man/computeConditionalCS_DeltaSDRM.Rd +++ b/man/computeConditionalCS_DeltaSDRM.Rd @@ -12,7 +12,7 @@ computeConditionalCS_DeltaSDRM(betahat, sigma, numPrePeriods, numPostPeriods, l_vec = .basisVector(index = 1, size = numPostPeriods), Mbar = 0, alpha = 0.05, hybrid_flag = "LF", hybrid_kappa = alpha/10, returnLength = FALSE, postPeriodMomentsOnly = TRUE, - gridPoints=10^3, grid.ub = NA, grid.lb = NA) + gridPoints=10^3, grid.ub = NA, grid.lb = NA, seed = 0) } %- maybe also 'usage' for other objects documented here. \arguments{ @@ -58,6 +58,9 @@ Logical value. If \code{TRUE}, function only returns the length of the robust co \item{grid.lb}{ Lower bound of grid for test inversion. The user should only specify this if she wishes to manually specify the upper bound of the grid. Default equals \code{NA} sets grid lower bound to equal the lower bound of the identified set under parallel trends minus 20*standard deviation of the point estimate, l_vec'betahat. } + \item{seed}{ + Random seed for internal computations; included for reproducibility. + } } \details{ For the choice \eqn{\Delta^{SDRM}}, \code{numPrePeriods} must be greater than one. As discussed in Section 2.3.2 of Rambachan & Roth (2021), \eqn{\Delta^{SDRM}} uses observed non-linearities in the pre-treatment difference in trends to bound the possible non-linearities in the post-treatment difference in trends. This is only possible if there are multiple pre-treatment periods (i.e., \code{numPrePeriods} > 1). diff --git a/man/computeConditionalCS_DeltaSDRMB.Rd b/man/computeConditionalCS_DeltaSDRMB.Rd index 3f64a04..fcd9d58 100644 --- a/man/computeConditionalCS_DeltaSDRMB.Rd +++ b/man/computeConditionalCS_DeltaSDRMB.Rd @@ -13,7 +13,7 @@ computeConditionalCS_DeltaSDRMB(betahat, sigma, numPrePeriods, numPostPeriods, Mbar = 0, alpha = 0.05, hybrid_flag = "LF", hybrid_kappa = alpha/10, returnLength = FALSE, postPeriodMomentsOnly = TRUE, biasDirection = "positive", - gridPoints=10^3, grid.ub = NA, grid.lb = NA) + gridPoints=10^3, grid.ub = NA, grid.lb = NA, seed = 0) } %- maybe also 'usage' for other objects documented here. \arguments{ @@ -62,6 +62,9 @@ Logical value. If \code{TRUE}, function only returns the length of the robust co \item{grid.lb}{ Lower bound of grid for test inversion. The user should only specify this if she wishes to manually specify the upper bound of the grid. Default equals \code{NA} sets grid lower bound to equal the lower bound of the identified set under parallel trends minus 20*standard deviation of the point estimate, l_vec'betahat. } + \item{seed}{ + Random seed for internal computations; included for reproducibility. + } } \details{ The choice \eqn{\Delta^{SDRMB}} adds an additional sign restriction to \eqn{\Delta^{SDRM}(Mbar)} that restricts the sign of the bias to be either positive (\eqn{\delta \ge 0}) or negative (\eqn{\delta \le 0}). For this choice \eqn{\Delta^{SDRMB}}, \code{numPrePeriods} must be greater than one. As discussed in Section 2.3.2 of Rambachan & Roth (2021), \eqn{\Delta^{SDRM}} uses observed non-linearities in the pre-treatment difference in trends to bound the possible non-linearities in the post-treatment difference in trends. This is only possible if there are multiple pre-treatment periods (i.e., \code{numPrePeriods} > 1). diff --git a/man/computeConditionalCS_DeltaSDRMM.Rd b/man/computeConditionalCS_DeltaSDRMM.Rd index 8203f9b..4fa46bd 100644 --- a/man/computeConditionalCS_DeltaSDRMM.Rd +++ b/man/computeConditionalCS_DeltaSDRMM.Rd @@ -14,7 +14,7 @@ computeConditionalCS_DeltaSDRMM(betahat, sigma, numPrePeriods, numPostPeriods, hybrid_kappa = alpha/10, returnLength = FALSE, postPeriodMomentsOnly = TRUE, monotonicityDirection = "increasing", - gridPoints=10^3, grid.ub = NA, grid.lb = NA) + gridPoints=10^3, grid.ub = NA, grid.lb = NA, seed = 0) } %- maybe also 'usage' for other objects documented here. \arguments{ diff --git a/man/createSensitivityResults.Rd b/man/createSensitivityResults.Rd index 427fc32..508fbb6 100644 --- a/man/createSensitivityResults.Rd +++ b/man/createSensitivityResults.Rd @@ -8,11 +8,16 @@ Constructs robust confidence intervals for a choice \eqn{\Delta = \Delta^{SD}(M)}, \eqn{\Delta^{SDB}(M)} and \eqn{\Delta^{SDM}(M)} for vector of possible M values. By default, the function constructs robust confidence intervals for \eqn{\Delta^{SD}(M)}. } \usage{ -createSensitivityResults(betahat, sigma, numPrePeriods, numPostPeriods, - method = NULL, Mvec = NULL, - l_vec = .basisVector(index = 1, size = numPostPeriods), - monotonicityDirection = NULL, - biasDirection = NULL, alpha = 0.05, parallel = FALSE) +createSensitivityResults(betahat, sigma, + numPrePeriods, numPostPeriods, + method = NULL, + Mvec = NULL, + l_vec = .basisVector(index = 1, size = numPostPeriods), + monotonicityDirection = NULL, + biasDirection = NULL, + alpha = 0.05, + parallel = FALSE, + seed = 0) } %- maybe also 'usage' for other objects documented here. \arguments{ @@ -49,6 +54,9 @@ createSensitivityResults(betahat, sigma, numPrePeriods, numPostPeriods, \item{parallel}{ Logical to indicate whether the user would like to construct the robust confidence intervals in parallel. This uses the Foreach package and doParallel package. Default equals FALSE. } + \item{seed}{ + Random seed for internal computations; included for reproducibility. + } } \value{ Returns a dataframe with columns diff --git a/man/createSensitivityResults_relativeMagnitudes.Rd b/man/createSensitivityResults_relativeMagnitudes.Rd index 238451b..5c314fa 100644 --- a/man/createSensitivityResults_relativeMagnitudes.Rd +++ b/man/createSensitivityResults_relativeMagnitudes.Rd @@ -21,7 +21,8 @@ createSensitivityResults_relativeMagnitudes(betahat, sigma, gridPoints = 10^3, grid.ub = NA, grid.lb = NA, - parallel = FALSE) + parallel = FALSE, + seed = 0) } %- maybe also 'usage' for other objects documented here. \arguments{ @@ -70,6 +71,9 @@ createSensitivityResults_relativeMagnitudes(betahat, sigma, \item{grid.lb}{ Lower bound of grid used for underlying test inversion. Default sets grid.lb to be equal to negative twenty times the standard deviation of the estimated target parameter, l_vec * betahat. User may wish to change the lower bound of the grid to suit their application. } + \item{seed}{ + Random seed for internal computations; included for reproducibility. + } } \details{ Note: If the user specifies bound = "deviation from linear trends", then numPrePeriods must be greater than one. By specifying bound = "deviation from linear trends", then the function selects \eqn{\Delta^{SDRM}} as the base choice of \eqn{\Delta}. As discussed in Section 2.3.2 of Rambachan & Roth (2021), \eqn{\Delta^{SDRM}} uses observed non-linearities in the pre-treatment difference in trends to bound the possible non-linearities in the post-treatment difference in trends. This is only possible if there are multiple pre-treatment periods (i.e., numPrePeriods > 1). diff --git a/man/findOptimalFLCI.Rd b/man/findOptimalFLCI.Rd index a4f6980..dfa2cd2 100644 --- a/man/findOptimalFLCI.Rd +++ b/man/findOptimalFLCI.Rd @@ -11,7 +11,7 @@ Constructs optimal fixed length confidence interval for \eqn{\Delta = \Delta^{SD findOptimalFLCI(betahat, sigma, M = 0, numPrePeriods, numPostPeriods, l_vec = .basisVector(index = 1, size = numPostPeriods), - numPoints = 100, alpha = 0.05) + numPoints = 100, alpha = 0.05, seed = 0) } %- maybe also 'usage' for other objects documented here. \arguments{ @@ -39,6 +39,9 @@ findOptimalFLCI(betahat, sigma, M = 0, \item{alpha}{ Desired size of the FLCI. Default equals 0.05 (corresponding to 95\% confidence interval) } + \item{seed}{ + Random seed for internal computations; included for reproducibility. + } } \value{ Returns a list containing items