Skip to content
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

How to use coxplsDR method to predict new data? #1

Open
psalguerog opened this issue Jul 1, 2020 · 0 comments
Open

How to use coxplsDR method to predict new data? #1

psalguerog opened this issue Jul 1, 2020 · 0 comments

Comments

@psalguerog
Copy link

psalguerog commented Jul 1, 2020

Hello fbertran,

I'm Pedro Salguero and I'm glad to use your R package, but I have some doubts I want to solve. I have been used the plsRcox method and it works perfectly. Also, I can run the predict method in R because it accepts plsRcoxmodel objects as you programmed.

However, when I run the coxplsDR method, the result is a coxph object that requires the different PLS components to predict new data and my new data have the original covariables.

I can run it with the parameter allres=TRUE that includes extra results, but I'm not able to use the information to obtain an automatic or manual prediction.

The method returns (in a list) a PLS object I can not use with predict function to obtain the component values for new data. I tried to get the components manually, but I do not understand wich values of the PLS object I should use to get them and then how to run the cox model. Can you help me with this method and how to use it to predict new data?

If you need more information about my problem I can add it.

Edit: Hello again, I'm also working with the function coxDKsplsDR adn again, I'm not able to make it work with new predictions. I get a list with a coxph, spls and pls models that I can not use to predict new observations.

I get the next errors if I try to predict the components with the spls or pls object.

Error in UseMethod("predict") : no applicable method for 'predict' applied to an object of class "spls"

Error in UseMethod("predict") : no applicable method for 'predict' applied to an object of class "pls"

Thank you,
Pedro Salguero

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

No branches or pull requests

1 participant