Description Usage Arguments Value Author(s) Examples
Function to calculate variable importance from output of mmsmodwts
by summing LNOCV weights.
1 |
pred |
a numeric vector giving indices of predictor variables as used in a call to |
weights |
a data frame of model weights, output from |
prednames |
a character vector of predictor names. If NULL (the default), the indices in |
an object of class dataframe consisting of summed variable weights
Jon Walter, jaw3es@virginia.edu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | v2<-matrix(rnorm(100),10,10)
v2<-v2+t(v2)
v3<-matrix(rnorm(100),10,10)
v3<-v3+t(v3)
v4<-matrix(rnorm(100),10,10)
v4<-v4+t(v4)
err<-matrix(rnorm(100,sd=.1),10,10)
err<-err+t(err)
v1<-1*v2+2*v3+3*v4+1+err
mats<-list(v1=v1,v2=v2,v3=v3,v4=v4)
model.names<-NA
n<-2
#in a real application nrand should be larger
nrand<-25
maxruns<-Inf
weights<-mmsmodwts(mats=mats,model.names=model.names,
nrand=nrand,n=n,maxruns=maxruns,progress=FALSE)
pred<-2:4
res<-mmsvarwts(pred=pred,weights=weights)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.