全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
15783 18
2012-06-07
请教高人如何具体在R中利用quantreg 及Koenker的rq.fit.panel.R作面板分位数回归?  我有七年面板資料, 13个解释変量. 自己实在弄不出结果, 在此虛心向各位讨教. rq.fit.panel(X,y,s)中到底如何设定X, y, s, m, n? 操作程序如何编写? 万分感谢!!
二维码

扫码加我 拉你入群

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

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

全部回复
2012-6-7 14:50:37
文档里面有一个例子,已经说明很清楚了。
二维码

扫码加我 拉你入群

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

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

2012-6-7 15:30:03
抱歉, 本人初學, 实在不解, 可否麻烦详細解释一下? 特別是rq.fit.panel(X,y,s)中到底如何设定X, y, s, m, n?
二维码

扫码加我 拉你入群

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

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

2012-6-7 16:24:48
Test examples:
m <- 3
n <- 10
s <- rep(1:n,rep(m,n))
x <- exp(rnorm(n*m))
X <- cbind(1,x)
u <- x*rnorm(m*n) + (1-x)*rf(m*n,3,3)
a <- rep(rnorm(n),rep(m,n))
y <- a + u
fit <- rq.fit.panel(X,y,s)


%%%

X is independent variables(including Constant):  the matrix X is assumed to contain an intercept
y is the dependent variable.
m  is the number quantiles being estimated
p is the number of colums of X
n is the number of distinct values of s.



http://www.econ.uiuc.edu/~roger/research/panel/rq.fit.panel.R
二维码

扫码加我 拉你入群

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

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

2012-6-7 17:17:54
再请问这是測試案例还是可以直接套用? 对於变数数量是否有限制? X是变数的Matrix, m是否指的是我的年份数?我是七年資料是否m=7? s 如何給定呢? 指的具体是什么值? 抱歉, 原谅我无知的提问.
二维码

扫码加我 拉你入群

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

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

2012-6-7 18:11:41
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群