Question: #BRAND ggplot(Laptops, aes(x = Brand, y = Price, size = Price)) + geom_smooth(method = lm, se = FALSE) + geom_point() ggtitle(Price vs Brand (Dot Size
#BRAND ggplot(Laptops, aes(x = Brand, y = Price, size = Price)) + geom_smooth(method = lm, se = FALSE) + geom_point() ggtitle("Price vs Brand (Dot Size Indicates Price)") ggplot(Laptops, aes(x = Brand, y = Price, size = Price, color = Brand)) + geom_point(alpha = 0.6) + geom_smooth(method = "lm", se = FALSE) #PROCESSOR ggplot(Laptops, aes(x=Processor, y= Price,size = Price)) + geom_point() + geom_smooth(method = lm, se = FALSE) + ggtitle('Price vs Processor') #GPU ggplot(Laptops, aes(x=GPU, y= Price,size = Price)) + geom_point() + geom_smooth(method = lm, se = FALSE) + ggtitle('Price vs GPU') #RAM ggplot(Laptops, aes(x= RAM, y= Price,size = Price)) + geom_point() + geom_smooth(method = lm, se = FALSE) + ggtitle('Price vs Ram') #STORAGE ggplot(Laptops, aes(x= Storage, y= Price,size = Price)) + geom_point() + geom_smooth(method = lm, se = FALSE) + ggtitle('Price vs Ram') #Screen Size ggplot(Laptops, aes(x= `Screen Size`, y= Price, size = Price)) + geom_point() + geom_smooth(method = lm, se = FALSE) + ggtitle('Price vs Screen Size') #Battery Life ggplot(Laptops, aes(x= `Battery Life`, y= Price, size = Price)) + geom_point() + geom_smooth(method = lm, se = FALSE) + ggtitle('Price vs Screen Size') #REGRESSION Laptops.lm=lm(formula = Price ~ RAM + Storage + `Screen Size` + Brand + Processor + GPU ,data=Laptops)
Based on those visualizations how can i run the Linear Regression? 3 different regressions varying the categorical variables. Can you show me the full code for running the Linear Regression please
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
