bbo2 <- read.csv("http://users.stat.ufl.edu/~winner/data/bollywood_boxoffice2.csv") attach(bbo2); names(bbo2) bbo.mod1 <- lm(Gross ~ Budget) summary(bbo.mod1) bbo.mod2 <- lm(Gross ~ factor(Budget) - 1) summary(bbo.mod2) anova(bbo.mod1, bbo.mod2) win.graph(height=5.5, width=7.0) par(mfrow=c(2,2)) plot(bbo.mod1) cbind(rstandard(bbo.mod1),rstudent(bbo.mod1)) #dfbetas(bbo.mod1) #dffits(bbo.mod1) #cooks.distance(bbo.mod1) #covratio(bbo.mod1) influence.measures(bbo.mod1) install.packages("olsrr") library(olsrr) win.graph(height=5.5, width=7.0) ols_plot_cooksd_bar(bbo.mod1) win.graph(height=5.5, width=7.0) ols_plot_cooksd_chart(bbo.mod1) win.graph(height=5.5, width=7.0) ols_plot_resid_stud(bbo.mod1) win.graph(height=5.5, width=7.0) ols_plot_dfbetas(bbo.mod1) win.graph(height=5.5, width=7.0) ols_plot_dffits(bbo.mod1) win.graph(height=5.5, width=7.0) ols_plot_resid_lev(bbo.mod1) win.graph(height=5.5, width=7.0) ols_plot_resid_stud_fit(bbo.mod1) library(MASS) win.graph(height=5.5, width=7.0) boxcox(bbo.mod1, plotit=T)