想编辑一个小程序拟合lnrrq与lnP之间的关系,前者是左手变量,后者是右手变量,程序为:
========
program nlces
syntax varlist(min=2 max=2) [aw fw iw] if, at(name)
local lnrrq:word 1 of 'varlist'
local lnP:word 2 of 'varlist'
tempname b0 rho
scalar 'b0'='at'[1,10]
scalar 'rho'='at'[-3,10]
replace 'lnrrq'='b0'+'rho'*lnP 'if
end
============
运行:nl ces: lnrrq lnP
我是直接把程序copy到stata中,然后再运行,是否正确?应该如何运行程序?
此外 输出结果显示错误:
“nlces returned 198
verify that nlces is a substitutable expression program
and that you have specified all options that it requires”
是什么意思呀??(我的数据是非平衡面板数据)
请高人指点下,谢谢