Estoy intentando realizar un modelo lineal con un dataframe. Al ejecutar la sentencia me sale el siguiente error:
mod1<-lm(MCIGARRILLOS$Logcigarillos~MCIGARRILLOS$Logprecio~MCIGARRILLOS$LogSalario)
Error in model.frame.default(formula = MCIGARRILLOS$Logcigarillos ~ MCIGARRILLOS$Logprecio ~ : objeto no es una matriz