Kaplan_Meier: Kaplan Maier

Description Usage Arguments Value Examples

Description

Summary-Funktion fuer Kaplan-Maier

Beispiel unter (see hkarz )

Mediane

m <- Surv(Time, status) ~ 1

res <- survfit(m, DF)

APA2(res, caption="Kaplan-Meier")

survival rate at a certain time

APA2(summary(res, times=c(5, 10, 15)))

APA.survfit Mediane berechnen.

APA.survdiff Log-Rank-Test berechnen.

APA2_coxph_param Kopie von survival:::print.coxph

Summary_Surv(): Summary of a Survival Curve survival::survfit- Objekt

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
## S3 method for class 'survfit'
APA(x, ...)

## S3 method for class 'survdiff'
APA(x)

## S3 method for class 'summary.survfit'
APA2(
  x,
  digits = NULL,
  percent = FALSE,
  include = c(time = "time", n.risk = "n.risk", n.event = "n.event", surv = "survival",
    std.err = "std.err", lower = "lower 95% CI", upper = "upper 95% CI"),
  ...
)

## S3 method for class 'survfit'
APA2(
  x,
  caption = "NULL",
  output = which_output(),
  note = "",
  type = 1,
  digits = 2,
  ...
)

## S3 method for class 'survdiff'
APA2(x, caption = "Test Survival Curve Differences", note = "")

## S3 method for class 'coxph'
APA2(
  x,
  caption = "",
  note = "",
  output = which_output(),
  include.param = FALSE,
  include.test = TRUE,
  ...
)

APA2_coxph_param(
  x,
  caption = "",
  note = "",
  include.ci = TRUE,
  include.se = FALSE,
  output = which_output()
)

Coxph_Test(
  ...,
  data,
  names = NA,
  caption = "Wald test",
  note = "",
  output = which_output()
)

Summary_Surv(...)

## S3 method for class 'list'
Summary_Surv(
  fits,
  times = 1,
  digits = 0,
  percent = FALSE,
  names_time = c("n (% [95% CI])", "n (est [95% CI])"),
  caption = "",
  note = "",
  output = which_output()
)

## S3 method for class 'survfit'
Summary_Surv(
  x,
  times = 1,
  digits = 0,
  percent = FALSE,
  names_time = c("n (% [95% CI])", "n (est [95% CI])"),
  cleanup_names = FALSE,
  caption = "",
  note = "",
  output = which_output()
)

Arguments

percent

Formatierung

times

Zeit

names_time, cleanup_names

Header

Value

data.frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
### Magenkarzinom ###
require(stpvers)
require(survival)
mkarz <-stp25aggregate::GetData("C:/Users/wpete/Dropbox/3_Forschung/1 Statistik/BspDaten/SPSS/_Buehl/MKARZ.SAV")

# Text("Buehl Seite 553", style=3)
#Text("Die Datei mkarz.sav ist ein Datensatz mit 106 Patientan
#     mit Magenkarzinom ueber einen Zeitraum von 5 Jahren")
#require(stp25data)
mkarz %>% Tabelle2(survive[median], status, lkb)
mkarz$status<- ifelse(mkarz$status=="tot", 1, 0)

#Head("Kaplan-Meier estimator without grouping", style=3)
#Text("
#     m0 <- Surv(survive, status) ~ 1
#     res0<- survfit(m0, mkarz)
#
#     ")
m0 <- Surv(survive, status) ~ 1
res0<- survfit(m0, mkarz)
APA2(res0)
#windows(8,4)
#par(mfrow=c(1,2))
#plot( res0 , ylab="Hazard", mark.time = T)
#plot( res0, fun="cumhaz",  ylab="Cumulative Hazard" )
#SaveData(caption="plot: mkarz")


APA2(summary(res0, times= c(5, 10,12,17, 20, 60)),
     percent=TRUE,
     #Statistik Anfordern und ander Schreibweise
     include=c( time ="time", n.risk ="n.risk",
                n.event ="n.event", surv = "survival",
                lower = "lower 95% CI",upper ="upper 95% CI"),
     caption="Kaplan-Meier" )

m1 <- Surv(survive, status) ~ lkb
res1<- survfit(m1, mkarz)
APA2(res1, caption="survfit: Compute a survival Curve for Censored Data (survival)")


fit1<- coxph(m1, mkarz)
logrank1<- survdiff(m1, mkarz)
model_info(logrank1)

APA2(logrank1)
APA2(coxph(m1,mkarz))


APA.survfit(survfit(Surv(futime, fustat) ~ ecog.ps, data = ovarian)  )



APA.survdiff(survdiff(Surv(futime, fustat) ~ ecog.ps, data = ovarian))


APA2.summary.survfit(summary(
survfit(Surv(futime, fustat) ~ ecog.ps, data = ovarian),
time=c(180, 365)))


Summary_Surv(
  survfit(Surv(futime, fustat) ~ ecog.ps, data = ovarian),
  times = c(180, 365), percent =TRUE
)


APA2.survfit(survfit(Surv(futime, fustat) ~ ecog.ps, data = ovarian))
APA2.survfit(survfit(Surv(futime, fustat) ~ ecog.ps, data = ovarian), type=2)
#ovarian$fustat.r <- 1 - ovarian$fustat
#APA2.survfit(survfit(Surv(futime, fustat.r) ~ ecog.ps, data = ovarian))


APA2.survdiff(survdiff(Surv(futime, fustat) ~ ecog.ps, data = ovarian))

APA2.coxph(coxph(Surv(futime, fustat) ~ ecog.ps, data = ovarian) )
APA2.coxph(coxph(Surv(futime, fustat) ~ ecog.ps, data = ovarian),
 include.param=TRUE, include.test = FALSE)
 Coxph_Test(Surv(futime, fustat) ~ ecog.ps, data = ovarian) 
 

APA2_coxph_param(coxph(Surv(futime, fustat) ~ ecog.ps, data = ovarian))

 
Summary_Surv(
  survfit(Surv(futime, fustat) ~ ecog.ps +rx , data = ovarian),
  times = c(180, 360),
  percent = TRUE 
  #, cleanup_names=TRUE
)

summary(survfit(Surv(futime, fustat) ~ ecog.ps +rx , data = ovarian), times = c(180, 360))

  

stp4/stp25stat documentation built on Sept. 17, 2021, 2:03 p.m.