I'm running a QLIM analysis to analyze a panel data (shopper x store x time). I need to specify the random effects from two sources: shoppers and stores. I recognize that QLIM does not allow more than one random statement.
I need "shopper_id" and "store_id" to both act as subjects for the random effects. Is there any way to trick QLIM to run the following analysis?
proc qlim data=indata heckit; class shopper_id store_id; model choice = price promotion iv / DISCRETE; model y = price promotion / SELECT(choice=1) ; random Int / type=un subject=shopper_id store_id; run;
Are shoppers hierarchically nested within stores (not one shopper pops up in more than one store)?
In that case, you could try :
subject = shopper_id(store_id);
If not , can't you make a new variable to identify the cross-sectional units (an id for every unique shopper*store combination)?
Like here :
data _null_; separator='%%$%%'; shopper_id='The Olympic '; store_id =' Arts Festival '; shopXstore_ID=catx(separator, shopper_id, store_id); put shopXstore_ID $char.; run;
Then do :
subject = shopXstore_ID;
Thanks for the ideas. There is no nesting relationship between the two. Creating a cross variable would results in too many combinations (instead of m + n levels, this will create m*n levels), and my data does not have enough degrees of freedom to estimate it (imagine each shopper shops at each store at most once).
, but these will not help you out.
Following support note will not help you out either , but it's a nice read :
Usage Note 67037: Estimating limited and discrete dependent variable models with random parameters or random effects using PROC QLIM
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.