Hi:
I'm in the process of validating internally a linear regression model using the method described by Harrell. Basically:
1) Generate a random bootstrap sample
2) Compute the regression coefficients and use that bootstrap model to compute R-square (or Adj R-square) on the bootstrap sample and on the original sample (<- my unsolved problem)
3) Compute the difference between the bootsample R-square and original sample R-square
4) Repeat at least 100 times
5) Get an average of the difference between R-squares
6) Use that average as a correction for optimism for the original R-square value obtained while developing the model
I get an idea that I have to use -simulate- together with an rclass program written by me, but I'm stuck because I think all the code I see posted in Statalist and somewhere else does the opossite: apply the original model to the bootstrap samples (which I don't want to). Besides, I found code for logistic and Cox models (for Harrell's C statistic, not R-square)
Any pointers?
Thanks in advance
Sorry for not posting code, I'm not even there yet...
Marta
I'm in the process of validating internally a linear regression model using the method described by Harrell. Basically:
1) Generate a random bootstrap sample
2) Compute the regression coefficients and use that bootstrap model to compute R-square (or Adj R-square) on the bootstrap sample and on the original sample (<- my unsolved problem)
3) Compute the difference between the bootsample R-square and original sample R-square
4) Repeat at least 100 times
5) Get an average of the difference between R-squares
6) Use that average as a correction for optimism for the original R-square value obtained while developing the model
I get an idea that I have to use -simulate- together with an rclass program written by me, but I'm stuck because I think all the code I see posted in Statalist and somewhere else does the opossite: apply the original model to the bootstrap samples (which I don't want to). Besides, I found code for logistic and Cox models (for Harrell's C statistic, not R-square)
Any pointers?
Thanks in advance
Sorry for not posting code, I'm not even there yet...
Marta
Comment