dat <- read.csv(file='BrandsDATAFinal.csv',header=TRUE,dec=',',row.names = NULL,sep=';') datc <- dat[complete.cases(dat),] library(lme4) library(gamm4) library(itsadug) library(mgcv) library(ggplot2) options(max.print = 100000) mod0 <- gamm4(Loyalty ~ + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=datc) mod1a <- gamm4(Loyalty ~ s(Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=datc) mod1b <- gamm4(Loyalty ~ s(Quality) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=datc) mod1c <- gamm4(Loyalty ~ s(Attitude) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=datc) mod1 <- gamm4(Loyalty ~ s(Attitude) + s(Quality) + s(Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=datc) mod2 <- gamm4(Loyalty ~ t2(Attitude, Quality) + t2(Attitude, Experience) + t2(Quality, Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=datc) mod3 <- gamm4(Loyalty ~ t2(Attitude, Quality, Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=datc) summary(mod0$gam, options(max.print=9999)) summary(mod1a$gam) summary(mod1b$gam) summary(mod1c$gam) summary(mod1$gam) summary(mod2$gam) summary(mod3$gam) AIC(mod0$mer, mod1a$mer, mod1b$mer, mod1c$mer, mod1$mer, mod2$mer, mod3$mer) BIC(mod0$mer, mod1a$mer, mod1b$mer, mod1c$mer, mod1$mer, mod2$mer, mod3$mer) ############# A <- subset(dat, Industries == "FMCG") B <- subset(dat, Industries == "Automotive") C <- subset(dat, Industries == "Fashion & Lifestyle") D <- subset(dat, Industries == "Electronics") E <- subset(dat, Industries == "Finance & Ensurance") mod0A <- gamm4(Loyalty ~ + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=A) mod1A <- gamm4(Loyalty ~ s(Attitude) + s(Quality) + s(Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=A) mod2A <- gamm4(Loyalty ~ t2(Attitude, Quality) + t2(Attitude, Experience) + t2(Quality, Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=A) mod3A <- gamm4(Loyalty ~ t2(Attitude, Quality, Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=A) ##### mod0B <- gamm4(Loyalty ~ + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=B) mod1B <- gamm4(Loyalty ~ s(Attitude) + s(Quality) + s(Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=B) mod2B <- gamm4(Loyalty ~ t2(Attitude, Quality) + t2(Attitude, Experience) + t2(Quality, Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=B) mod3B <- gamm4(Loyalty ~ t2(Attitude, Quality, Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=B) ##### mod0C <- gamm4(Loyalty ~ + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=C) mod1C <- gamm4(Loyalty ~ s(Attitude) + s(Quality) + s(Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=C) mod2C <- gamm4(Loyalty ~ t2(Attitude, Quality) + t2(Attitude, Experience) + t2(Quality, Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=C) mod3C <- gamm4(Loyalty ~ t2(Attitude, Quality, Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=C) #### mod0D <- gamm4(Loyalty ~ + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=D) mod1D <- gamm4(Loyalty ~ s(Attitude) + s(Quality) + s(Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=D) mod2D <- gamm4(Loyalty ~ t2(Attitude, Quality) + t2(Attitude, Experience) + t2(Quality, Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=D) mod3D <- gamm4(Loyalty ~ t2(Attitude, Quality, Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=D) #### mod0E <- gamm4(Loyalty ~ + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=E) mod1E <- gamm4(Loyalty ~ s(Attitude) + s(Quality) + s(Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=E) mod2E <- gamm4(Loyalty ~ t2(Attitude, Quality) + t2(Attitude, Experience) + t2(Quality, Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=E) mod3E <- gamm4(Loyalty ~ t2(Attitude, Quality, Experience) + s(BrandInvolvement) + as.factor(v_41)*as.factor(Index1_Brands) ,random = ~ (1|id) ,data=E) ##### summary(mod0A$gam) summary(mod0B$gam) summary(mod0C$gam) summary(mod0D$gam) summary(mod0E$gam) summary(mod1A$gam) summary(mod1B$gam) summary(mod1C$gam) summary(mod1D$gam) summary(mod1E$gam) summary(mod2A$gam) summary(mod2B$gam) summary(mod2C$gam) summary(mod2D$gam) summary(mod2E$gam) summary(mod3A$gam) summary(mod3B$gam) summary(mod3C$gam) summary(mod3D$gam) summary(mod3E$gam) AIC(mod0A$mer, mod1A$mer, mod2A$mer, mod3A$mer) BIC(mod0A$mer, mod1A$mer, mod2A$mer, mod3A$mer) AIC(mod0B$mer, mod1B$mer, mod2B$mer, mod3B$mer) BIC(mod0B$mer, mod1B$mer, mod2B$mer, mod3B$mer) AIC(mod0C$mer, mod1C$mer, mod2C$mer, mod3C$mer) BIC(mod0C$mer, mod1C$mer, mod2C$mer, mod3C$mer) AIC(mod0D$mer, mod1D$mer, mod2D$mer, mod3D$mer) BIC(mod0D$mer, mod1D$mer, mod2D$mer, mod3D$mer) AIC(mod0E$mer, mod1E$mer, mod2E$mer, mod3E$mer) BIC(mod0E$mer, mod1E$mer, mod2E$mer, mod3E$mer) #FIGURES #mod1 A <- subset(dat, Industries == "FMCG") B <- subset(dat, Industries == "Automotive") C <- subset(dat, Industries == "Fashion & Lifestyle") D <- subset(dat, Industries == "Electronics") E <- subset(dat, Industries == "Finance & Ensurance") #####PLOTS #mod1 tiff(filename="Fig1.tiff", width=2500, height=1000, res=300) par(mfrow=c(1,3)) plot(mod1$gam,select=1,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-1,2), las =1, seWithMean=TRUE, main=NULL) abline(h=0) plot(mod1$gam,select=3,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-1,2), las =1, seWithMean=TRUE, main=NULL) abline(h=0) plot(mod1$gam,select=2,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-1,2), las =1, seWithMean=TRUE, main=NULL) abline(h=0) dev.off() #mod2 tiff(filename="Fig2.tiff", width=2500, height=2000, res=300) par(mfrow=c(2,3)) pvisgam(mod2$gam,select=1,view=c('Attitude','Quality'), too.far = 0, n.grid=20, zlim=c(-2, 2.5), plot.type='persp',color='heat', hide.label=TRUE, show.diff=FALSE, theta=30,phi=30, main=NULL) pvisgam(mod2$gam,select=2,view=c('Attitude','Experience'),too.far = 0, n.grid=20, zlim=c(-2, 2.5),plot.type='persp',color='heat', hide.label=TRUE, show.diff=FALSE, theta=30,phi=30, main=NULL) pvisgam(mod2$gam,select=3,view=c('Quality','Experience'),too.far = 0, n.grid=20, zlim=c(-2, 2.5),plot.type='persp', color='heat',hide.label=TRUE, show.diff=FALSE, theta=30,phi=30, main=NULL) pvisgam(mod2$gam,select=1,view=c('Attitude','Quality'), too.far = 0,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main=NULL, add.color.legend=FALSE) pvisgam(mod2$gam,select=2,view=c('Attitude','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main=NULL, add.color.legend=FALSE) pvisgam(mod2$gam,select=3,view=c('Quality','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main=NULL, add.color.legend=TRUE) dev.off() # Fig B tiff(filename="FigB.tiff", width=2500, height=2000, res=300) par(mfrow=c(2,3)) pvisgam(mod3$gam,view=c('Attitude','Quality'),cond=list(Experience=2),too.far = 0,las =1, n.grid=20, zlim=c(-2.5, 4), plot.type='persp',color='heat', hide.label=TRUE, theta=30,phi=30, main="Experience = 2") pvisgam(mod3$gam,view=c('Attitude','Quality'),cond=list(Experience=4),too.far = 0,las =1, n.grid=20, zlim=c(-2.5, 4),plot.type='persp',color='heat', hide.label=TRUE, theta=30,phi=30, main="Experience = 4") pvisgam(mod3$gam,view=c('Attitude','Quality'),cond=list(Experience=6),too.far = 0,las =1, n.grid=20, zlim=c(-2.5, 4),plot.type='persp', color='heat',hide.label=TRUE, theta=30,phi=30, main="Experience = 6") pvisgam(mod3$gam,view=c('Attitude','Quality'),cond=list(Experience=2),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 2", add.color.legend=FALSE) pvisgam(mod3$gam,view=c('Attitude','Quality'),cond=list(Experience=4),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 4", add.color.legend=FALSE) pvisgam(mod3$gam,view=c('Attitude','Quality'),cond=list(Experience=6),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="Experience = 6") dev.off() #Fig 3 tiff(filename="Fig3.tiff", width=3000, height=2200, res=300) par(mfrow=c(3,5)) plot(mod1A$gam,select=1,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2.5,2.5), las =1, seWithMean=TRUE, main="FMCG") abline(h=0) plot(mod1B$gam,select=1,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2.5,2.5), las =1, seWithMean=TRUE, main="Automotive") abline(h=0) plot(mod1C$gam,select=1,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2.5,2.5), las =1, seWithMean=TRUE, main="Fashion") abline(h=0) plot(mod1D$gam,select=1,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2.5,2.5), las =1, seWithMean=TRUE, main="Electronics") abline(h=0) plot(mod1E$gam,select=1,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2.5,2.5), las =1, seWithMean=TRUE, main="Finance & Ensurance") abline(h=0) plot(mod1A$gam,select=2,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2.5,2.5), las =1, seWithMean=TRUE) abline(h=0) plot(mod1B$gam,select=2,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2.5,2.5), las =1, seWithMean=TRUE) abline(h=0) plot(mod1C$gam,select=2,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2.5,2.5), las =1, seWithMean=TRUE) abline(h=0) plot(mod1D$gam,select=2,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2.5,2.5), las =1, seWithMean=TRUE) abline(h=0) plot(mod1E$gam,select=2,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2.5,2.5), las =1, seWithMean=TRUE) abline(h=0) plot(mod1A$gam,select=3,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2.5,2.5), las =1, seWithMean=TRUE) abline(h=0) plot(mod1B$gam,select=3,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2.5,2.5), las =1, seWithMean=TRUE) abline(h=0) plot(mod1C$gam,select=3,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2.5,2.5), las =1, seWithMean=TRUE) abline(h=0) plot(mod1D$gam,select=3,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2.5,2.5), las =1, seWithMean=TRUE) abline(h=0) plot(mod1E$gam,select=3,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2.5,2.5), las =1, seWithMean=TRUE) abline(h=0) dev.off() tiff(filename="Fig4.tiff", width=3000, height=2200, res=300) par(mfrow=c(3,5)) pvisgam(mod2A$gam,select=1,view=c('Attitude','Quality'), too.far = 1,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="FMCG", add.color.legend=FALSE) pvisgam(mod2B$gam,select=1,view=c('Attitude','Quality'), too.far = 1,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Automotive", add.color.legend=FALSE) pvisgam(mod2C$gam,select=1,view=c('Attitude','Quality'), too.far = 1,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Fashion", add.color.legend=FALSE) pvisgam(mod2D$gam,select=1,view=c('Attitude','Quality'), too.far = 1,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Electronics", add.color.legend=FALSE) pvisgam(mod2E$gam,select=1,view=c('Attitude','Quality'), too.far = 1,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Finance & Ensurance", add.color.legend=TRUE) pvisgam(mod2A$gam,select=2,view=c('Attitude','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main=NULL, add.color.legend=FALSE) pvisgam(mod2B$gam,select=2,view=c('Attitude','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main=NULL, add.color.legend=FALSE) pvisgam(mod2C$gam,select=2,view=c('Attitude','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main=NULL, add.color.legend=FALSE) pvisgam(mod2D$gam,select=2,view=c('Attitude','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main=NULL, add.color.legend=FALSE) pvisgam(mod2E$gam,select=2,view=c('Attitude','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main=NULL, add.color.legend=TRUE) pvisgam(mod2A$gam,select=3,view=c('Quality','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main=NULL, add.color.legend=FALSE) pvisgam(mod2B$gam,select=3,view=c('Quality','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main=NULL, add.color.legend=FALSE) pvisgam(mod2C$gam,select=3,view=c('Quality','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main=NULL, add.color.legend=FALSE) pvisgam(mod2D$gam,select=3,view=c('Quality','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main=NULL, add.color.legend=FALSE) pvisgam(mod2E$gam,select=3,view=c('Quality','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main=NULL, add.color.legend=TRUE) dev.off() tiff(filename="FigC.tiff", width=3000, height=2200, res=300) par(mfrow=c(3,5)) pvisgam(mod3A$gam,view=c('Attitude','Quality'),cond=list(Experience=2),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 2", add.color.legend=FALSE) pvisgam(mod3B$gam,view=c('Attitude','Quality'),cond=list(Experience=2),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 2", add.color.legend=FALSE) pvisgam(mod3C$gam,view=c('Attitude','Quality'),cond=list(Experience=2),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 2", add.color.legend=FALSE) pvisgam(mod3D$gam,view=c('Attitude','Quality'),cond=list(Experience=2),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 2", add.color.legend=FALSE) pvisgam(mod3E$gam,view=c('Attitude','Quality'),cond=list(Experience=2),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 2", add.color.legend=TRUE) pvisgam(mod3A$gam,view=c('Attitude','Quality'),cond=list(Experience=4),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 4", add.color.legend=FALSE) pvisgam(mod3B$gam,view=c('Attitude','Quality'),cond=list(Experience=4),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 4", add.color.legend=FALSE) pvisgam(mod3C$gam,view=c('Attitude','Quality'),cond=list(Experience=4),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 4", add.color.legend=FALSE) pvisgam(mod3D$gam,view=c('Attitude','Quality'),cond=list(Experience=4),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 4", add.color.legend=FALSE) pvisgam(mod3E$gam,view=c('Attitude','Quality'),cond=list(Experience=4),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 4", add.color.legend=TRUE) pvisgam(mod3A$gam,view=c('Attitude','Quality'),cond=list(Experience=6),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="Experience = 6", add.color.legend=FALSE) pvisgam(mod3B$gam,view=c('Attitude','Quality'),cond=list(Experience=6),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="Experience = 6", add.color.legend=FALSE) pvisgam(mod3C$gam,view=c('Attitude','Quality'),cond=list(Experience=6),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="Experience = 6", add.color.legend=FALSE) pvisgam(mod3D$gam,view=c('Attitude','Quality'),cond=list(Experience=6),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="Experience = 6", add.color.legend=FALSE) pvisgam(mod3E$gam,view=c('Attitude','Quality'),cond=list(Experience=6),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="Experience = 6", add.color.legend=TRUE) dev.off() tiff(filename="IndustryAttitude.tiff", width=4000, height=1000, res=300) par(mfrow=c(1,5)) plot(mod1A$gam,select=1,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2,2.5), las =1, seWithMean=TRUE, main="FMCG") abline(h=0) plot(mod1B$gam,select=1,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2,2.5), las =1, seWithMean=TRUE, main="Automotive") abline(h=0) plot(mod1C$gam,select=1,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2,2.5), las =1, seWithMean=TRUE, main="Fashion") abline(h=0) plot(mod1D$gam,select=1,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2,2.5), las =1, seWithMean=TRUE, main="Electronics") abline(h=0) plot(mod1E$gam,select=1,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2,2.5), las =1, seWithMean=TRUE, main="Finance & Ensurance") abline(h=0) dev.off() tiff(filename="IndustryExperience.tiff", width=4000, height=1000, res=300) par(mfrow=c(1,5)) plot(mod1A$gam,select=3,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2,2.5), las =1, seWithMean=TRUE, main="1B") abline(h=0) plot(mod1B$gam,select=3,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2,2.5), las =1, seWithMean=TRUE, main="1B") abline(h=0) plot(mod1C$gam,select=3,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2,2.5), las =1, seWithMean=TRUE, main="1B") abline(h=0) plot(mod1D$gam,select=3,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2,2.5), las =1, seWithMean=TRUE, main="1C") abline(h=0) plot(mod1E$gam,select=3,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-2,2.5), las =1, seWithMean=TRUE, main="1B") abline(h=0) dev.off() tiff(filename="IndustryQuality.tiff", width=4000, height=1000, res=300) par(mfrow=c(1,5)) plot(mod1A$gam,select=2,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-1.5,2.5), las =1, seWithMean=TRUE, main="1C") abline(h=0) plot(mod1B$gam,select=2,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-1.5,2.5), las =1, seWithMean=TRUE, main="1C") abline(h=0) plot(mod1C$gam,select=2,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-1.5,2.5), las =1, seWithMean=TRUE, main="1C") abline(h=0) plot(mod1D$gam,select=2,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-1.5,2.5), las =1, seWithMean=TRUE, main="1C") abline(h=0) plot(mod1E$gam,select=2,shade=TRUE, rug=FALSE, shade.col='grey80', ylim=c(-1.5,2.5), las =1, seWithMean=TRUE, main="1C") abline(h=0) dev.off() #Heat plus Sig shades tiff(filename="mod2IndustrycontI.tiff", width=3200, height=850, res=300) par(mfrow=c(1,5)) pvisgam(mod2A$gam,select=1,view=c('Attitude','Quality'), too.far = 1,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="FMCG", add.color.legend=FALSE) pvisgam(mod2B$gam,select=1,view=c('Attitude','Quality'), too.far = 1,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Automotive", add.color.legend=FALSE) pvisgam(mod2C$gam,select=1,view=c('Attitude','Quality'), too.far = 1,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Fashion", add.color.legend=FALSE) pvisgam(mod2D$gam,select=1,view=c('Attitude','Quality'), too.far = 1,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Electronics", add.color.legend=FALSE) pvisgam(mod2E$gam,select=1,view=c('Attitude','Quality'), too.far = 1,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Finance & Ensurance", add.color.legend=FALSE) dev.off() tiff(filename="mod2IndustrycontII.tiff", width=3200, height=850, res=300) par(mfrow=c(1,5)) pvisgam(mod2A$gam,select=2,view=c('Attitude','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="3B", add.color.legend=FALSE) pvisgam(mod2B$gam,select=2,view=c('Attitude','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="3B", add.color.legend=FALSE) pvisgam(mod2C$gam,select=2,view=c('Attitude','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="3B", add.color.legend=FALSE) pvisgam(mod2D$gam,select=2,view=c('Attitude','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="3B", add.color.legend=FALSE) pvisgam(mod2E$gam,select=2,view=c('Attitude','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="3B", add.color.legend=FALSE) dev.off() tiff(filename="mod2IndustrycontIII.tiff", width=3200, height=850, res=300) par(mfrow=c(1,5)) pvisgam(mod2A$gam,select=3,view=c('Quality','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="3C", add.color.legend=FALSE) pvisgam(mod2B$gam,select=3,view=c('Quality','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="3C", add.color.legend=FALSE) pvisgam(mod2C$gam,select=3,view=c('Quality','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="3C", add.color.legend=FALSE) pvisgam(mod2D$gam,select=3,view=c('Quality','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="3C", add.color.legend=FALSE) pvisgam(mod2E$gam,select=3,view=c('Quality','Experience'),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="3C", add.color.legend=FALSE) dev.off() #HEAT 2, 4, 6 tiff(filename="mod3contindustrylowexp.tiff", width=3200, height=850, res=300) par(mfrow=c(1,5)) pvisgam(mod3A$gam,view=c('Attitude','Quality'),cond=list(Experience=2),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 2", add.color.legend=FALSE) pvisgam(mod3B$gam,view=c('Attitude','Quality'),cond=list(Experience=2),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 2", add.color.legend=FALSE) pvisgam(mod3C$gam,view=c('Attitude','Quality'),cond=list(Experience=2),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 2", add.color.legend=FALSE) pvisgam(mod3D$gam,view=c('Attitude','Quality'),cond=list(Experience=2),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 2", add.color.legend=FALSE) pvisgam(mod3E$gam,view=c('Attitude','Quality'),cond=list(Experience=2),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800, plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 2", add.color.legend=FALSE) dev.off() tiff(filename="mod3contindustrymodexp.tiff", width=3200, height=850, res=300) par(mfrow=c(1,5)) pvisgam(mod3A$gam,view=c('Attitude','Quality'),cond=list(Experience=4),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 4", add.color.legend=FALSE) pvisgam(mod3B$gam,view=c('Attitude','Quality'),cond=list(Experience=4),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 4", add.color.legend=FALSE) pvisgam(mod3C$gam,view=c('Attitude','Quality'),cond=list(Experience=4),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 4", add.color.legend=FALSE) pvisgam(mod3D$gam,view=c('Attitude','Quality'),cond=list(Experience=4),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 4", add.color.legend=FALSE) pvisgam(mod3E$gam,view=c('Attitude','Quality'),cond=list(Experience=4),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour',color='heat', hide.label=TRUE, show.diff=TRUE, main="Experience = 4", add.color.legend=FALSE) dev.off() tiff(filename="mod3contindustryhiexp.tiff", width=3200, height=850, res=300) par(mfrow=c(1,5)) pvisgam(mod3A$gam,view=c('Attitude','Quality'),cond=list(Experience=6),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="Experience = 6") pvisgam(mod3B$gam,view=c('Attitude','Quality'),cond=list(Experience=6),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="Experience = 6") pvisgam(mod3C$gam,view=c('Attitude','Quality'),cond=list(Experience=6),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="Experience = 6") pvisgam(mod3D$gam,view=c('Attitude','Quality'),cond=list(Experience=6),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="Experience = 6") pvisgam(mod3E$gam,view=c('Attitude','Quality'),cond=list(Experience=6),too.far = 0,las =1, zlim=c(-2, 2),n.grid=800,plot.type='contour', color='heat',hide.label=TRUE, show.diff=TRUE, main="Experience = 6") dev.off()