Skip to content

Instantly share code, notes, and snippets.

@daynebatten
Created January 6, 2016 20:33
Show Gist options
  • Save daynebatten/52e0f9c7ecc5c774d7cb to your computer and use it in GitHub Desktop.
Save daynebatten/52e0f9c7ecc5c774d7cb to your computer and use it in GitHub Desktop.
# Function to get hazard ratio for males vs. baseline at any given time
y = function(x) exp(-.4667783 - .0008827 * x)
# Plot it
plot(y, ylim=c(0,1), xlim=c(0,1000), xlab = 'Time', ylab = 'Hazard Ratio')
title('Hazard Ratio for Male')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment