楼主: ReneeBK
1417 1

[精彩WinBUGS答问]Unbalanced panel and multidimensional array in Winbugs [推广有奖]

  • 1关注
  • 62粉丝

VIP

已卖:4900份资源

学术权威

14%

还不是VIP/贵宾

-

TA的文库  其他...

R资源总汇

Panel Data Analysis

Experimental Design

威望
1
论坛币
49655 个
通用积分
55.9937
学术水平
370 点
热心指数
273 点
信用等级
335 点
经验
57805 点
帖子
4005
精华
21
在线时间
582 小时
注册时间
2005-5-8
最后登录
2023-11-26

楼主
ReneeBK 发表于 2014-6-17 06:49:48 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

I have a model for input demand, with unbalanced data. The dependent variable is yijt, where i means input of production function (i=1,2,3), j means firm (j=1,..,21), and t means time (ti=1,..,Ti). So, because the panel is unbalanced, with three equations, what could be the correct format to use it in winbugs? I tried to use it in shape of STATA long format, 3*107, where indexes ar a bit different. Row (i) means an input and colums (j) form a panel i*t. So, no explicit time index. I used nested indexing for columns, to form data as a panel. Little piece of code: `for (i in 1:3){ for(j in 1:107){ log(mu[i,j]) <- a+ u[firm[j]]+...

where a is an input-specific free parameter, u is an desired firm-specific error component, which should be estimated over firms (21). For this I use nested indexing, where expression of u in the model is over columns u[firm[j]] and prior for u is over firms u[k]. Here is the question about nested indexing. If the model includes many covariates, which are also time-dependent, should I use nested indexing for all of these covariates, otherwise Winbugs does not take it as a panel? I tried to use a multidimensional array for all multidimensional variables. For balancing a lot of NA-s were included. For example, dependent variable yijt is an 3-dimensional array y[ , , ], (using list command), but in some reason Winbugs didn`t recognize NA-s? Main point is that posterior distribution does not converge, and data formatting could be one of the reasons

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Dimensional unbalanced unbalance dimension Balanced different function because correct demand

沙发
ReneeBK 发表于 2014-6-17 06:50:25

  • WINBUGS is an MCMC based Bayesian analysis package which is the result of many years of development by a team of statisticians and programmers at the Medical Research Council Biostatistics Research Unit in Cambridge. Models are represented by a flexible language, and there is also a graphical feature, DOODLEBUGS, that allows users to specify their model in terms of a directed graph. WINBUGS is distributed freely and this review is based upon the beta release of WINBUGS 1.4 which has several enhancements over version 1.3. WINBUGS review (PDF, 0.4 mb) by Harvey Goldstein


  • You are probably better off to keep the data in a long format (with columns for y, i, j and t) and rows for each response (which will have NA for y where you have missing data).

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-23 21:19