I try to calculate the odds ratios and p-values for continuous and categorical predictors at a specific unit of change (e.g. odds ratio for a change of 10 years, not 1 year) of a multiple logistic regression model.
my test data:
data <- tibble(age=c(50,49,13,20,100,80,25,110,25,25,13,54,23,45,27,87,55,22), dose=c(400,800,800,200,100,450,400,432,543,3245,654,554,64,356,543,321,356,432), class=c(0,1,1,0,0,1,0,1,1,1,0,0,0,1,0,1,0,1))
dd <- datadist(data); options(datadist='dd') g <- lrm(class ~ age+dose, data=data)
What I tried:
From https://stackoverflow.com/questions/24627237/convert-odds-ratio-of-unit-change-to-whole-range I learned that I could calculate the odds ratio for a specific unit of change with:
#calculate odds ratio of age for a multiple of 10 years (10-units-change) unit.change=c(10) exp(coef(g)["age"]*unit.change)
I do not know how to calculate a p-value for this odds ratio now.
gives me p-values for the beta coefficients, can I use these p-values?
From https://www.rdocumentation.org/packages/rms/versions/3.1-0/topics/summary.rms I learned that
summary.rms calculates inter-quartile range effects. Can I somehow use
summary.rms to calculate odds ratios at specific unit of change (and corresponding p-values) for every predictor? (my real data has multiple categorical and continuous predictors...).