Skip to content

conf.level in survdiff_ci() function #8

@mkocherg

Description

@mkocherg

Hi,

I don't think the conf.level option works as intended in the survdiff_ci() function. When I change it, the conf intervals remain the same, but SE and pvalue change. Could you please take a look?

data(cancer, package = "survival")

cancer <- cancer |>
    dplyr::mutate(
        sex = factor(
            sex,
            levels = 1:2,
            labels = c("Male", "Female")
        ),
        status = status - 1
    )


survdiff_ci(
    formula = survival::Surv(time = time, event = status) ~ sex,
    data = cancer,
    time = 365.25
)
survdiff_ci(
    formula = survival::Surv(time = time, event = status) ~ sex,
    data = cancer,
    time = 365.25, conf.level = .9
)
Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions