Hello all, I want to assign relative score to the predictor variables on the basis of its influence on the dependent variable. But I could not find any standard statistical approach appropriate for this purpose. Please suggest the possible approaches. Thanks in advance, Rupendra Chulyadyo Institute of Engineering, Tribhuvan University, Nepal [[alternative HTML version deleted]]
Rupendra, depending on the nature of your data (which you haven't mentioned), you might try hierarchical partitioning, as found in the hier.part package on CRAN. Cheers Andrew On Wed, Jan 17, 2007 at 11:07:18AM +0545, Rupendra Chulyadyo wrote:> Hello all, > > I want to assign relative score to the predictor variables on the basis of > its influence on the dependent variable. But I could not find any standard > statistical approach appropriate for this purpose. > Please suggest the possible approaches. > > Thanks in advance, > > Rupendra Chulyadyo > Institute of Engineering, > Tribhuvan University, > Nepal > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch 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.-- Andrew Robinson Department of Mathematics and Statistics Tel: +61-3-8344-9763 University of Melbourne, VIC 3010 Australia Fax: +61-3-8344-4599 http://www.ms.unimelb.edu.au/~andrewpr http://blogs.mbs.edu/fishing-in-the-bay/
Rupendra Chulyadyo wrote:> Hello all, > > I want to assign relative score to the predictor variables on the basis of > its influence on the dependent variable. But I could not find any standard > statistical approach appropriate for this purpose. > Please suggest the possible approaches. > > Thanks in advance, > > Rupendra Chulyadyo > Institute of Engineering, > Tribhuvan University, > NepalYou might consider using the bootstrap to get confidence intervals of the rank of each predictor's partial chi-square or partial R-square. The following takes into account all terms that might be associated with a variable (nonlinear and interaction terms, dummy variables). The code is taken from an example in the anova.Design help file in the Design package. Unless the dataset is huge and there is little collinearity, you will be surprised how difficult it is to pick winners and losers from the predictors [try ranking gene expressions from gene microarray data for even more of a shock]. Note that Bayesian ranking procedures are more accurate, but this quick and dirty approach isn't bad. mydata <- data.frame(x1=runif(200), x2=runif(200), sex=factor(sample(c('female','male'),200,TRUE))) set.seed(9) # so can reproduce example mydata$y <- ifelse(runif(200)<=plogis(mydata$x1-.5 + .5*(mydata$x2-.5) + .5*(mydata$sex=='male')),1,0) library(Design) library(boot) b <- boot(mydata, function(data, i, ...) rank(-plot(anova( lrm(y ~ rcs(x1,4)+pol(x2,2)+sex,data,subset=i)), sort='none', pl=FALSE)), R=25) # should really do R=500 but will take a while Rank <- b$t0 lim <- t(apply(b$t, 2, quantile, probs=c(.025,.975))) # Use the Hmisc Dotplot function to display ranks and their confidence # intervals. Sort the categories by descending adj. chi-square, for ranks original.chisq <- plot(anova(lrm(y ~ rcs(x1,4)+pol(x2,2)+sex,data=mydata)), sort='none', pl=FALSE) predictor <- as.factor(names(original.chisq)) predictor <- reorder.factor(predictor, -original.chisq) Dotplot(predictor ~ Cbind(Rank, lim), pch=3, xlab='Rank', main=expression(paste( 'Ranks and 0.95 Confidence Limits for ',chi^2,' - d.f.'))) -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University
I suggest using permutation on each predictor and see how much the accuracy drops, no matter what modeling approach you used. HTH, weiwei On 1/17/07, Rupendra Chulyadyo <rchulyadyo at gmail.com> wrote:> Hello all, > > I want to assign relative score to the predictor variables on the basis of > its influence on the dependent variable. But I could not find any standard > statistical approach appropriate for this purpose. > Please suggest the possible approaches. > > Thanks in advance, > > Rupendra Chulyadyo > Institute of Engineering, > Tribhuvan University, > Nepal > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch 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. >-- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III