Skip to content

Improve representation of all possible variables / models #1

@andrew-slater

Description

@andrew-slater

To provide examples of R syntax for R-novices, add more to this toy data set

Variables: factor
Models: ordinal

Below are notes from Toby RE: Surv objects needing to be specified as a transformation, not a derivation. We are currently only supporting derivations, not transformations in tableinput.R. However, it seems the old approach of nesting the Surv object definition within the coxph model statement should still work - check with Toby on any drawbacks to this approach (i.e. why should we enhance tableinput.R to handle transformations, what benefit will we get)?


Basically, transformations are now performed by each “slave” process responsible for analysing each chromosome-chunk-model-subgroup. This means that transformations can create any R class of object, for example like any of the following:

response <- factor(BRSP, c(“CR”, “PR”, “SD”, “PD”)) # response as an ordered factor
ldl.3cats <- ile(ldl.numeric, c(“Low”, “Medium”, “High”)) # LDL split by tertiles as an ordered factor
osMonths <- Surv(SRVMO, SRVCFLCD) # overall survival in Months as a Surv object
alt.tte <- Surv2(time.first.alt3xuln, time.on.treatment) # creates a Surv object from time to event or alternate censoring time

Then you can directly use these transformed variables in your model statements, with the expected class behaviour, e.g. like

coxph(osMonths ~ 1) # was previously coxph(Surv(SRVMO, SRVCFLCD))
clm(ldl.3cats ~ 1) # previously had to be converted to factor using clm(factor(...) ~ 1)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions