全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Gauss专版
2001 4
2012-04-18
如何画散点图?...
二维码

扫码加我 拉你入群

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

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

全部回复
2012-4-22 15:08:40
xy(x,y) 二维图(散点或曲线)
参看help
二维码

扫码加我 拉你入群

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

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

2012-4-22 16:03:36
xuelida 发表于 2012-4-22 15:08
xy(x,y) 二维图(散点或曲线)
参看help
您确定xy(x,y)能画散点图么?您确定这个命令除了画曲线也能画散点图?能不能给我们举个例子?
我们要是能在help文档里找到也不会到这里问您是吧
二维码

扫码加我 拉你入群

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

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

2012-4-22 17:05:46

这个和eviews里不一样,看_pltype
_pltype = { 1, 2, 6, 6 }; /* dashed, dotted, */
/* solid lines */
二维码

扫码加我 拉你入群

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

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

2012-4-23 17:36:01
new;cls;
library pgraph;
graphset;
print "Simulating Data for a Cobb-Douglas Production Function:y = K^a L^b V";
print "                        V = noise term, where V = exp(e), and e ~ N(0, sigma2).";
print "NOTE:         V has a Log-Normal Distribution with E[V]=exp(sigma2/2), and";
print "                var(V) = exp(2*sigma2) - exp(sigma2).";

a = 0.25;
b = 0.75;
sigma2 = 0.25;

/*  Generate the capital and labor inputs  */
K = 2 .* rndu(30,1);
L = 2 .* rndu(30,1);

/*        Form the production signal and noise components  */
ysig = K^a .* L^b;
v = exp(sqrt(sigma2)*rndn(30,1));
y = ysig .* v;


/*        Compute the sample averages and form the conditional production levels  */
AvgK = meanc(K);
AvgL = meanc(L);
ysigK = K^a .* AvgL^b;
ysigL = AvgK^a .* L^b;

/*        Form the input sequences and the production surface  */
SeqK = seqa(0.025,0.025,79)';
SeqL = seqa(0.025,0.025,79);
ySurf = SeqK^a .* SeqL^b;

plotdata:
_paxht = 0.25;
_ptitlht = 0.2;
_pcolor = {2 4};
_pypmax = 3;
_pzclr = {1, 9, 4, 12,  2, 10, 14};
let _plctrl = -1;

_plegctl = {2 5 1.1 4.7};
_plegstr = "Median function\000Noisy observations";
title("Cobb-Douglas Production Data (Labor fixed)");
xlabel("Capital (K)");
ylabel("Quantity Produced (Y)");
xy(K~K,ysigK~y);
waitc;
        title("Cobb-Douglas Production Data (Capital fixed)");
        xlabel("Labor (L)");
        xy(L~L,ysigL~y);
        _plegctl = 0;
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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