Transcription of test — Test linear hypotheses after estimation
1 Test linear hypotheses after estimationDescriptionQuick startMenuSyntaxOptions for testparmOptions for testRemarks and examplesStored resultsMethods and formulasAcknowledgmentReferencesAlso seeDescriptiontestperforms Wald tests of simple and composite linear hypotheses about the parameters of themost recently fit (see [SVY]svy estimation ), carrying out an adjusted Wald test bydefault in such be used withsvyestimation results, see [SVY]svy a useful alternative totestthat permitsvarlistrather than a list of coefficients(which is often nothing more than a list of variables), allowing the use of standard Stata notation,including - and * , which are given the expression interpretation Wald tests .
2 For likelihood-ratio tests , see [R]lrtest. For Wald-typetests of nonlinear hypotheses , see [R]testnl. To display estimates for one-dimensional linear ornonlinear expressions of coefficients, see [R]lincomand [R] [R]anova postestimationfor additionaltestsyntax allowed [MV]manova postestimationfor additionaltestsyntax allowed startLinear tests after single-equation modelsJoint test that the coefficients onx1andx2are equal to 0test x1 x2 Joint test that coefficients on factor equal to 0test that coefficients on equaltest = test that coefficients on , , all equaltest ( ) ( )Same as abovetest above, but add separate tests for each pairingtest , mtestAs above, but withp-values adjusted for multiple comparisons using Sid ak s methodtest ( ) ( ), mtest(sidak)
3 12 test Test linear hypotheses after estimationTest that the sum of the coefficients forx1andx2is equal to 4test x1 + x2 = 4 Test the equality of two linear expressions involving coefficients onx1andx2test 2*x1 = 3*x2 ShorthandvarlistnotationJoint test that all coefficients on the indicators foraare equal to 0testparm test that all coefficients on the indicators foraandbare equal to 0testparm test that all coefficients associated with the interaction of factor variablesaandbare equal to 0testparm # test that the coefficients on all variablesx* are equal to 0testparm x* linear tests after multiple-equation modelsJoint test that the coefficient onx1is equal to 0 in all equationstest x1 Joint test that the coefficients forx1andx2are equal to 0 in equationy3test [y3]x1 [y3]x2 Test that the coefficients forx1are equal in equationsy1andy3test [y1]x1=[y3]x1 Same as abovetest [y1=y3]: x1 Joint test of the equality of coefficients forx1andx2across equationsy1andy3test [y1=y3]: x1 x2 Add coefficients forx1andx2from equationy4to testtest [y1=y3=y4].
4 X1 x2 Test that all coefficients in the equation fory1are equal to those in the equation fory2test [y1=y2]As above, but only for coefficients on variables common to both equationstest [y1=y2], commontest Test linear hypotheses after estimation 3 ShorthandvarlistnotationJoint test that all coefficients on the indicators foraare 0 in all equationstestparm test that all coefficients on the indicators foraare equal to each other in the first equationtestparm , equalAs above, but for the equation fory4testparm , equal equation(y4)Joint test that the coefficients on the indicators foraandbare equal to 0 in all equationstestparm test that all coefficients associated with the interaction of factorsaandbare 0testparm # >Postestimation4 test Test linear hypotheses after estimationSyntaxBasic syntaxtestcoeflist(Syntax 1)testexp=exp[=.]
5 ](Syntax 2)test [eqno][:coeflist](Syntax 3)test [eqno=eqno[=..]][:coeflist](Syntax 4)testparmvarlist[,testparmoptions]Full syntaxtest (spec)[(spec)..][,testoptions]testparmop tionsDescriptionequalhypothesize that the coefficients are equal to each otherequation(eqno)specify equation name or number for which the hypothesis is testednosvyadjustcompute unadjusted Wald tests for survey resultsdf(#)useFdistribution with#denominator degrees of freedom for the referencedistribution of the test statistic; for survey data,#specifies the designdegrees of freedom unlessnosvyadjustis specifieddf(#)does not appear in the dialog [(opt)]test each condition separatelycoefreport estimated constrained coefficientsaccumulatetest hypothesis jointly with previously tested hypothesesnotestsuppress the outputcommontest only variables common to all the equationsconstantinclude the constant in coefficients to be testednosvyadjustcompute unadjusted Wald tests for survey resultsminimumperform test with the constant, drop terms until the testbecomes nonsingular, and test without the constant on theremaining terms.
6 Highly technicalmatvlc(matname)save the variance covariance matrix; programmer s optiondf(#)useFdistribution with#denominator degrees of freedom for the referencedistribution of the test statistic; for survey data,#specifies the designdegrees of freedom unlessnosvyadjustis specifiedmatvlc(matname)anddf(#)do not appear in the dialog contain factor variables and time-series operators; see[U] Factor variablesand[U] Time-series allowed withtest; see[U] Prefix Test linear hypotheses after estimation 5 Syntax 1 tests that coefficients are 2 tests that linear expressions are 3 tests that coefficients ineqnoare 4 tests equality of coefficients between one ofcoeflistexp=exp[=exp][eqno][:coeflist] [eqno1=eqno2[=.]]
7 ]][:coeflist]coeflistiscoef[ ][eqno]coef[[eqno] ][eqno]b[coef][[eqno]b[coef]..]expis a linear expression containingcoefb[coef]b[eqno:coef][eqno]c oef[eqno]b[coef]eqnois##namecoefidentifi es a coefficient in the typically a variable name, a level indicator, aninteraction indicator, or an interaction involving continuous variables. Level indicators identify onelevel of a factor variable and interaction indicators identify one combination of levels of an interaction;see[U] Factor contain time-series operators; see[U] between[ ], which are to be typed, and[], which indicate optional not shown in the syntax diagram, parentheses aroundspecare required only with multiplespecifications.
8 Also, the diagram does not show thattestmay be called without arguments toredisplay the results from the (see [R]anovaand [MV]manova) allow thetestsyntax above plus more(see [R]anova postestimationfortestafteranova; see [MV]manova postestimationfortestaftermanova).Option s for testparmequaltests that the variables appearing invarlist, which also appear in the previously fit model, areequal to each other rather than jointly equal to test Test linear hypotheses after estimationequation(eqno)is relevant only for multiple-equation models, such asmvreg,mlogit, specifies the equation for which the all-zero or all-equal hypothesis is (#1)specifies that the test be conducted regarding the first equation# (price)specifiesthat the test concern the equation for use withsvyestimation commands; see [SVY]svy estimation .
9 It specifies thatthe Wald test be carried out without the default adjustment for the design degrees of freedom. Thatis, the test is carried out asW/k F(k,d)rather than as(d k+1)W/(kd) F(k,d k+1),wherek= the dimension of the test andd= the total number of sampledPSUs minus the totalnumber of strata. When thedf()option is used, it will override the default design degrees following option is available withtestparmbut is not shown in the dialog box:df(#)specifies that theFdistribution with#denominator degrees of freedom be used for thereference distribution of the test statistic. The default is to usee(dfr)degrees of freedom orthe 2distribution ife(dfr)is missing.
10 With survey data,#is the design degrees of freedomunlessnosvyadjustis for test Options mtest[(opt)]specifies that tests be performed for each condition the methodfor adjustingp-values for multiple testing. Valid values foroptarebonferroniBonferroni s methodholmHolm s methodsidak Sid ak s methodnoadjustno adjustment is to be madeSpecifyingmtestwithout an argument is equivalent tomtest(noadjust).coefspecifies that the constrained coefficients be a hypothesis to be tested jointly with the previously tested the output. This option is useful when you are interested only in the joint test ofseveral hypotheses , specified in a subsequent call oftest, that when you use the[eqno1=eqno2[=.]]