1 year ago

#176416

test-img

L GS

How to validate and train a multivariate multiple regression modeling multiple responses?

I would like to validate the accuracy of my Multivariate Multiple Regression model (MMR) and train.

For this MMR I have used four dependent variables (y1, y2, y3, y4) and two independent variables (x1 and x2)

Firstly, I worked with R function lm() such as:

modelo_MMR <- lm(cbind(y1,y2,y3,y4) ~ x1 + x2, data = my_data))

I have checked that the previous function could be divided such as:

m1 <- lm(y1 ~ x1 + x2, data = my_data)
m2 <- lm(y2 ~ x1 + x2, data = my_data)
m3 <- lm(y3 ~ x1 + x2, data = my_data)
m4 <- lm(y4 ~ x1 + x2, data = my_data)

To predict y1, y2, y3, and y4 with x1 and x2 values, I have used predict() function and I have obtained the same results using:

nd <- data.frame(x1 = 9, x2 = 40)

p_MMR <- predict(modelo_MMR, nd) 

than using:

p_m1 <- predict(m1, nd)
p_m2 <- predict(m2, nd)
p_m3 <- predict(m3, nd)
p_m4 <- predict(m4, nd)

When I use lm(cbind(y1,y2,y3,y4) ~ x1 + x2, data = my_data)) in some scripts to validate the model shows me several errors because those scripts usually use lm(), glm(), etc. using one response variable instead of four… I was thinking about to validate each multiple linear regression (p_m1, p_m2, p_m3 and p_m4) separately using the same training-set and test-set for cross validation. Also, I was thinking about using different machine learning models with each multiple linear regression because instead of MMR because of I have not find yet information about how to train MMR using Naives, Randomforest, K-NN, etc

Anyone could suggest me what I could do to train a MMR model and validate its accuracy?

Thanks

r

machine-learning

cross-validation

modeling

multivariate-testing

0 Answers

Your Answer

Accepted video resources