楼主: nmgjgfh
7225 11

[面板数据求助] 面板分位数回归模型stata运行时出错,显示R的路径错误,还是64位 [推广有奖]

  • 1关注
  • 1粉丝

高中生

57%

还不是VIP/贵宾

-

威望
0
论坛币
761 个
通用积分
1.0000
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
162 点
帖子
18
精华
0
在线时间
38 小时
注册时间
2017-2-17
最后登录
2019-4-23

楼主
nmgjgfh 发表于 2019-3-12 10:38:30 |AI写论文
100论坛币
1.use "D:\软件安装\stata15\muqu.dta"


2.xtset id year
panel variable:  id (strongly balanced)
        time variable:  year, 2001 to 2017
                delta:  1 unit


3. help(xtqreg)

4.global Rterm_path "C:\Program Files\R\R-3.1.3\bin\i386\Rterm.exe"

5.xtqreg e a1 a2

Please check if the R.exe directory is C:\Program Files\R\R-3.1.3\bin\i386\Rter
> m.exe and R version is 3.1.3
If the directory is not correct use option pathr.
If only the version is not correct use option version.
If both the directory and the version are correct,
something went wrong during the run of the R script.
r(198);


以上是一些代码,和相应的运行结果,最后显示的版本和路径错误,检查了确实没有,难道是R自身的错误吗 ?请教高手应该如何操作,急急急!

关键词:软件安装 运行结果

沙发
黃河泉 在职认证  发表于 2019-3-12 10:48:52
请直接 ssc install xtqreg。

藤椅
黃河泉 在职认证  发表于 2019-3-12 10:49:34
在今年暑假,我”预计”于长沙 (7 月中左右) 与上海 (8 月中左右)  (都用 Stata) 各办一场当代最新与实用计量讲习会 (会包括 panel threshold/quantile 之分析),敬请拭目以待。

板凳
nmgjgfh 发表于 2019-3-12 11:55:28
黃河泉 发表于 2019-3-12 10:48
请直接 ssc install xtqreg。
谢谢您的回答,
又重新安装了路径,发现R 的路径是"C:\Program Files\R\R-3.1.3\bin\i386\Rgui.exe",
设置路径以后运行 ssc install xtqreg
运行结果显示的是
checking xtqreg consistency and verifying not already installed...

the following files already exist and are different:
    c:\ado\plus\x\xtqreg.ado
    c:\ado\plus\x\xtqreg.sthlp

no files installed or copied
(no action taken)
r(602);

这是因为没有安装包还是安装包混了……

报纸
nmgjgfh 发表于 2019-3-12 11:55:56
黃河泉 发表于 2019-3-12 10:48
请直接 ssc install xtqreg。
谢谢您的回答,
又重新安装了路径,发现R 的路径是"C:\Program Files\R\R-3.1.3\bin\i386\Rgui.exe",
设置路径以后运行 ssc install xtqreg
运行结果显示的是
checking xtqreg consistency and verifying not already installed...

the following files already exist and are different:
    c:\ado\plus\x\xtqreg.ado
    c:\ado\plus\x\xtqreg.sthlp

no files installed or copied
(no action taken)
r(602);

这是因为没有安装包还是安装包混了……

地板
nmgjgfh 发表于 2019-3-12 13:14:34
又修改了下,弹出了R窗口,输入library(quantreg)之后,R停止工作了 ,我的电脑是32位。运行library(quantreg)难道需要64位吗

7
蓝色 发表于 2019-3-12 14:11:16

我的R是在D盘,也是32位的
命令和你的是一样的
可以运行

  1. . global Rterm_path "D:\Program Files\R\R-3.2.3\bin\i386\Rterm.exe"

  2. .  
  3. . use http://www.imm.ki.se/biostatistics/data/wtloss, clear

  4. . reshape long y, i(id) j(month)
  5. (note: j = 0 3 6 9)

  6. Data                               wide   ->   long
  7. -----------------------------------------------------------------------------
  8. Number of obs.                       60   ->     240
  9. Number of variables                   6   ->       4
  10. j variable (4 values)                     ->   month
  11. xij variables:
  12.                            y0 y3 ... y9   ->   y
  13. -----------------------------------------------------------------------------

  14. . gen inter = month*prog

  15. . xtset id month
  16.        panel variable:  id (strongly balanced)
  17.         time variable:  month, 0 to 9, but with gaps
  18.                 delta:  1 unit

  19. .
  20. . xtqreg y prog month inter

  21. Mixed-effects Quantile regression                   No. of obs    =        240
  22. Optimization: Gradient-Search                       No. of groups =         60
  23. Group variable: id                               No. of bootstrap =         20
  24. Covariance random-effects: Independent
  25. ------------------------------------------------------------------------------
  26.              |              Bootstrap
  27.            y |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
  28. -------------+----------------------------------------------------------------
  29. q50          |
  30.         prog |  -2.148033   5.012096    -0.43   0.668    -11.97156    7.675494
  31.        month |  -3.475661   .3663607    -9.49   0.000    -4.193715   -2.757607
  32.        inter |  -4.374331   .3797293   -11.52   0.000    -5.118587   -3.630075
  33.        _cons |    244.498   3.687177    66.31   0.000     237.2712    251.7247
  34. ------------------------------------------------------------------------------
  35. Random-effects Parameters
  36. ------------------------------------------------------------------------------
  37.              |              Bootstrap
  38.            y |   Estimate   Std. Err.      z    P>|z|     [95% Conf. Interval]
  39. -------------+----------------------------------------------------------------
  40. q50          |
  41.        _cons |   211.8596   1.140575   185.75   0.000     209.6241    214.0951
  42. ------------------------------------------------------------------------------
复制代码


8
nmgjgfh 发表于 2019-3-13 12:19:24
蓝色 发表于 2019-3-12 14:11
我的R是在D盘,也是32位的
命令和你的是一样的
可以运行
谢谢您的回答,很有帮助。发现您的路径最后是Rterm.exe,而我的R安装路径是最后是Rgui.exe。又重新下载安装了R3.1.3,复制桌面快捷方式的路径发现还是Rgui.exe……是我的下载方式不对还是安装方式不对,或者需要对Rterm做些什么操作

9
蓝色 发表于 2019-3-13 12:23:57
nmgjgfh 发表于 2019-3-13 12:19
谢谢您的回答,很有帮助。发现您的路径最后是Rterm.exe,而我的R安装路径是最后是Rgui.exe。又重新下载安 ...
这就是帮助里面写的呀 xtqreg.png

10
nmgjgfh 发表于 2019-3-13 12:33:20
是啊,帮助里使用的Rterm.exe
1."C:\Program Files\Stata15\R-3.1.3\bin\i386\Rgui.exe"  这是桌面R快捷方式的路径,最后是Rgui.exe
2.Please check if the R.exe directory is C:\Program Files\Stata15\R-3.1.3\bin\i386\Rterm.exe and R version is 3.1.3这是stata提示的错误,发现电脑没有调用Rterm,是调用了Rgui.exe。这……

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-21 12:29