Recent studies revealed the robust standard error estimates of the modified least-squares regression analysis are generally biased under small or moderate sample settings. To adjust the bias and to provide more accurate confidence intervals, confidence interval and P-value of the test for risk difference by modified least-squares regression are calculated based on the bootstrap approach of Noma and Gosho (2024).
bsci.ls(formula, data, x.name=NULL, B=1000, cl=0.95, C0=10^-5,
digits=4, seed=527916)
Results of the modified least-squares analyses are presented. Three objects are provided: Results of the modified least-squares regression with the Wald-type approximation by rqlm
, the bootstrap-based confidence interval for the corresponding covariate, and P-value for the bootstrap test of RD=0
.
An object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted.
A data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model.
The variable name that the confidence interval is calculated for the regression coefficient; should be involved in formula
as an explanatory variable. Specify as a character object.
The number of bootstrap resampling (default: 1000)
Confidence level for calculating confidence intervals (default: 0.95)
A tuning parameter to control the precisions of numerical computations of confidence limits (default: 10^-5).
Number of decimal places in the output (default: 4).
Seed to generate random numbers (default: 527916).
Noma, H. and Gosho, M. (2024). Bootstrap confidence intervals based on quasi-likelihood estimating functions for the modified Poisson and least-squares regressions for binary outcomes. Forthcoming.
data(exdata01)
bsci.ls(y ~ x1 + x2 + x3 + x4, data=exdata01, "x3", B=10)
# For illustration. B should be >= 1000 (the number of bootstrap resampling).
Run the code above in your browser using DataLab