# Failing to understand and model market mix modelling

Hello I am have been trying to get my head around marketing mix modeling for last couple of months and have not been able to exactly figure out the nuances of the modelling.

I have three years of data for spend in each marketing channel and the target variables is the sales revenue. I have been reading various online blogs to understand how to model the data for Marketing Mix Models, The main objective is to calculate the contributions made by each channel towards my sales. Below is the step wise process as to how I try to do the modelling.

1. Calculate the adstock transformation for each media channel to capture carry over affect in the market.
2. Decompose the target variable to find out the seasonality, trend using ts() function.
3. Fit a lm() model to the data
Below is the code that I am using

return(as.numeric(stats::filter(x=x,filter=rate,method="recursive")))
}

start=c(a=1,b=1,rate=0))
if((summary(modFit)$$coefficients[3,1]>0) & (summary(modFit)$$coefficients[3,1]<1)){
AdstockRate=summary(modFit)$$coefficients[3,1] } else{ library(minpack.lm) nls.out<-nlsLM(Impact~a+b*adstock(Ads,rate),data=Data,start=list(a=1,b=1,rate=0), lower=c(a=-Inf,b=-Inf,rate=0),upper=c(a=Inf,b=Inf,rate=1)) AdstockRate=summary(nls.out)$$coefficients[3,1]
}
}

start=c(a=1,b=1,rate=0), control = list(maxiter = 500))
if((summary(modFit)$$coefficients[3,1]>0) & (summary(modFit)$$coefficients[3,1]<1)){
AdstockRate=summary(modFit)$$coefficients[3,1] } else{ library(minpack.lm) nls.out<-nlsLM(Impact~a+b*adstock(Ads,rate),data=Data,start=list(a=1,b=1,rate=0), lower=c(a=-Inf,b=-Inf,rate=0),upper=c(a=Inf,b=Inf,rate=1)) AdstockRate=summary(nls.out)$$coefficients[3,1]
}
}

adstock_rate8 <- AdstockRate(channel, channel$$target, channel$$Radio)
max_memory <- 3
learn_rates <- rep(adstock_rate8, max_memory+1) ^ c(0:max_memory)
adstocked_advertising <- stats::filter(c(rep(0, max_memory), channel$$Radio), learn_rates, method="convolution") adstocked_advertising <- adstocked_advertising[!is.na(adstocked_advertising)] adstock_threeplus$$Radio <- adstocked_advertising


Following are the issues that I have been encountering.

1. Negative coefficients for the marketing channels. This does not make business sense as essentially it means that as we spend more on marketing, the sales will go down. I understand the negative coefficients would be because my media channels are highly correlated and there would be multicollinearity in the model but I am not sure how to overcome this.
2. over attribution to some channels. Some channels show very high contribution as compared to another channels.
3. I am not sure if the data that I have if sufficient enough to do this kind of modelling, or if there is any alternate way of doing it.

I am very new to marketing domain and this is the first time I am trying to do this kind of modelling. I was hoping to get some help/guidance from all the experts the CV community.

Thanks a lot in advance !!