shapleyvalue: ShapleyValueRegression - to calculate the relative importance...

Description Arguments Value Examples

View source: R/ShapleyValue.R

Description

Shapley Value Regression for calculating the relative importance of independent variables in linear regression with avoiding the collinearity.

Arguments

y A coloumn or data set of the dependent variable

x A matrix or data set of the independent variables

Value

The structure of the output is a datatable, with two rows:the unstandardized and standardized relative importance of each attributes using shapley value regression method.

Examples

1
2
3
4
5
6
library(MASS)
library(tidyverse)
data <- Boston
y <- data$medv
x <- as.data.frame(data[,5:8])
shapleyvalue(y,x)

ShapleyValue documentation built on July 27, 2021, 9:07 a.m.