weight.plot: Generates Plots of weights by group

Description Usage Arguments Value Examples

View source: R/weight.plot.R

Description

This function takes the object created by the wqs.fit function and a vector of group names and generates a random forest variable importance plot for each group. The weights in each group are listed in descending order.

Usage

1
weight.plot(fit.object, group.names)

Arguments

fit.object

The object that is returned by the wqs.fit function

group.names

A string vector containing the name of each group included in the GWQS regression. Will be used for plot titles.

Value

A plot for each group of the GWQS regression

Examples

1
2
3
4
5
6
7
8
data("WQSdata")
group_list <- list(c("X1", "X2", "X3"), c("X4", "X7"), c("X5", "X6", "X9", "X8"))
chem_groups <- c("PCBs", "Metals", "Insecticides")
x.s <- make.x.s(WQSdata, 3, group_list)
X <- make.X(WQSdata, 3, group_list)
Y <- WQSdata$y
results <- gwqs.fit(y = Y, x = X, x.s = x.s, B=1, func = "continuous")
weight.plot(results, chem_groups)

groupWQS documentation built on July 1, 2020, 10:29 p.m.