[R] Bootstrapping confidence intervals
Hi, Sorry for repeated question. I performed logistic regression using lrm and penalized it with pentrace function. I wanted to get confidence intervals of odds ratio of each predictor and summary(MyModel) gave them. I also tried to get bootstrapping standard errors in the logistic regression. bootcov function in rms package provided them. Then, I found that the confidence intervals provided by bootstrapping (bootcov) was narrower than CIs provided by usual variance-covariance matrix in the followings. My data has no cluster structure. I am wondering which confidence interval is better. I guess bootstrapping one, but is it right? I would appreciate anybody's help in advance. > summary(MyModel, stenosis=c(70, 80), x1=c(1.5, 2.0), x2=c(1.5, 2.0)) Effects Response : outcome Factor Low High Diff. Effect S.E. Lower 0.95 Upper 0.95 stenosis70.0 80 10.0 -0.11 0.24 -0.59 0.37 Odds Ratio 70.0 80 10.0 0.90NA 0.56 1.45 x1 1.5 20.5 1.21 0.37 0.49 1.94 Odds Ratio 1.5 20.5 3.36NA 1.63 6.95 x2 1.5 20.5 -0.29 0.19 -0.65 0.08 Odds Ratio 1.5 20.5 0.75NA 0.52 1.08 ClinicalScore3.0 52.0 0.61 0.38 -0.14 1.36 Odds Ratio 3.0 52.0 1.84NA 0.87 3.89 procedure - CA:CE2.0 1 NA 0.83 0.46 -0.07 1.72 Odds Ratio 2.0 1 NA 2.28NA 0.93 5.59 > summary(MyModel.boot, stenosis=c(70, 80), x1=c(1.5, 2.0), x2=c(1.5, 2.0)) Effects Response : outcome Factor Low High Diff. Effect S.E. Lower 0.95 Upper 0.95 stenosis70.0 80 10.0 -0.11 0.28 -0.65 0.43 Odds Ratio 70.0 80 10.0 0.90NA 0.52 1.54 x1 1.5 20.5 1.21 0.29 0.65 1.77 Odds Ratio 1.5 20.5 3.36NA 1.92 5.89 x2 1.5 20.5 -0.29 0.16 -0.59 0.02 Odds Ratio 1.5 20.5 0.75NA 0.55 1.02 ClinicalScore3.0 52.0 0.61 0.45 -0.28 1.50 Odds Ratio 3.0 52.0 1.84NA 0.76 4.47 procedure - CAS:CEA 2.0 1 NA 0.83 0.38 0.07 1.58 Odds Ratio 2.0 1 NA 2.28NA 1.08 4.85 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Bootstrapping confidence intervals
John Fox has a nice explanation here: http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-bootstrapping.pdf -Ista On Wed, Oct 21, 2009 at 6:38 AM, Charlotta Rylander wrote: > Hello, > > We are a group of PhD students working in the field of toxicology. Several > of us have small data sets with N=10-15. Our research is mainly about the > association between an exposure and an effect, so preferrably we would like > to use linear regression models. However, most of the time our data do not > fulfill the model assumptions for linear models ( no normality of y-varible > achieved even after log transformation). We have been told that we can use > bootstrapping to derive a confidence interval for the original parameter > estimate ( Beta 1) from the linear regression model and if the confidence > interval do not include 0, we can "trust" the result from the original > linear model ( of couse only if a scatter plot of the variables looks ok). > What is your opinion about this method? Is that ok? I have problems > understanding how it is possible to resample several times from an already > poor distribution ( that do not fulfill the model assumptions for linear > models) to achieve a confidence interval that "validates" the use of these > linear models? I would really appriciate a simple explanation about this! > > Many thanks, > > Charlotta Rylander > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Bootstrapping confidence intervals
Hello, We are a group of PhD students working in the field of toxicology. Several of us have small data sets with N=10-15. Our research is mainly about the association between an exposure and an effect, so preferrably we would like to use linear regression models. However, most of the time our data do not fulfill the model assumptions for linear models ( no normality of y-varible achieved even after log transformation). We have been told that we can use bootstrapping to derive a confidence interval for the original parameter estimate ( Beta 1) from the linear regression model and if the confidence interval do not include 0, we can "trust" the result from the original linear model ( of couse only if a scatter plot of the variables looks ok). What is your opinion about this method? Is that ok? I have problems understanding how it is possible to resample several times from an already poor distribution ( that do not fulfill the model assumptions for linear models) to achieve a confidence interval that "validates" the use of these linear models? I would really appriciate a simple explanation about this! Many thanks, Charlotta Rylander [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.