Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • One-sample logrank test

    I am currently trying to calculate a one-sample logrank-test for a test difference between the survivor function and that of the corresponding population (lineP).

    My dataset consist of 1604 observations, and the survivor function describes the survival of all patients who received a certain kind of heart operation from 1999 to 2015.

    The description of my populations kaplan meier varieble: _t
    Obs: 1604 failures:754 Mean: 7.098259 (years) Std. Err.: 0.0908575 95% CI: 6.920047-7.276471 range: 0-18.3 (years)

    Failure _d: ALIVE1_DEAD2 == 2
    analysis time _t: date_difference


    I've added the corresponding population (lineP) with 16 (x,y) coordinates as observation 1605 to 1620.
    The line data are:
    bagX bagY
    0 1
    1 0.965
    2 0.929
    3 0.89
    4 0.85
    5 0.808
    6 0.763
    7 0.7169
    8 0.669
    9 0.62
    10 0.57
    11 0.52
    12 0.469
    13 0.419
    14 0.37
    15 0.323
    The code for the graph (see picture) is:

    Code:
     Sts graph, addplot(lineP bagY bagX)
    I cant sample more data because of the server I work on.
    Click image for larger version

Name:	Graph2.jpg
Views:	1
Size:	41.1 KB
ID:	1547485




    I'm struggling with the code of a one-sample logrank test. Can anyone can point me to a stata-implementation of this test?


    Please and thank you.
    Lytfi
    Last edited by Lytfi Krasniqi; 17 Apr 2020, 07:26.
Working...
X