<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Estimating a VAR model with panel data in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Estimating-a-VAR-model-with-panel-data/m-p/336665#M2166</link>
    <description>&lt;P&gt;I am not particularly familiar with models where&lt;BR /&gt;contemporaneous response values appear on the RHS.&amp;nbsp; In any event,&lt;BR /&gt;I am going to suggest an alternate model that might capture many&lt;BR /&gt;aspects of your problem description while still remaining parsimonious.&lt;BR /&gt;Suppose (i,j)th buyer/seller pair denotes a panel.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Model:&lt;/P&gt;
&lt;P&gt;B_it = mu_bi + mu_t[1] + X_t beta_1 + e_it&lt;BR /&gt;S_jt = mu_sj + mu_t[2] + W_t beta_2 + e_jt&lt;/P&gt;
&lt;P&gt;Explanation:&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; B_it and S_jt denote the i-th buyer and the j-th seller response &lt;BR /&gt;values at time t. &lt;BR /&gt;2.&amp;nbsp; mu_bi and mu_sj denote the intercept terms &lt;BR /&gt;for i-th buyer and j-th seller (fixed effects),&lt;BR /&gt;3. mu_t is a bivariate time trend such as random walk (taken&lt;BR /&gt;to be a random effect term) that is common to all the panels,&lt;BR /&gt;4. X_t and W_t are regression variables (there might be overlap but their&lt;BR /&gt;coefficients will be different for B and S), &lt;BR /&gt;5. e_it and e_jt are independent white noise terms.&lt;/P&gt;
&lt;P&gt;This model could be thought of as a bivariate version of panel model&lt;BR /&gt;that has fixed panel effects and random time effects.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am providing sample code for fitting this model with the SSM procedure.&lt;/P&gt;
&lt;P&gt;See the SSM procedure in SAS/ETS documentation for more information about this procedure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For simplicity of descripton suppose that:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; there are 100 buyers and 50 sellers,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; X variables are X1 to X5&lt;BR /&gt;&amp;nbsp;&amp;nbsp; W variables are W1 to W8&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Suppose the input data set, say test, has the following:&lt;BR /&gt;1.&amp;nbsp; the observations are indexed by a time index (say date) and test is sorted &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by the time index.&lt;BR /&gt;2.&amp;nbsp; the time index are equispaced (such as monthly, daily, etc).&lt;BR /&gt;3.&amp;nbsp; there can be multiple observations, say n_t, at a time index t. n_t need not be&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; the same for all t (i.e., panels can be unbalanced)&lt;BR /&gt;4.&amp;nbsp; the input data set already has the necessary intercept dummies:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mu_b1 to mu_b100 are the buyer dummies: mu_bi = (buyer = i);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mu_s1 to mu_b50 are the seller dummies: mu_sj = (seller = j);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc ssm data=test;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; id date &amp;lt; interval=day &amp;gt;;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; state timeEffect(2) t(I) cov(g) cov1(d);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; comp bTime = timeEffect[1]; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; comp sTime = timeEffect[2]; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; irregular wb;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; irregular ws;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; model B = mu_b1-mu_b100 x1-x5 bTime wb;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; model S = mu_s1-mu_s50 w1-w8 sTime ws;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; output out=for press;&lt;BR /&gt;run;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt; &lt;BR /&gt;One can consider many other variations of this model, including your model with&amp;nbsp;lagged response&lt;BR /&gt;values.&amp;nbsp; However, PROC SSM is not very scalable for&amp;nbsp; such models when &lt;BR /&gt;there are so many (thousands according to you) panels.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2017 17:52:16 GMT</pubDate>
    <dc:creator>rselukar</dc:creator>
    <dc:date>2017-02-28T17:52:16Z</dc:date>
    <item>
      <title>Estimating a VAR model with panel data</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Estimating-a-VAR-model-with-panel-data/m-p/334803#M2161</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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&amp;nbsp;and seller j. I observe&amp;nbsp;B&lt;FONT size="-1"&gt;&lt;SUB&gt;i,t&lt;/SUB&gt;&lt;/FONT&gt;&amp;nbsp;from the buyer and&amp;nbsp;S&lt;FONT size="-1"&gt;&lt;SUB&gt;j,t&lt;/SUB&gt;&lt;/FONT&gt;&amp;nbsp;from the seller for t = 1, 2, ..., T.&amp;nbsp;These two variables are simultaneously determined and hence are endogeneous. For this particular dyad, I can specify a VAR model as follows:&lt;/P&gt;
&lt;DIV style="margin-top: 0px; margin-bottom: 0px;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="margin-top: 0px; margin-bottom: 0px;"&gt;B&lt;FONT size="-1"&gt;&lt;SUB&gt;i,t&lt;/SUB&gt;&lt;/FONT&gt; = S&lt;FONT size="-1"&gt;&lt;SUB&gt;j,t&lt;/SUB&gt;&lt;/FONT&gt; + S&lt;FONT size="-1"&gt;&lt;SUB&gt;j,t-1&lt;/SUB&gt;&lt;/FONT&gt; + B&lt;FONT size="-1"&gt;&lt;SUB&gt;i,t-1&lt;/SUB&gt;&lt;/FONT&gt; + X&lt;FONT size="-1"&gt;&lt;SUB&gt;t&lt;/SUB&gt;&lt;/FONT&gt; + u&lt;/DIV&gt;
&lt;DIV style="margin-top: 0px; margin-bottom: 0px;"&gt;S&lt;FONT size="-1"&gt;&lt;SUB&gt;j,t&lt;/SUB&gt;&lt;/FONT&gt; = B&lt;FONT size="-1"&gt;&lt;SUB&gt;i,t&lt;/SUB&gt;&lt;/FONT&gt; + S&lt;FONT size="-1"&gt;&lt;SUB&gt;j,t-1&lt;/SUB&gt;&lt;/FONT&gt; + B&lt;FONT size="-1"&gt;&lt;SUB&gt;i,t-1&lt;/SUB&gt;&lt;/FONT&gt; + W&lt;FONT size="-1"&gt;&lt;SUB&gt;t&lt;/SUB&gt;&lt;/FONT&gt; + v&lt;/DIV&gt;
&lt;DIV style="margin-top: 0px; margin-bottom: 0px;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="margin-top: 0px; margin-bottom: 0px;"&gt;However, I cannot estimate each dyad on its own since I have short time series&amp;nbsp;(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:&lt;/DIV&gt;
&lt;DIV style="margin-top: 0px; margin-bottom: 0px;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="margin-top: 0px; margin-bottom: 0px;"&gt;(1) Is my current approach appropriate in terms of unbiasedness and efficiency of the estimates?&lt;/DIV&gt;
&lt;DIV style="margin-top: 0px; margin-bottom: 0px;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="margin-top: 0px; margin-bottom: 0px;"&gt;(2) Could I use PROC VARMAX with this type of a panel data set?&lt;/DIV&gt;
&lt;DIV style="margin-top: 0px; margin-bottom: 0px;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="margin-top: 0px; margin-bottom: 0px;"&gt;Any suggestions will be greatly appreciated.&lt;/DIV&gt;
&lt;DIV style="margin-top: 0px; margin-bottom: 0px;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="margin-top: 0px; margin-bottom: 0px;"&gt;Sincerely,&lt;/DIV&gt;
&lt;DIV style="margin-top: 0px; margin-bottom: 0px;"&gt;Cuneyt&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 Feb 2017 22:58:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Estimating-a-VAR-model-with-panel-data/m-p/334803#M2161</guid>
      <dc:creator>Cuneyt</dc:creator>
      <dc:date>2017-02-21T22:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Estimating a VAR model with panel data</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Estimating-a-VAR-model-with-panel-data/m-p/336665#M2166</link>
      <description>&lt;P&gt;I am not particularly familiar with models where&lt;BR /&gt;contemporaneous response values appear on the RHS.&amp;nbsp; In any event,&lt;BR /&gt;I am going to suggest an alternate model that might capture many&lt;BR /&gt;aspects of your problem description while still remaining parsimonious.&lt;BR /&gt;Suppose (i,j)th buyer/seller pair denotes a panel.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Model:&lt;/P&gt;
&lt;P&gt;B_it = mu_bi + mu_t[1] + X_t beta_1 + e_it&lt;BR /&gt;S_jt = mu_sj + mu_t[2] + W_t beta_2 + e_jt&lt;/P&gt;
&lt;P&gt;Explanation:&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; B_it and S_jt denote the i-th buyer and the j-th seller response &lt;BR /&gt;values at time t. &lt;BR /&gt;2.&amp;nbsp; mu_bi and mu_sj denote the intercept terms &lt;BR /&gt;for i-th buyer and j-th seller (fixed effects),&lt;BR /&gt;3. mu_t is a bivariate time trend such as random walk (taken&lt;BR /&gt;to be a random effect term) that is common to all the panels,&lt;BR /&gt;4. X_t and W_t are regression variables (there might be overlap but their&lt;BR /&gt;coefficients will be different for B and S), &lt;BR /&gt;5. e_it and e_jt are independent white noise terms.&lt;/P&gt;
&lt;P&gt;This model could be thought of as a bivariate version of panel model&lt;BR /&gt;that has fixed panel effects and random time effects.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am providing sample code for fitting this model with the SSM procedure.&lt;/P&gt;
&lt;P&gt;See the SSM procedure in SAS/ETS documentation for more information about this procedure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For simplicity of descripton suppose that:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; there are 100 buyers and 50 sellers,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; X variables are X1 to X5&lt;BR /&gt;&amp;nbsp;&amp;nbsp; W variables are W1 to W8&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Suppose the input data set, say test, has the following:&lt;BR /&gt;1.&amp;nbsp; the observations are indexed by a time index (say date) and test is sorted &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by the time index.&lt;BR /&gt;2.&amp;nbsp; the time index are equispaced (such as monthly, daily, etc).&lt;BR /&gt;3.&amp;nbsp; there can be multiple observations, say n_t, at a time index t. n_t need not be&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; the same for all t (i.e., panels can be unbalanced)&lt;BR /&gt;4.&amp;nbsp; the input data set already has the necessary intercept dummies:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mu_b1 to mu_b100 are the buyer dummies: mu_bi = (buyer = i);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mu_s1 to mu_b50 are the seller dummies: mu_sj = (seller = j);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc ssm data=test;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; id date &amp;lt; interval=day &amp;gt;;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; state timeEffect(2) t(I) cov(g) cov1(d);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; comp bTime = timeEffect[1]; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; comp sTime = timeEffect[2]; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; irregular wb;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; irregular ws;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; model B = mu_b1-mu_b100 x1-x5 bTime wb;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; model S = mu_s1-mu_s50 w1-w8 sTime ws;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; output out=for press;&lt;BR /&gt;run;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt; &lt;BR /&gt;One can consider many other variations of this model, including your model with&amp;nbsp;lagged response&lt;BR /&gt;values.&amp;nbsp; However, PROC SSM is not very scalable for&amp;nbsp; such models when &lt;BR /&gt;there are so many (thousands according to you) panels.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 17:52:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Estimating-a-VAR-model-with-panel-data/m-p/336665#M2166</guid>
      <dc:creator>rselukar</dc:creator>
      <dc:date>2017-02-28T17:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Estimating a VAR model with panel data</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Estimating-a-VAR-model-with-panel-data/m-p/336722#M2169</link>
      <description>&lt;P&gt;Dear rselukar,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sincerely,&lt;/P&gt;
&lt;P&gt;Cuneyt&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 20:44:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Estimating-a-VAR-model-with-panel-data/m-p/336722#M2169</guid>
      <dc:creator>Cuneyt</dc:creator>
      <dc:date>2017-02-28T20:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Estimating a VAR model with panel data</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Estimating-a-VAR-model-with-panel-data/m-p/336734#M2170</link>
      <description>&lt;P&gt;I understand.&amp;nbsp; Models that include&amp;nbsp;terms&amp;nbsp;signifying association between&amp;nbsp;the i-th&amp;nbsp;buyer&amp;nbsp;and j-th seller&amp;nbsp;for each (i,j) pair become quite large.&amp;nbsp; At the moment SSM will not scale for such problems.&amp;nbsp; If the number of such pairs is small, say less than 50, then it might be feasible.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 21:11:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Estimating-a-VAR-model-with-panel-data/m-p/336734#M2170</guid>
      <dc:creator>rselukar</dc:creator>
      <dc:date>2017-02-28T21:11:29Z</dc:date>
    </item>
  </channel>
</rss>

