全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
2179 7
2023-07-31

想问问大家 这个为什么会出现r(198)的错误?应该怎么修改呀?求助
forvalue i=1(1)9{
  2. egen 1`i'=sum(p`i'*ln(p`i'))
  3. gen e`i'=-1`i'/ln(93)
  4. gen d`i'=1-e`i'
  5. }
11 invalid name
r(198);


二维码

扫码加我 拉你入群

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

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

全部回复
2023-7-31 14:35:21
变量名不能是数字开头
二维码

扫码加我 拉你入群

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

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

2023-8-11 17:26:48
  error . . . . . . . . . . . . . . . . . . . . . . . .  Return code 198
        invalid syntax
        option __________ incorrectly specified
        option __________ not allowed
        __________ invalid
        range invalid
        __________ invalid obs no
        invalid filename
        __________ invalid varname
        __________ invalid name
        multiple by's not allowed
        __________ found where number expected
        on or off required
        All items in this list indicate invalid syntax.  These errors
        are often, but not always, due to typographical errors.  Stata
        attempts to provide you with as much information as it can.
        Review the syntax diagram for the designated command.
         
        In giving the message "invalid syntax", Stata is not helpful.
        Errors in specifying expressions often result in this message.

二维码

扫码加我 拉你入群

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

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

2023-8-24 18:12:53
tgauss 发表于 2023-7-31 14:35
变量名不能是数字开头
我这个也不是数字开头,咋也不行哇 image20230824181253.jpg
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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