楼主: rantao
3231 3

[编程问题求助] 指数模型MLE估计的编程问题 [推广有奖]

  • 0关注
  • 0粉丝

本科生

45%

还不是VIP/贵宾

-

威望
0
论坛币
49 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
1130 点
帖子
32
精华
0
在线时间
150 小时
注册时间
2008-8-4
最后登录
2020-5-28

楼主
rantao 发表于 2014-3-17 22:58:11 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
类似这样的一个模型:y=exp(b0+b1x1+b2x2+b3x3)+e
e是标准正态分布。已有数据。
现在要用MLE估计参数。

试图用下面这串语句来解决:

program expmle
args lnf xb
qui gen double `res'=$ML_y1 - exp(`xb')
qui replace `lnf' = log(normalden(`res')
end
ml model lf expmle (y = x1 x2 x3)
ml maximize


结果提示too few variables specified。

想请教一下,是不是xb那里的变量有问题。因为我对stata的语句不熟悉,不知道怎么才能让它正常运行,求巨巨们指导啊。

二维码

扫码加我 拉你入群

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

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

关键词:MLE specified Variables normalden Maximize 模型

沙发
jjjj6666 发表于 2014-3-18 01:43:48
try this one:

cap prog drop expmle
program expmle
args lnf xb sigma
qui replace `lnf' = ln(normalden($ML_y1,exp(`xb'), `sigma'))
end

ml model lf expmle (y = x1 x2 x3) /sigma
ml maximize

藤椅
rantao 发表于 2014-3-18 09:47:32 来自手机
jjjj6666 发表于 2014-3-18 01:43
try this one:

cap prog drop expmle
Thx. But sigma is already known as 1. Why should to estimate it? Would u explain the idea plz?

板凳
jjjj6666 发表于 2014-3-18 20:59:38
sigma is known, but the data is sampled from the distribution, so should have sampling error by treating it as an estimate also.

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

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