Dear Dr Blighe,
After obtaining coxlasso, How should one use predict? (or if I did it correctly what is output?)
b= (coxdata[1,10:ncol(coxdata)])
predict(coxlasso,newx=t(matrix(unlist(b)))) # gives the following
structure(c(0, -0.0573107373872287, -0.111778770449609, -0.162756412874245,
-0.200548555731299, -0.273323342727612, -0.37012635158656, -0.469871946543072,
-0.560372678843767, -0.603628666594683, -0.655720887665505, -0.744350261134244,
-0.745442838491973, -0.714564041893826, -0.717049862434844, -0.70521708276932,
-0.679319806284637, -0.665634536861567, -0.700412594114427, -0.631192863204038,
-0.518927033204136, -0.59903960519009, -0.710614096489971, -0.734474495657648,
-0.689713249193243, -0.655382990137035, -0.651263237099303, -0.73407802999023,
-0.986691917670182, -1.20827896728222, -1.51349499203079, -1.81573235348754,
-2.10732385404113, -2.22227393784832, -2.28715605040497, -2.37237736865864,
-2.39892781588181, -2.36043683952605, -2.30550417286347, -2.20642321062464,
-2.07954256878492, -1.93909488063093, -1.80323178627091, -1.68509558186175,
-1.5868039850474, -1.47271332547507, -1.4496698727763, -1.44238444153376,
-1.42238792669507, -1.40830105312875, -1.42415625831459, -1.49491224976645,
-1.56582208573533, -1.62935815886695, -1.6888692912116, -1.74952813431818,
-1.79478410463216, -1.84859609609203, -1.91299001106592, -1.9701781067282,
-2.00258384919503, -2.02809472579634, -2.01731529287855, -2.01089094538337,
-2.01409549624958, -2.0841219068267, -2.17383465452615, -2.27144773940283,
-2.35637473554323, -2.47712835478697, -2.64082729928918, -2.82987980091043,
-3.04828718845536, -3.19363361314437, -3.3121089786443, -3.44275077136097,
-3.59026154364923, -3.73271512101116, -3.88856516780995, -4.0598688214655,
-4.24089644933194, -4.41183710459872, -4.54472144701383, -4.67485738991895,
-4.81328885214305, -4.95878120189189, -5.12172618371055, -5.28584411091286,
-5.46974157546711, -5.66872554927844, -5.79469241653852, -5.94584536181941,
-6.0989671561301, -6.25322278976369, -6.4462496497583, -6.68000499424007,
-6.91742293950293, -7.14866284337644, -7.40415287117432, -7.66418089026084
), .Dim = c(1L, 100L), .Dimnames = list(NULL, c("s0", "s1", "s2",
"s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12",
"s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21",
"s22", "s23", "s24", "s25", "s26", "s27", "s28", "s29", "s30",
"s31", "s32", "s33", "s34", "s35", "s36", "s37", "s38", "s39",
"s40", "s41", "s42", "s43", "s44", "s45", "s46", "s47", "s48",
"s49", "s50", "s51", "s52", "s53", "s54", "s55", "s56", "s57",
"s58", "s59", "s60", "s61", "s62", "s63", "s64", "s65", "s66",
"s67", "s68", "s69", "s70", "s71", "s72", "s73", "s74", "s75",
"s76", "s77", "s78", "s79", "s80", "s81", "s82", "s83", "s84",
"s85", "s86", "s87", "s88", "s89", "s90", "s91", "s92", "s93",
"s94", "s95", "s96", "s97", "s98", "s99")))
Thanks
You can have
days/time to deathas the outcome variable, in which case the model becomes a linear regression. If you havevital statusas the outcome, then it becomes a binary logistic regression model, as people can only either be alive or dead. Researchers do not typically use survival data in this way.To be pedantic about it: models used in this way are not 'predicting' anything. If you set-up your model correctly, then
time to deathandvital statusare taken into account when calculating the hazard ratio. Hazard ratio for gene expression obviously has a different interpretation than a hazard ratio for a binary categorical variable.Usually the log rank p-value is taken and quoted in manuscripts.
For a better answer on the statistics behind all of this, please post your question at CrossValidated.
So, you are using TCGA data. In order for me to answer this part, you will have to show the code that you have used.
Hi @Kevin, Thank you for your reply and a nice explanation. Yes I am using TCGA data and need some more clarification for your comments.
What do you suggest then, how should I use the survival data of patients to predict their survival?
In this statement you are referring to which manuscript.
Thanks
It could just be the way that you are describing it, but it seems like you simply want a model like this:
I was just implying that we typically have something like this:
I have an entire tutorial, here: Survival analysis with gene expression
----------------------------------------
It was just a general observation from having worked with many physicians and having read manuscripts. I also just found This, which states: "The standard method, the log-rank test, was used for statistical comparison of survival times."
If you need help in setting up the actual Survival model for use with glmnet Cox, then take a look here: Exploring association between genes by their expression
Specifically, take a look at my comment, where I provide a fully reproducible example to perform a lasso Cox regression: C: Exploring association between genes by their expression