Description Usage Arguments Examples
get mean value for a lis of variables (numeric or factors) .
1 | mean_dist_var_list(tbla, formula_model)
|
tbla |
table with data. It has to have the target_name. |
formula_model |
the model with the list of variables. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | set.seed(1)
x1 = rnorm(1000)
x2 = rnorm(1000)
x4='A'
x4=ifelse(x1>0.1,'B', x4)
x4=ifelse(x1>0.4,'C', x4 )
x4=ifelse(x1>0.6,'D', x4 )
x4=ifelse(x1>0.8,'E', x4 )
per=c(rep(201810,200),rep(201812,400),rep(201901,400))
z = 1 + 3*x1 + x2
pr = 1/(1+exp(-z))
y = rbinom(1000,1,pr)
tbla = data.frame(y=y,x1=x1,x2=x2, x4=x4, per=per)
formula_model=formula(y~x2+x1+x4)
mean_dist_var_list(tbla, formula_model)
formula_model=formula(y~x2+x1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.