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;
Hello,
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;
BR,
Koen
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).
Hello,
I looked
, 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
https://support.sas.com/kb/67/037.html
Koen
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.