全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Gauss专版
7280 21
2012-10-31
最近刚开始学习GAUSS软件,这个软件真的很难入门,找了个编好的程序运行,发现在运行程序时,运行到#include  c:gauss/garthr3/str2;时总是提示(0) : error G0008 : '#include c:\gauss\garthr3\cst2' : Syntax error ;正在运行的程序中又需要使用cst2这个程序,为什么会出错呢?还有optset在gauss软件中有什么用,我用的gauss9没有这个东西呢?随时等候大家指导。
二维码

扫码加我 拉你入群

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

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

全部回复
2012-11-4 21:10:10
#include 用法很简单
譬如jagmnl1.prg需要用到ghmnl.src,seldata.src两个文件
就在jagmnl1.prg
加入
  #include seldata.src;
   #include ghmnl.src;


文件可在底下网站下载
  http://cameron.econ.ucdavis.edu/gauss/gauss.html
执行jagmnl1.prg需要
  jagmnl1.prg
   ghmnl.src
   seldata.src
   jaggia.asc
   maxlik.lcg
将以上五个文件,放在同一个文件夹.
二维码

扫码加我 拉你入群

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

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

2012-11-5 20:51:20
epoh 发表于 2012-11-4 21:10
#include 用法很简单
譬如jagmnl1.prg需要用到ghmnl.src,seldata.src两个文件
就在jagmnl1.prg
(0) : error G0008 : '#include seldata.src' : Syntax error
(0) : error G0008 : '#include ghmnl.src' : Syntax error
在gauss10中运行会提示以上错误,epoh老师您看是什么问题?
二维码

扫码加我 拉你入群

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

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

2012-11-6 10:30:11
zhangtao 发表于 2012-11-5 20:51
(0) : error G0008 : '#include seldata.src' : Syntax error
(0) : error G0008 : '#include ghmnl.sr ...
jagmnl1.rar
大小:(14.56 KB)

 马上下载


设定好Working Directory,然后执行jagmnl1.prg

Date is:

       2012.0000
       11.000000
       6.0000000
       3672966.6



-------------------------------------------------------------------------------
Variable       Mean   Std Dev    Variance   Minimum   Maximum     Valid Missing
-------------------------------------------------------------------------------
DOCNO    82174.4127 2251.78345070528.564378001.000085059.0000       126    0
WEEKS       11.4490    7.7114     59.4661    2.8570   41.4290       126    0
NUMBIDS      1.7381    1.4321      2.0509    0.0000   10.0000       126    0
TAKEOVER     1.0000     -----       -----    1.0000    1.0000       126    0
BIDPREM      1.3468    0.1893      0.0358    0.9427    2.0664       126    0
INSTHOLD     0.2518    0.1856      0.0345    0.0000    0.9040       126    0
SIZE         1.2190    3.0966      9.5891    0.0177   22.1690       126    0
LEGLREST     0.4286    0.4968      0.2469    0.0000    1.0000       126    0
REALREST     0.1825    0.3878      0.1504    0.0000    1.0000       126    0
FINREST      0.1032    0.3054      0.0933    0.0000    1.0000       126    0
REGULATN     0.2698    0.4456      0.1986    0.0000    1.0000       126    0
WHTKNGHT     0.5952    0.4928      0.2429    0.0000    1.0000       126    0
ONE          1.0000     -----       -----    1.0000    1.0000       126    0
SIZESQ      10.9990   59.9148   3589.7819    0.0003  491.4646       126    0
D2NUMBID     0.9286    0.2586      0.0669    0.0000    1.0000       126    0
D3NUMBID     1.3571    0.6127      0.3754    0.0000    2.0000       126    0

BINARY LOGIT MAXIMUM LIKELIHOOD using Maxlik and ghmnl1.src
Dataset                            jaggiatr
Nr of observations                        126.00000
Nr of times data is read                  1.0000000
Nr of obs. read last chew                 126.00000
Dependent variable                         D2NUMBID
Parameters (Variables) names  
             ONE         REALREST          BIDPREM             SIZE


===============================================================================
MAXLIK Version 5.0.9                                     11/06/2012  10:12 am
===============================================================================
                              Data Set:  jaggiatr                              
-------------------------------------------------------------------------------


return code =    0
normal convergence

Mean log-likelihood        0.877838
Number of cases     126

Covariance matrix of the parameters computed by the following method:
QML covariance matrix

Parameters    Estimates     Std. err.  Est./s.e.  Prob.    Gradient
------------------------------------------------------------------
ONE              2.5688        2.7899    0.921   0.3572      0.0000
REALREST        -2.1507        0.7279   -2.955   0.0031      0.0000
BIDPREM          0.3879        2.0280    0.191   0.8483      0.0000
SIZE             0.1938        0.1816    1.067   0.2858      0.0000

Correlation matrix of the parameters
   1.000  -0.230  -0.982  -0.137
  -0.230   1.000   0.116  -0.119
  -0.982   0.116   1.000   0.080
  -0.137  -0.119   0.080   1.000

Number of iterations    6
Minutes to convergence     0.00000
二维码

扫码加我 拉你入群

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

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

2012-11-7 23:54:19
我的问题应该就是出在设定working directory上了,引入程序应该怎样设定工作路径呢?请epoh老师详细说下。不胜感激!
二维码

扫码加我 拉你入群

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

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

2012-11-8 00:03:57
工作路径是: c:\gauss\garthr3\cst2'吗?设定工作路径应该注意什么问题吗?
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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