Xin__ Li
2010-Aug-10 23:44 UTC
[R] question about bayesian model selection for quantile regression
Hi All: Recently I am researching my dissertation about the quantile model selection by bayesian approach. I have the dependent variable(return) and 16 independent variables and I need to select the best variable for each quantile of return. And the method I used is the bayesian approach, which is based on calculating the posterior distibution of model identifier. In other words, I need to obtain the posterior model probabilities of all competing models (2^16 models) and ranking the models according to these probabilities. Then inferences can be based on the most probable model . However, I am not sure which package in R I should use. Could you help me and which exact packages I need to use? Many many thanks Best wishes XIN LI [[alternative HTML version deleted]]
Xin__ Li
2010-Aug-11 14:43 UTC
[R] question about bayesian model selection for quantile regression
> > Hello: >I try to use function "bms" to select the best model with the biggest posterior probability for different quantile. I have one return and 16 variables. However, I can just select for the linear model, how to change the code for quantile:> >bma1=bms(rq(y~.,tau=0.25,data=EQT), burn = 1000, iter = 3000, mcmc="bd") > Error in mpparam[[1]] : subscript out of bounds" >The code for linear model is sucessful:> > bma1=bms(EQT, burn = 1000, iter = 3000, mcmc="bd") > where EQT is my data >> beta.draws.bma(bma1[1:5]) how to use monte carlo to select the best model for quantile? Or which other function should be used?> > Best wishes > XIN LI >[[alternative HTML version deleted]]
Xin__ Li
2010-Aug-17 15:34 UTC
[R] question about bayesian model selection for quantile regression
Hi All: the package "MuMIn" can be used to select the model based on AIC or AICc. The code is as follows: data(Cement) lm1 <- lm(y ~ ., data = Cement) dd <- dredge(lm1,rank="AIC") print(dd) If I want to select the model by BIC, what code do I need to use? And when to select the best model based on AIC, what the differences between the function "dredge" in package"MuMIn" and the function "stepAIC" in package "MASS" Many thanks best wishes XIN LI [[alternative HTML version deleted]]