Description Usage Arguments Details Value Note Author(s)
Create a list with conditional information from a numeric variable based on the levels of factor variables from a dataset.
1 | conditional_stats(df, num_int_var)
|
df |
dataset to obtain the conditional information |
num_int_var |
ONE NUMERICAL VARIABLE from the dataset |
This function allows you to return conditional information from a numeric variable based on the levels of factor variables from a dataset.
"This function returns a list where each element is going to be a sublist containing".
dataset with the conditional probability on that specific level-combination given the join observations on other specific level-combination for the distribution of the num_int_var
on a specific combination level of the factor variables
dataset with the conditional expectancy, conditional variance & conditional standard deviation on that specific level-combination given the join observations on other specific level-combination for the distribution of the num_int_var
on a specific combination level of the factor variables
Each output is going to be a list, where each element is the result from each combination levels of the factor variables and the whole distribution of the numeric variable.
If there is no factor variable(s) then it is going to bring an empty list, because this function needs factor variables to obtain the intersection of the observations of the num_int_var
for the levels combinations
This function is applied to one numeric variable num_int_var
If you are not using a shiny app, is better to use general_descript_stats
function.
Eduardo Trujillo
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.