Main Content

linhyptest

Linear hypothesis tests on Cox model coefficients

Since R2021a

    Description

    testTable = linhyptest(coxMdl) returns an ANOVA-style table with p-values for tests that determine if sequential combinations of Cox model coefficient estimates are zero. linhyptest tests successive null hypotheses, starting with the hypothesis that all the coefficients are 0. The function then tests to determine if all but the first coefficient are 0, all but the first two coefficients are zero, and so on, up to the number of coefficients minus one. A significant p-value indicates that you can reject the null hypothesis, meaning the assumption that all coefficients in a particular combination of coefficients are 0.

    example

    Examples

    collapse all

    Examine the result of linhyptest on the readmissiontimes data set.

    load readmissiontimes
    coxMdl = fitcox([Age,Sex,Weight],ReadmissionTime,...
        'Censoring',Censored);
    testTable = linhyptest(coxMdl)
    testTable=3×2 table
           Predictor         pValue  
        _______________    __________
    
        {'Empty Model'}    2.5612e-07
        {'X1'         }    7.9753e-08
        {'X1, X2'     }      0.095973
    
    
    • The first row of the returned table indicates that you can reject the hypothesis that all model coefficients are 0 at the .05 or .01 significance levels.

    • The second row indicates that you can reject the hypothesis that only the Sex and Weight coefficients are 0 at the .05 or .01 significance levels.

    • The third row indicates that you cannot reject the hypothesis that only the Weight coefficient is 0 at the .05 or .01 significance levels.

    Input Arguments

    collapse all

    Fitted Cox proportional hazards model, specified as a CoxModel object. Create coxMdl using fitcox.

    Output Arguments

    collapse all

    Significance levels of cumulative hypothesis tests, returned as a table. The tested coefficients are in the Coefficients property of the model. The table returns tests of successive null hypotheses, starting with the hypothesis that all the coefficients are 0. The second row tests whether all but the first coefficient is 0. The third row tests whether all but the first two coefficients are zero, and so on. The last row tests whether all coefficients but the last are zero. A significant p-value indicates that you can reject the null hypothesis, meaning the assumption that all coefficients in a particular combination of coefficients are 0. A significant p-value is one that is smaller than a specified significance level.

    Version History

    Introduced in R2021a

    See Also

    | |