请选择 进入手机版 | 继续访问电脑版
楼主: xuelida
70086 163

[实际应用] [原创]gauss软件相关资源和学习资料,见跟贴   [推广有奖]

xuelida 在职认证  发表于 2007-11-6 09:34:00 |显示全部楼层 |坛友微信交流群

gauss讲解1-----DF的ols回归

/* 误差项为独立同分布正态,DF检验情形1中k和t统计量的分位数及其标准差 */
p={0.01,0.025,0.05,0.1,0.9,0.95,0.975,0.99};/* 分位数*/
n=100000;/* the number of replications is 10000 */
T=100+50;/* 100 observations + 50 presample values */
y0=0;
tau=zeros(n,1);
i=1;
do while i<=n;
   y=zeros(T,1);
   u=rndn(T,1);
   y[1,1]=y0+u[1,1];
   j=2;
   do while j<=T;
      y[j,1]=y[j-1,1]+u[j,1];
      j=j+1;
   endo;
   y1= y[51:t,.]; /*discard the first 50 observations */
   x=y[50:t-1,.];
   xxi=invpd(x'x);
   b=xxi*(x'y1);                               /*系数 */ 
   e=y1-x*b;                                   /*残差*/
   s2=e'*e/(rows(x)-cols(x));           /*误差项方差的ols估计值*/
   sd=sqrt(diag(s2*xxi));               /*系数的标准误差*/
   tau[i,.]=(b-1)./sd;                        /*t统计量 */
   i=i+1;
endo;
ptau=quantile(tau,p);/* 误差项为独立同分布正态,DF检验情形1中t统计量的分位数及其标准差 */
print ptau;

如果需要进行数据的df估计,你就要把自己的数据输入,就是把上述数据生成改成自己的数据就可以估计了

最后把df统计量与相应的分位数进行比较就可以了。

使用道具

xuelida 在职认证  发表于 2007-11-7 20:14:00 |显示全部楼层 |坛友微信交流群

[下载]Gauss statistical, utility, and graphic procedures

Gauss Procedures

This page contains Gauss statistical, utility, and graphic procedures. Some are actively used, but others have not been updated or checked in some time. I'd appreciate if you'd let me know if you find any bugs, have found more efficient or general approaches, or have others to add. Larger packages I've written are available at my statistical software page; code written by others can be found at Gauss resources. You may prefer a zip file containing all the procedures below (last update: 8/20/2005), or see below to receive automatic notification of updates of this page.

Statistics

Utilities

  • bin2dec, dec2bin, [un]compress large binary matrices into a small decimal vectors

  • delifAll, selifAll, trimAll, vputAll, delif, selif, trimr, or vput for vectors of variables

  • exist, Does file exist on disk?

  • ICPSR, change ICPSR to alphabetical state codes

  • in, Tests whether one set is contained in another

  • invRV, recode infinities

  • ismissM, MKmissM, element-by-element matrix version of ismiss and miss

  • loadA, loadVars load ascii file into matrix or variables

  • makeFac, makeFacN, creates factorial or labeled factorial designs

  • mat2str, str2mat matrix to string and back

  • missR, finds missing values in set of variables

  • prtV, nicely print set of variables

  • rndInx, randomly permute rows of a set of variables

  • scalOne, scalZero, check for scalar one or zero

  • seqaS, seqaSE creates vector of evenly spaced points without or with end points

  • strStrip, strip and format a string

  • subdat, subdatV loads submatrix of dataset into matrix or variables

  • token2, more flexible string parser, faster for larger strings

  • Vin, checks if variable is in a data buffer

  • vreadAll, dumps data buffer to memory in stored variable names

  • vrename, rename element in data buffer

Graphics

  • graphGK, reset GK's graphic globals

  • graphOn, graphic windows commands for unix

  • pLine, pLineS, easily add lines to graph

  • pSym, easily add symbol to graph

  • pText, xy with labeled points

  • ternary, plot ternary diagram

  • triple, triple scatter plot (x, y, size of circle)

171529.zip (85.01 KB) 本附件包括:
  • bin2dec.g
  • cdfnorm.g
  • cmeanc.g
  • cmeanwc.g
  • coxcc.g
  • coxccq.g
  • dec2bin.g
  • delifall.g
  • dens.g
  • exist.g
  • fisherz.g
  • fisherzi.g
  • gec.g
  • graphgk.g
  • graphon.g
  • hyperg.g
  • icpsr.g
  • infrv.g
  • in.g
  • ismissm.g
  • lcdfnormi.g
  • lnpdfmn.g
  • lnpdfmt.g
  • loada.g
  • loadvars.g
  • logit.g
  • logiti.g
  • lpdfnorm.g
  • makefac.g
  • makefacn.g
  • mat2str.g
  • meanse.g
  • meanwc.g
  • missr.g
  • mkmissm.g
  • mlogit.g
  • mlogiti.g
  • pdfnorm.g
  • pline.g
  • plines.g
  • prtv.g
  • psym.g
  • ptext.g
  • reg.g
  • regrand.g
  • regr.g
  • regv.g
  • regvr.g
  • relogit.g
  • relogitp.g
  • relogitq.g
  • rndchi.g
  • rndinx.g
  • rndmn.g
  • rndmt.g
  • rndsmpl2.g
  • rndsmpl.g
  • scalone.g
  • scalzero.g
  • sechol.g
  • selifall.g
  • seqase.g
  • seqas.g
  • str2mat.g
  • strstrip.g
  • subdat.g
  • subdatv.g
  • ternary.g
  • token2.g
  • trimall.g
  • triple.g
  • vin.g
  • vputall.g
  • vreadall.g
  • vrename.g
  • probs.src
  • truncbeta.src
  • truncnorm.src
  • fmtt.g
  • counterf.zip

[此贴子已经被作者于2007-11-7 20:15:13编辑过]

使用道具

michaeljija 发表于 2007-11-9 13:16:00 |显示全部楼层 |坛友微信交流群
请问可否提供coint 2.0 for Gauss 此程序. 谢谢

使用道具

xuelida 在职认证  发表于 2007-11-9 22:53:00 |显示全部楼层 |坛友微信交流群
这个在网上有,属于重复上传

使用道具

michaeljija 发表于 2007-11-12 21:40:00 |显示全部楼层 |坛友微信交流群

1.谢谢指点.已找到Coint
2.
请教如何编辑Gaussdata set,s.dat(副档名为dat),
 
再者,如何将其转档为s.txt 文件.
3.感谢您在此提出如此多有用的信息,我天天都有上网拜读.,谢谢!

使用道具

xuelida 在职认证  发表于 2007-11-12 23:59:00 |显示全部楼层 |坛友微信交流群

直接打开新的gauss界面,把数据输入存为s.txt或s.dat就可以了

使用道具

糊涂虫 发表于 2007-11-13 00:42:00 |显示全部楼层 |坛友微信交流群

刚开始学习gauss啊,怎么例如:a=1;b=2 c=a+b, print c,没反映呢 ,软件的问题吗?

另外坛子里面down 的6.0解压缩之后怎么在input-output 界面打不上字呢?哪个版本好用一点啊,谢谢

使用道具

michaeljija 发表于 2007-11-13 16:06:00 |显示全部楼层 |坛友微信交流群

重新开一个new file, 输入command即可执行.

使用道具

michaeljija 发表于 2007-11-13 16:14:00 |显示全部楼层 |坛友微信交流群

a =1

b =2

c= a + b

print "c = " c

註:每次指令结束须加

使用道具

xuelida 在职认证  发表于 2007-11-13 17:34:00 |显示全部楼层 |坛友微信交流群
gauss7.0比较不错,8.0也可以,我现在就是用gauss7.0

使用道具

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

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-18 08:08