[R-sig-ME] Same model different data compare coefficients mixed models r

Mónica Eusébio mon|c@@deu@eb|o @end|ng |rom gm@||@com
Wed Mar 20 17:28:35 CET 2019

I am predicting the values of sales for every day/product with the information of the previous 30 days. I use the same variables to obtain the model used for each day/product. It is a 30 days temporal model with random effects at the region level. 

The values of the coefficients will be different according to the product and day.

What I am trying to figure out is if for the same product I can compare the coefficients for the different days. There is some kind of assessment/formal test to do this?

Imagine that we have this model structure, and I want to predict the sales for one day: model_day1<-lmer(y ~ x1 + x2+ x3 + (1|x4) + cos(2*pi*t/7) + sin(2*pi*t/7), data=dados) This is estimated with the 30 previous days, to know the sales of the 31st day.

Then I will use the same model structure to predict the sales of the second day, with the previous 30 days. 

model_day2<-lmer(y ~ x1 + x2+ x3 + (1|x4) + cos(2*pi*t/7) + sin(2*pi*t/7), data=dados)

There is a way to know if x1 coefficient of the model of day 1 is the same as x1 of the model of day 2? I am also trying to compare for more than just two days, and maybe figure out if working days are different from noon-working days.
	[[alternative HTML version deleted]]

More information about the R-sig-mixed-models mailing list