Announcement

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

  • Cox Lasso for Inference?

    Hello. I am conducting this work as part of my Epidemiology degree dissertation.

    I have 2 questions, I would very much appreciate any help. Part of my question relates to the appropriate STATA code but part of it is a question on whether this is a legitimate modeling approach:

    My research question is to investigate which variables are associated with longer outcome-free survival.

    From the literature, there are some established factors related to longer outcome-free survival; let's call those x1, x2, x3.
    I have an array of other variables I wanted to investigate if they are related to longer outcome free survival.
    For this I used Cox Lasso. I am relatively new to Cox LASSO.
    Cox LASSO selected 2 factors already established from the literature (let's say x2 and x3), and 4 others (x4-x7).

    I want to now combine x1-x7 into a model.
    Is this appropriate to do? and if so, is the code I use below ok?
    I appreciate any advice.

    1. Is it an appropriate modeling approach to combine variables selected a priori with variables selected by LASSO into a single model? (and if so, can that be done with a regular Cox model or is it necessary to use LASSO for inference? (or some other approach?))

    2.If lasso for inference is the appropriate approach, is the below code ok?
    (is it even possible with the current STATA version to use Lasso for inference for COX models? If so can you please direct me to some help materials?
    I have reviewed the STATALASSO REFERENCE MANUAL RELEASE 18. I am just not clear on how to use the ds commands specifically with survival data (is it as simple as using stset, then I do dsregress?))

    stset time2,failure(outcome)
    set seed 1234
    splitsample, generate(svar2) split(0.8 0.2) balance(outcome)

    label define svalues 1 "Training" 2 "Testing"
    label values svar svalues


    dsregress c.x i.x1 i.x2 i.x3 i.x4 i.x5 i.x6 i.x7, controls (i.x7-x50)

    thanks very much in advance for any advice you may offer
Working...
X