Interpreting results with a cox test

  Kiến thức lập trình

I am trying to compare 2 non nested models using coxtest from lmtest library. Lamentably I can not find some explanation about the results from this test:

Here I test same model, same database but differents observations number:

    Model 1: Gasto ~ log(Ingreso)
    Model 2: Gasto ~ log(Ingreso)
                    Estimate Std. Error     z value  Pr(>|z|)    
    fitted(M1) ~ M2   -0.037  0.0033982 -1.1011e+01 < 2.2e-16 ***
    fitted(M2) ~ M1 -253.894  0.0000885 -2.8705e+06 < 2.2e-16 ***
    ---
    Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
    Warning messages:
    1: In coxtest(mod4, mod5) : models fitted on different subsets
    2: In coxtest(mod4, mod5) : different dependent variables specified

Why both models are significants? differents in what sense?

Here I test different model, same database.
I change the name of gasto only to verify if model order change results in the table, example:

    coxtest(mod3, mod4):

    Model 1: Gasto3 ~ Ingreso
    Model 2: Gasto ~ log(Ingreso)
                    Estimate Std. Error     z value Pr(>|z|)    
    fitted(M1) ~ M2   -0.075   0.218506     -0.3454   0.7298    
    fitted(M2) ~ M1 -209.031   0.010401 -20097.4191   <2e-16 ***
    ---
    Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
    Warning messages:
    1: In coxtest(mod3, mod4) : models fitted on different subsets
    2: In coxtest(mod3, mod4) : different dependent variables specified
    > Cox test

    coxtest(mod4, mod3):

    Model 1: Gasto ~ log(Ingreso)
    Model 2: Gasto3 ~ Ingreso
                    Estimate Std. Error     z value Pr(>|z|)    
    fitted(M1) ~ M2   -0.134   0.210933     -0.6361   0.5247    
    fitted(M2) ~ M1 -253.604   0.012717 -19942.2191   <2e-16 ***
    ---
    Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
    Warning messages:
    1: In coxtest(mod4, mod3) : models fitted on different subsets
    2: In coxtest(mod4, mod3) : different dependent variables specified

    In the last result I expected that p-value was in the first result not the last result, because I change order of model.

    Could give some advice or explain better?
    Thanks

LEAVE A COMMENT