楼主: zhangwenrui1997
5346 3

[字符问题求助] stata中中括号代表什么意思 [推广有奖]

  • 1关注
  • 0粉丝

硕士生

18%

还不是VIP/贵宾

-

威望
0
论坛币
746 个
通用积分
1.7500
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
1289 点
帖子
4
精华
0
在线时间
289 小时
注册时间
2017-10-19
最后登录
2023-1-31

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
如table rural health marriage[fw=cid1],c(mean wage) format(%9.2f) center中,rural、health、marriage、cid1等均为变量名,其中[fw=cid1]代表什么意思,一般语句中的中括号也可以这么解释吗?

二维码

扫码加我 拉你入群

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

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

关键词:Stata tata Marriage Health format

沙发
jiorio 发表于 2021-3-4 00:04:43 |只看作者 |坛友微信交流群
同问!

使用道具

藤椅
木纸木纸 发表于 2023-7-21 15:12:20 |只看作者 |坛友微信交流群
[fw=cid1]是指当fw=cid1时值为1,否则值为0

使用道具

板凳
蓝色 发表于 2023-7-21 16:10:02 |只看作者 |坛友微信交流群
木纸木纸 发表于 2023-7-21 15:12
[fw=cid1]是指当fw=cid1时值为1,否则值为0
好好看帮助在回答,那个是权重
无标题.png


Title


    [U] 11.1.6 weight -- Weights




Remarks


    Most Stata commands can deal with weighted data.  Stata allows four kinds of weights:


    1.  fweights, or frequency weights, are weights that indicate the number of duplicated
        observations.


    2.  pweights, or sampling weights, are weights that denote the inverse of the probability that
        the observation is included because of the sampling design.


    3.  aweights, or analytic weights, are weights that are inversely proportional to the variance
        of an observation; that is, the variance of the jth observation is assumed to be
        sigma^2/w_j, where w_j are the weights.  Typically, the observations represent averages
        and the weights are the number of elements that gave rise to the average.  For most Stata
        commands, the recorded scale of aweights is irrelevant; Stata internally rescales them to
        sum to N, the number of observations in your data, when it uses them.


    4.  iweights, or importance weights, are weights that indicate the "importance" of the
        observation in some vague sense.  iweights have no formal statistical definition; any
        command that supports iweights will define exactly how they are treated.  Usually, they
        are intended for use by programmers who want to produce a certain computation.


    The general syntax is


            command ... [weightword=exp] ...


    For example:


        . anova y x1 x2 x1*x2 [fweight=pop]


        . regress avgy avgx1 avgx2 [aweight=cellpop]


        . regress y x1 x2 x3 [pweight=1/prob]


        . scatter y x [aweight=y2], mfcolor(none)


    You type the square brackets.


    Stata allows abbreviations: fw for fweight, aw for aweight, and so on.  You could type


        . anova y x1 x2 x1*x2 [fw=pop]


        . regress avgy avgx1 avgx2 [aw=cellpop]


        . regress y x1 x2 x3 [pw=1/prob]


        . scatter y x [aw=y2], mfcolor(none)


    Also, each command has its own idea of the "natural" kind of weight.  If you type


        . regress avgy avgx1 avgx2 [w=cellpop]


    the command will tell you what kind of weight it is assuming and perform the request as if you
    specified that kind of weight.


    There are synonyms for some of the weight types.  fweight can also be referred to as frequency
    (abbreviation freq).  aweight can be referred to as cellsize (abbreviation cell):


        . anova y x1 x2 x1*x2 [freq=pop]


        . regress avgy avgx1 avgx2 [cell=cellpop]


使用道具

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

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

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

GMT+8, 2024-11-5 22:05