-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with make.transition.probs function #37
Comments
@LorenzC91 thanks for this. Can I ask for more info (and possibly a replicable example) in order to debug your problem? In any case, I'm not sure I follow your point about |
Hi Gianluca, Here is the code I used: `library(survHE) dataset<-data dataset$event<-NA dataset[dataset$censored==0, 9]<-1 dataset[dataset$censored==1, 9]<-0 fitted_curves<-fit.models(formula = Surv(time, event)~1, data = dataset, survival_curves<-make.surv(fitted_curves, mod = 1, t=c(0:10)) make.transition.probs(survival_curves)` Using this code gives the error I mentioned above as output. If instead I use this: `survival_curves<-make.surv(fitted_model, mod = 1, t=c(0:10), nsim=10) make.transition.probs(survival_curves)` then I have an output, even if it is a bit confusing, since I have 10 rows (which I suppose are the transition probabilities in each of the 10 time points) and 10 columns (I can immagine one column for each simulation). You said that "make.transition.probs does take as input a survHE object, i.e. the output of a call to fit.models", but I see in the Reference manual that make.transition.probs takes as input "an object obtained as output of the call to make.surv" (pag 9). Thanks a lot for your help and patience, I really appreciate Have a nice evening! |
@LorenzC91 thanks. You're right that In terms of the worked example, it's not really reproducible though --- what is the |
Hi Gianluca, Thanks and have a nice day! |
@LorenzC91: my apologies for the confusion, you caught me in a moment when I was trying to juggle too many things and I got confused myself... If you install that version (which doesn't change the core of the package, but it's updated with respect to
which I think is what you want (there are as many columns as simulations, in the resulting object with the various transition probabilities at each time). |
Hi Gianluca! Have a nice weekend! |
No probs!
…On Sat, 24 Apr 2021 at 10:51, LorenzC91 ***@***.***> wrote:
Hi Gianluca!
Thanks a lot for your answer.
Sorry for the delay, I'm having a super busy week and couldn't find the
time to check the updated version yet.
I come back to you as soon as I can
Have a nice weekend!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#37 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCRVSLNV5BBILGCTUA7GJLTKKIAHANCNFSM426G74RQ>
.
--
*Gianluca Baio*
*Professor of Statistics & Health Economics*
Department of Statistical Science
University College London
1-19 Torrington Place, London WC1E 6BT, UK
Telephone +44(0)20 7679 1248 (internal: 41248)
Twitter: @stats_UCL <https://twitter.com/stats_UCL>
Website: http://www.homepages.ucl.ac.uk/~ucakgba
<http://www.homepages.ucl.ac.uk/~ucakgba/>
Blog: http://www.statistica.it/gianluca/blog/
[image: https://twitter.com/gianlubaio] <https://twitter.com/gianlubaio>
<https://www.linkedin.com/in/gianluca-baio-b893879/>
<https://github.com/giabaio>
<https://scholar.google.com/citations?user=ro0QvGsAAAAJ&hl=en>
<https://www.researchgate.net/profile/Gianluca_Baio>[image:
https://www.linkedin.com/in/gianluca-baio-b893879/]
<https://www.linkedin.com/in/gianluca-baio-b893879/>
*This email may reach you outside of your working hours. If that's the
case, please do not feel pressure to reply immediately.*
|
Hi Gianluca, Have a nice evening! Lorenzo |
Cool! Thank you.
G
…On Wed, 28 Apr 2021 at 23:56, LorenzC91 ***@***.***> wrote:
Hi Gianluca,
I downloaded the devel version and now the function is working properly :-)
Thanks a lot for your help and congratulations again for your work with
this package
Have a nice evening!
Lorenzo
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#37 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCRVSJZJX7GYT6IQBRTTKTTLCHBXANCNFSM426G74RQ>
.
--
*Gianluca Baio*
*Professor of Statistics & Health Economics*
Department of Statistical Science
University College London
1-19 Torrington Place, London WC1E 6BT, UK
Telephone +44(0)20 7679 1248 (internal: 41248)
Twitter: @stats_UCL <https://twitter.com/stats_UCL>
Website: http://www.homepages.ucl.ac.uk/~ucakgba
<http://www.homepages.ucl.ac.uk/~ucakgba/>
Blog: http://www.statistica.it/gianluca/blog/
[image: https://twitter.com/gianlubaio] <https://twitter.com/gianlubaio>
<https://www.linkedin.com/in/gianluca-baio-b893879/>
<https://github.com/giabaio>
<https://scholar.google.com/citations?user=ro0QvGsAAAAJ&hl=en>
<https://www.researchgate.net/profile/Gianluca_Baio>[image:
https://www.linkedin.com/in/gianluca-baio-b893879/]
<https://www.linkedin.com/in/gianluca-baio-b893879/>
*This email may reach you outside of your working hours. If that's the
case, please do not feel pressure to reply immediately.*
|
Hi Gianluca,
many thanks for having developed this useful package.
I have some issue using the function make.transition.probs
The function only works when I input a model (created with make.surv) where the nsim value equals the t intervals.
In all other cases the error is:
Error in dimnames(x) <- dn :
length of 'dimnames' [2] not equal to array extent
Also, the output of the function is not fully clear to me.
I hope my question is not too naïve, I'm new to R
Thanks in advance for your kind answer
Lorenzo
The text was updated successfully, but these errors were encountered: