2
$\begingroup$

I am using Cox proportional-hazards model to study which of my activity variants make people bored of the website all together.

My data consists of few hundred rows. Each row contains the following rows user_id, survival_time, censoring_stats, times_used_variant_A, times_used_variant_B, times_used_variant_C.

The way I do the analysis is that I take a subset of my user base that used my website between a certain time frame, e.g., January to February. Then I calculate the number of times they used each variant until the end of June. Then, I check to see if they logged in anytime in December and I decide their censoring status based on that.

I use the following approach http://www.sthda.com/english/wiki/cox-proportional-hazards-model.

While the standard (kaplan) approach shows that people have a higher probability of quitting when they use variant B compared to A, the Cox approach shows coefficients around -1.00e-03 for all covariant. I do see high statistical significance.

Also, applying the univariant approach I get the following result:

                         beta    HR     (95% CI for HR)  wald.test   p.value
times_used_variant_B  -0.02      0.98   (0.98-0.98)      26000        0
times_used_variant_A  -0.0033    1      (1-1)            110000       0
times_used_variant_C  -0.046     0.95   (0.95-0.96)      12000        0

What is the flaw with my approach and is there another method of testing the hypothesis?

$\endgroup$
3
  • 1
    $\begingroup$ Have you thought of dividing times_used by a large constant like 1000? $\endgroup$
    – mdewey
    Commented Feb 7, 2023 at 16:03
  • 2
    $\begingroup$ Date-time objects YYYYMMDD HH:MM:SS are often encoded so that a one-unit difference can reflect one minute or one second! $\endgroup$
    – AdamO
    Commented Feb 7, 2023 at 16:17
  • $\begingroup$ @ AdamO I forgot to add that Survival time is an integer that counts the days between account creation and last login. @mdewey I did try that and beta values are now -20, -3.3 and -46. Could you please explain to me why did this work? you could also post it as an answer $\endgroup$
    – user304584
    Commented Feb 7, 2023 at 19:47

1 Answer 1

2
$\begingroup$

The OP has clarified that time is measured in days so the coefficients represent the effect per day. To get larger coefficients which seem easier to describe and work with we need to measure time in larger units. So divide by 7 to get the effect per week, 28 for per month (for some meaning of month), 365 for per year. No one of these is obviously superior so pick one which makes most sense in the light of the range of the variables and the scientific question.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.