BookmarkSubscribeRSS Feed
csetzkorn
Lapis Lazuli | Level 10

I have daily time series product data where the dependent variable is demand for a product in units and the indepdent variables are product price and a binary intervention dummy variable to indicate promotion. I have been told that I can use PROC NLMIXED for this (as I do not have SAS/ETS available). Just curious, has someone applied PROC NLMIXED for such a scenario and if so what nonlinear function would you suggest to start with and how do I determine appropriate seeding values. Any feedback would be very much appreciated!

3 REPLIES 3
Ksharp
Super User

Yes. It is called repeated measure mixed model.

you can use it to predict demand.

 

proc mixed;

class ......;

model demand=price ..............;

random int /subject=person;

repeated time /subject=person type=ar(1) ;

run;

csetzkorn
Lapis Lazuli | Level 10
Sorry is this intended that you do not use nlmixed? Also would person be productid in my case? I have one dependent var units. At least 3 independent vars: date, price, intervention flag (binary dummy).
Ksharp
Super User
proc nlmixed fit the nonlinear mixed model,
while proc mixed fit the linear mixed model.
I don't have much experience with proc nlmixed.
but I think proc mixed is able to get job done.

"Also would person be productid in my case? I have one dependent var units. At least 3 independent vars: date, price, intervention flag (binary dummy)."
Yes. person means a strata. you can use productid replace person.
if you want predicted value ,use OUTPUT statement.



proc mixed;
class flag date;
model demand=price flag;
random int /subject=person;
repeated date/subject=person type=ar(1) ;
OUTPUT out=want pred=p ;
run;


hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1868 views
  • 0 likes
  • 2 in conversation