楼主: nancyguan
4607 2

[其他] testn1 [推广有奖]

  • 0关注
  • 0粉丝

本科生

92%

还不是VIP/贵宾

-

威望
0
论坛币
992 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
1628 点
帖子
76
精华
0
在线时间
145 小时
注册时间
2009-7-1
最后登录
2015-9-5

楼主
nancyguan 发表于 2010-4-6 14:43:34 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
版主:STATA中用findit 命令还是找不到非线性约束的检验命令testn1怎么办?
还有,怎么进行命令升级啊?有升级包吗?谢谢了~~
二维码

扫码加我 拉你入群

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

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

关键词:test Est findit Stata tata

沙发
蓝色 发表于 2010-4-6 20:28:53
是testnl  那个是L 不是1


help testnl                                                     dialog:  testnl
-------------------------------------------------------------------------------

Title

    [R] testnl -- Test nonlinear hypotheses after estimation


Syntax

        testnl exp=exp[=exp...] [, options]

        testnl (exp=exp[=exp...]) [(exp=exp[=exp...]) ...] [, options]

    options          description
    -------------------------------------------------------------------------
    mtest[(opt)]     test each condition separately
    nosvyadjust      carry out the Wald test as W/k ~ F(k,d); for use with
                       svy estimation commands
    iterate(#)       use maximum # of iterations to find the optimal step
                       size
    -------------------------------------------------------------------------

    The second syntax means that if more than one constraint is specified,
      each must be surrounded by parentheses.


Menu

    Statistics > Postestimation > Tests > Test nonlinear hypotheses


Description

    testnl tests (linear or nonlinear) hypotheses about the estimated
    parameters from the most recently fitted model.

    testnl produces Wald-type tests of smooth nonlinear (or linear)
    hypotheses about the estimated parameters from the most recently fitted
    model.  The p-values are based on the delta method, an approximation
    appropriate in large samples.

    testnl can be used with svy estimation results, see [SVY] svy
    postestimation.

    The format (exp1=exp2=exp3= ... ) for a simultaneous-equality hypothesis
    is just a convenient shorthand for (exp1=exp2) (exp1=exp3), etc.

    testnl may also be used to test linear hypotheses. test is faster if you
    want to test only linear hypotheses.  testnl is the only option for
    testing linear and nonlinear hypotheses simultaneously.


Options

    mtest[(opt)] specifies that tests be performed for each condition
        separately.  opt specifies the method for adjusting p-values for
        multiple testing.  Valid values for opt are

                bonferroni    Bonferroni's method
                holm          Holm's method
                sidak         Sidak's method
                noadjust      no adjustment is to be made
   
        Specifying mtest without an argument, is equivalent to
        mtest(noadjust).

    nosvyadjust is for use with svy estimation commands.  It specifies that
        the Wald test be carried out as W/k ~ F(k,d) rather than as
        (d-k+1)W/(kd) ~ F(k,d-k+1), where k = the dimension of the test, and
        d = the total number of sampled PSUs minus the total number of
        strata.

    iterate(#) specifies the maximum number of iterations used to find the
        optimal step size in the calculation of numerical derivatives of the
        test expressions.  By default, the maximum number of iterations is
        100, but convergence is usually achieved after only a few iterations.
        You should rarely have to use this option.


Remark

    In contrast to likelihood-ratio tests, different -- mathematically
    equivalent -- formulations of an hypothesis may lead to different results
    for a nonlinear Wald test (lack of "invariance"). For instance, the two
    hypotheses

        H0: b1 = b2

        H0: exp(b1) = exp(b2)

    are mathematically equivalent expressions but do not yield the same test
    statistic and p-value. In extreme cases, under one formulation, one would
    reject H0, whereas under an equivalent formulation one would not reject
    H0.

    Likelihood-ratio testing does satisfy representation invariance.


Examples

    Setup
        . sysuse auto
        . generate weightsq = weight^2
        . regress price mpg trunk length weight weightsq foreign

    Test one nonlinear constraint
        . testnl _b[mpg] = 1/_b[weight]

    Test multiple nonlinear constraints
        . testnl (_b[mpg] = 1/_b[weight]) (_b[trunk] = 1/_b[length])

    Test multiple nonlinear constraints separately, and adjust p-values using
    Holm's method
        . testnl (_b[mpg] = 1/_b[weight]) (_b[trunk] = 1/_b[length]),
            mtest(holm)


Saved results

    testnl saves the following in r():

    Scalars   
      r(df)          degrees of freedom
      r(df_r)        residual degrees of freedom
      r(chi2)        chi-squared
      r(p)           significance
      r(F)           F statistic

    Matrices  
      r(G)           derivatives of R(b) with respect to b; see Methods and
                       formulas in [R] testnl.
      r(R)           R(b)-q; see Methods and formulas in [R] testnl.


Also see

    Manual:  [R] testnl

      Help:  [R] lincom, [R] lrtest, [R] nlcom, [R] test

藤椅
nancyguan 发表于 2010-4-6 22:56:54
O,谢谢了~~我竟然犯了这么白痴的错误

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

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