Skip to content

Conversation

@DanChaltiel
Copy link
Contributor

Hi Alboukadel,

First, thank you for this great package, your code is incredible!

Here is a little pull request on 2 functions.

ggcoxfunctional.R

On ggcoxfunctional.R, I only made a minor modification which correct an error I get a lot.

Indeed, if a model includes categorical variables, the function will throw :

Error in xy.coords(x, y, setLab = FALSE) : 'x' and 'y' lengths differ

Since every variable is plotted against the null model, I thought it makes sence to just exclude categorical variables.

ggcoxzph.R

On ggcoxzph.R, modifications are quite substantial and maybe subject to discussion.

Your function plots an estimation of beta as a function of time. In order to validate the proportionnal hazard assumption, I find very valuable to plot the beta estimated by the model on top of your graph.

In order to access this coefficient, I need the fit object to be of class coxph so I added support to this class. Then I just had to add a geom_hline call plus some arguments and documentation.

I didn't see any testthat in your package to comply with, but I think I tested these functions pretty thoroughly.

Hope it can help :-)
Dan

@DanChaltiel
Copy link
Contributor Author

Sorry, I'm not familliar with travis-ci, and its documentation is not really helping.

How can I know where the error is?

When there was missing values, explanatory.variables.values and data were not the dame size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant