Luis Luévano
2015/06/21
This application is intended to bring simplicity to a user not familiar with a statistical tool in order to get a predictive formula. In this app we use a linear regression model without intercept.
The input data is:
The app does these basic validations:
Suppose that user wants to predict the following outcome:
y <- c(3,4,2,3,6)
x1 <- c(-5,0,1,2,3)
x2 <- c(0,0,9,8,9)
User must enter in Dependent variable data the string “3,4,2,3,6”, select Number of predictive variables to 2, and finally put the strings “-5,0,1,2,3” and “0,0,9,8,9” in Variable 1 data and Variable 1 data respectively.
The predictive formula would be calculated as:
fit <- lm(y ~ x1 + x2 -1)
paste0('DepVar = ', 'Var1*', round(fit$coeff[[1]], 2),' + ','Var2*', round(fit$coeff[[2]], 2))
[1] "DepVar = Var1*-0.41 + Var2*0.52"