BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Cuneyt
Obsidian | Level 7

Dear All,

 

I am trying to estimate a VAR model with a panel data set. My data consists of buyer-seller dyads observed over time. For example, consider a buyer-seller dyad (i,j) with buyer i and seller j. I observe Bi,t from the buyer and Sj,t from the seller for t = 1, 2, ..., T. These two variables are simultaneously determined and hence are endogeneous. For this particular dyad, I can specify a VAR model as follows:

 
Bi,t = Sj,t + Sj,t-1 + Bi,t-1 + Xt + u
Sj,t = Bi,t + Sj,t-1 + Bi,t-1 + Wt + v
 
However, I cannot estimate each dyad on its own since I have short time series (small T) with less than 7 observations. But I have thousands of dyads and I would like to take advantage of the panel data structure. Currently, I am using PROC SYSLIN to specify the two simultaneous equations and integrate panel data structure by hand-coding dummy variables. I have two questions:
 
(1) Is my current approach appropriate in terms of unbiasedness and efficiency of the estimates?
 
(2) Could I use PROC VARMAX with this type of a panel data set?
 
Any suggestions will be greatly appreciated.
 
Sincerely,
Cuneyt
1 ACCEPTED SOLUTION

Accepted Solutions
rselukar
SAS Employee

I understand.  Models that include terms signifying association between the i-th buyer and j-th seller for each (i,j) pair become quite large.  At the moment SSM will not scale for such problems.  If the number of such pairs is small, say less than 50, then it might be feasible.

View solution in original post

3 REPLIES 3
rselukar
SAS Employee

I am not particularly familiar with models where
contemporaneous response values appear on the RHS.  In any event,
I am going to suggest an alternate model that might capture many
aspects of your problem description while still remaining parsimonious.
Suppose (i,j)th buyer/seller pair denotes a panel.


Model:

B_it = mu_bi + mu_t[1] + X_t beta_1 + e_it
S_jt = mu_sj + mu_t[2] + W_t beta_2 + e_jt

Explanation:

1.  B_it and S_jt denote the i-th buyer and the j-th seller response
values at time t.
2.  mu_bi and mu_sj denote the intercept terms
for i-th buyer and j-th seller (fixed effects),
3. mu_t is a bivariate time trend such as random walk (taken
to be a random effect term) that is common to all the panels,
4. X_t and W_t are regression variables (there might be overlap but their
coefficients will be different for B and S),
5. e_it and e_jt are independent white noise terms.

This model could be thought of as a bivariate version of panel model
that has fixed panel effects and random time effects.

 

I am providing sample code for fitting this model with the SSM procedure.

See the SSM procedure in SAS/ETS documentation for more information about this procedure.

 

For simplicity of descripton suppose that:
   there are 100 buyers and 50 sellers,
   X variables are X1 to X5
   W variables are W1 to W8


Suppose the input data set, say test, has the following:
1.  the observations are indexed by a time index (say date) and test is sorted
    by the time index.
2.  the time index are equispaced (such as monthly, daily, etc).
3.  there can be multiple observations, say n_t, at a time index t. n_t need not be
    the same for all t (i.e., panels can be unbalanced)
4.  the input data set already has the necessary intercept dummies:
    mu_b1 to mu_b100 are the buyer dummies: mu_bi = (buyer = i);
    mu_s1 to mu_b50 are the seller dummies: mu_sj = (seller = j);

 

 

proc ssm data=test;
   id date < interval=day >;
   state timeEffect(2) t(I) cov(g) cov1(d);
   comp bTime = timeEffect[1];
   comp sTime = timeEffect[2];
  
   irregular wb;
   irregular ws;
  
   model B = mu_b1-mu_b100 x1-x5 bTime wb;
   model S = mu_s1-mu_s50 w1-w8 sTime ws;
   output out=for press;
run;
   

One can consider many other variations of this model, including your model with lagged response
values.  However, PROC SSM is not very scalable for  such models when
there are so many (thousands according to you) panels. 

Cuneyt
Obsidian | Level 7

Dear rselukar,

 

Thanks for your response. However, the model you suggest does not address the simultaneity in my data set. B depends on S, and S depends on B. But I still appreciate your response.

 

Sincerely,

Cuneyt

rselukar
SAS Employee

I understand.  Models that include terms signifying association between the i-th buyer and j-th seller for each (i,j) pair become quite large.  At the moment SSM will not scale for such problems.  If the number of such pairs is small, say less than 50, then it might be feasible.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

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