Description Usage Arguments Details Value Descriptive statistic information See Also Examples
The relationship between the target variable and the variable of interest (predictor) is briefly analyzed.
1 2 3 4 |
.data |
a target_df. |
predictor |
variable of interest. predictor. See vignette("relate") for an introduction to these concepts. |
Returns the four types of results that correspond to the combination of the target variable and the data type of the variable of interest.
target variable: categorical variable
predictor: categorical variable
contingency table
c("xtabs", "table") class
predictor: numerical variable
descriptive statistic for each levels and total observation.
target variable: numerical variable
predictor: categorical variable
ANOVA test. "lm" class.
predictor: numerical variable
simple linear model. "lm" class.
An object of the class as relate. Attributes of relate class is as follows.
target : name of target variable
predictor : name of predictor
model : levels of binned value.
raw : table_df with two variables target and predictor.
The information derived from the numerical data describe is as follows.
mean : arithmetic average
sd : standard deviation
se_mean : standrd error mean. sd/sqrt(n)
IQR : interqurtle range (Q3-Q1)
skewness : skewness
kurtosis : kurtosis
p25 : Q1. 25\
p50 : median. 50\
p75 : Q3. 75\
p01, p05, p10, p20, p30 : 1\
p40, p60, p70, p80 : 40\
p90, p95, p99, p100 : 90\
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | # If the target variable is a categorical variable
categ <- target_by(heartfailure, death_event)
# If the variable of interest is a numerical variable
cat_num <- relate(categ, sodium)
cat_num
summary(cat_num)
# plot(cat_num)
# If the variable of interest is a categorical variable
cat_cat <- relate(categ, hblood_pressure)
cat_cat
summary(cat_cat)
# plot(cat_cat)
##---------------------------------------------------
# If the target variable is a numerical variable
num <- target_by(heartfailure, creatinine)
# If the variable of interest is a numerical variable
num_num <- relate(num, sodium)
num_num
summary(num_num)
# plot(num_num)
# If the variable of interest is a categorical variable
num_cat <- relate(num, smoking)
num_cat
summary(num_cat)
# plot(num_cat)
# Not allow typographic
# plot(num_cat, typographic = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.