# Equivalent of Kaplan Meier for an unbounded number of sets

I have used Kaplan-Meier method several times before when I compared how group $$A$$ survived compared to group $$B$$ through a period of (say) 5 years.

Now I face a somewhat different scenario: I have some score variable $$v$$ which is continuous, and I want to know how it affects survival?. Since I know $$0 < v < 100$$ I simply categorized it to ten groups and did a Kaplan-Meier on them.

I wonder if there's a better way? maybe Cox Regression?