iterVarSelRF: iterVarSelRF

Description Usage Arguments Examples

View source: R/iterVarSelRF.R

Description

This function iterates the 'varselRF' function to capture variability in the possibly selected variables. This process forms the basis of the analysis conducted in Hollister, Kreakie, and Milsted (2014). We us the proportion of iterations that a given variable is selected as a variable selection metric. A parallel implementation is possible using 'snowfall'. User only need specify the number of cores to use. Function relies on knitr,snowfall,parallel, and varSelRF

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
iterVarSelRF(
  indVar,
  depVar,
  numRun = 10,
  numCore = 1,
  outStr = tempfile(tmpdir = getwd()),
  ntree = 10,
  ntreeIterat = 5,
  vars.drop.frac = NULL,
  vars.drop.num = 1,
  time = FALSE
)

Arguments

indVar

independent variables

depVar

dependent variable

numRun

number of iterations. default is 10

numCore

number of cores to split runs across. defualt is 1

outStr

string to append to output files. Defaults to a tmp file

time

logical true will output overall time for the run.

Examples

1
2
3
4
5
data(LakeTrophicModelling)
x1<-iterVarSelRF(ltmData[predictors_gis],ltmData$TS_CHLA_4,10,ntree=10,ntreeIterat=5,
vars.drop.frac=NULL,vars.drop.num=1,time=TRUE)
x2<-iterVarSelRF(ltmData[predictors_gis],ltmData$TS_CHLA_4,10,4,ntree=10,ntreeIterat=5,
vars.drop.frac=NULL,vars.drop.num=1,time=TRUE)

USEPA/LakeTrophicModelling documentation built on Oct. 15, 2020, 4:13 p.m.