📄 testnl.hlp
字号:
{smcl}
{* 18mar2005}{...}
{cmd:help testnl}{right:dialog: {bf:{dialog testnl}}}
{hline}
{title:Title}
{p2colset 5 19 21 2}{...}
{p2col:{hi:[R] testnl} {hline 2}}Test nonlinear hypotheses after estimation{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 33 2}
{cmd:testnl} {it:{help exp}}{cmd:=}{it:exp}[{cmd:=}{it:exp}...]
[{cmd:,} {it:options}]
{p 8 33 2}
{cmd:testnl} {cmd:(}{it:{help exp}}{cmd:=}{it:exp}[{cmd:=}{it:exp}...]{cmd:)}
[{cmd:(}{it:exp}{cmd:=}{it:exp}[{cmd:=}{it:exp}...]{cmd:)} {it:...}]
[{cmd:,} {it:options}]
{synoptset 15}{...}
{synopthdr}
{synoptline}
{synopt:{opt m:test}[{opt (opt)}]}test each condition separately {p_end}
{synopt:{opt nosvy:adjust}}carry out the Wald test as W/k ~ F(k,d);
for use with {opt svy} estimation commands {p_end}
{synopt:{opt iter:ate(#)}}use maximum {it:#} of iterations to find
the optimal step size {p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}
The second syntax means that if more than one constraint is specified, each
must be surrounded by parentheses.
{p_end}
{title:Description}
{pstd}
{opt testnl} tests (linear or nonlinear) hypotheses about the estimated
parameters from the most recently fitted model.
{pstd}
{opt 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.
{pstd}
{opt testnl} supports {helpb svy} regression-type commands
({helpb "svy: regress"}, {helpb "svy: logit"}, etc.).
{pstd}
The format {cmd:(}{it:exp1}{cmd:=}{it:exp2}{cmd:=}{it:exp3}{cmd:=} ... {cmd:)}
for a simultaneous-equality hypothesis is just a convenient shorthand for
{cmd:(}{it:exp1}{cmd:=}{it:exp2}{cmd:)}
{cmd:(}{it:exp1}{cmd:=}{it:exp3}{cmd:)} etc.
{pstd}
{opt testnl} may also be used to test linear hypotheses. {helpb test} is faster
if you want to test only linear hypotheses. {opt testnl} is the only
option for testing linear and nonlinear hypotheses simultaneously.
{title:Options}
{phang}
{opt mtest}[{opt (opt)}]
specifies that tests be performed for each condition separately. {it:opt}
specifies the method for adjusting p-values for multiple testing. Valid
values for {it:opt} are
{pin3}{opt b:onferroni}{space 4}Bonferroni's method{p_end}
{pin3}{opt h:olm}{space 10}Holm's method{p_end}
{pin3}{opt s:idak}{space 9}Sidak's method{p_end}
{pin3}{opt noadj:ust}{space 6}no adjustment is to be made{p_end}
{pmore}
Specifying {opt mtest} without an argument, is equivalent to
{cmd:mtest(noadjust)}.
{phang}
{cmd:nosvyadjust}
is for use with {helpb svy} estimation commands. It specifies that the Wald
test be carried out as {bind:W/k ~ F(k,d)} rather than as
{bind:(d-k+1)W/(kd) ~ F(k,d-k+1)}, where {bind:k = the dimension} of the
test, and {bind:d = the total} number of sampled PSUs minus the total
number of strata.
{phang}
{opt 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.
{title:Remark}
{pstd}
In contrast to likelihood-ratio tests, different{hline 2}mathematically
equivalent{hline 2}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)
{pstd}
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 while under an equivalent formulation one would not reject H0.
{pstd}
Note that likelihood-ratio testing does satisfy representation invariance.
{title:Examples}
{cmd:. regress y x1 x2 x3 x4 z1 z2}
{cmd:. testnl _b[x1]/_b[x2] = _b[x3]}
{cmd:. testnl (_b[z1] = _b[z2])}
{cmd:. testnl (_b[x1]/_b[x2] = _b[x3]) (_b[z1] = _b[z2]), mtest}
{cmd:.} {it:some model returning equations A and B}
{phang}
{cmd:. testnl ([A]_b[x1]/[B]_b[x1] = [A]_b[x2]/[B]_b[x2] = [A]_b[x3]/[B]_b[x3]), mtest(holm)}
{title:Also see}
{psee}
Manual: {bf:[R] testnl}
{psee}
Online: {helpb lincom}, {helpb lrtest}, {helpb test}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -