楼主: yacqi
18427 4

[数据管理求助] varlist 是什么东西? [推广有奖]

  • 1关注
  • 4粉丝

已卖:179份资源

博士生

18%

还不是VIP/贵宾

-

威望
0
论坛币
575 个
通用积分
2.9322
学术水平
4 点
热心指数
4 点
信用等级
5 点
经验
2426 点
帖子
185
精华
0
在线时间
202 小时
注册时间
2012-4-7
最后登录
2020-12-3

楼主
yacqi 发表于 2012-8-3 22:44:33 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
看书看到这个,看不懂。。。也查不到。。
二维码

扫码加我 拉你入群

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

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

关键词:varlist list ARL IST VaR 东西

沙发
dxystata 发表于 2012-8-4 06:53:15
变量列表
已有 2 人评分经验 论坛币 学术水平 热心指数 信用等级 收起 理由
yacqi + 5 + 2 + 2 + 2 谢谢您,好多年没登录了,看见您的答案很感.
SpencerMeng + 20 观点有启发

总评分: 经验 + 20  论坛币 + 5  学术水平 + 2  热心指数 + 2  信用等级 + 2   查看全部评分

藤椅
windtalker312 发表于 2015-6-5 08:51:25
楼上正解

板凳
蓝色 发表于 2015-6-5 17:50:08
帮助里面有介绍

Title

    [U] 11.4 varlists


Description

    A varlist is a list of variable names.  The variable names in a varlist refer either
    exclusively to new (not yet created) variables or exclusively to existing variables. A
    newvarlist always refers exclusively to new (not yet created) variables.  Similarly, a
    varname refers to one variable, either existing or not yet created.  A newvar always
    refers to one new variable.

    Sometimes a command will refer to a varname in another way, such as "groupvar".  This is
    still a varname.  The different name is used to give you an extra hint about the purpose
    of that variable.  For example, a groupvar is the name of a variable that defines groups
    within your data.

    Examples include

        myvar                   just one variable
        myvar thisvar thatvar   three variables
        myvar*                  variables starting with myvar
        *var                    variables ending with var
        my*var                  variables starting with my & ending with var with any number
                                  of other characters between
        my~var                  one variable starting with my & ending with var with any
                                  number of other characters between
        my?var                  variables starting with my & ending with var with one other
                                  character between
        myvar1-myvar6           myvar1, myvar2, ..., myvar6 (probably)
        this-that               variables this through that, inclusive

    The * character indicates to match one or more characters.  All variables matching the
    pattern are returned.

    The ~ character also indicates to match one or more characters, but unlike *, only one
    variable is allowed to match.  If more than one variable matches, an error message is
    presented.

    The ? character matches one character.  All variables matching the pattern are returned.

    The - character indicates that all variables in the dataset, starting with the variable
    to the left of the - and ending with the variable to the right of the - are to be
    returned.


    Many commands understand the keyword _all to mean all variables.  Some commands default
    to using all variables if none are specified.


    Factor variables are extensions of varlists of existing variables.  When a command allows
    factor variables, in addition to typing variable names from your data, you can type
    factor variables using factor-variable operators.

    Factor variables create indicator variables from categorical variables, interactions of
    indicators of categorical variables, interactions of categorical and continuous
    variables, and interactions of continuous variables (polynomials).

    There are five factor-variable operators:

         Operator  Description
         ------------------------------------------------------------------------------------
         i.        unary operator to specify indicators
         c.        unary operator to treat as continuous
         o.        unary operator to omit a variable or indicator
         #         binary operator to specify interactions
         ##        binary operator to specify factorial interactions
         ------------------------------------------------------------------------------------

    For complete syntax and usage of factor variables, see fvvarlist.


    Time-series varlists are a variation on varlists of existing variables.  When a command
    allows a time-series varlist, you may include time-series operators.  For instance, L.gnp
    refers to the lagged value of variable gnp.  The time-series operators are

        Operator  Meaning
        ---------------------------------------------------------
        L.        lag (x_t-1)
        L2.       2-period lag (x_t-2)
        ...
        F.        lead (x_t+1)
        F2.       2-period lead (x_t+2)
        ...
        D.        difference (x_t - x_t-1)
        D2.       difference of difference (x_t - 2x_t-1 + x_t-2)
        ...
        S.        "seasonal" difference (x_t - x_t-1)
        S2.       lag-2 (seasonal) difference (x_t - x_t-2)
        ...
        ---------------------------------------------------------

    Time-series operators may be repeated and combined and both lowercase and uppercase
    letters are understood.  For more details, see help tsvarlist.


Examples

    . webuse census4
    . describe

    These four regress commands are equivalent.
    . regress brate medage medagesq reg2 reg3 reg4
    . regress brate medage medagesq reg2-reg4
    . regress brate med* reg2-reg4
    . regress brate medage c.medage#c.medage i.region

    . summarize _all

    . sysuse citytemp
    . describe

    . summarize *dd
    . summarize temp*
    . summarize temp???
    . summarize t*n

    . webuse fvex
    . describe

    . regress y distance i.group
    . regress y i.sex sex#c.distance

    These two commands are equivalent.
    . regress y distance i.sex i.group sex#group
    . regress y distance sex##group


报纸
estherchiu 发表于 2022-9-29 15:37:45
valist指的就是你在stata中输入的变量

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-8 21:58