predicting ALT free flap thickness.
outcome : ALT thickness( continuous outcome)
predictors: age>50, gender, BMI>23(all binary factors)
the predictors were from a linear regression from SPSS
data imported from SPSS to R:
using rms package and following this link example ( Chapter 14 Multiple Imputation and Linear Regression | Data Science for Biological, Medical and Health Research: Notes for 432 (thomaselove.github.io)
-dd <- datadist(thickness_forR_1)
options(datadist = "dd")
-boxcox((ALT.ave + 1) ~ age50+ BMI23+ genderRE, data= thickness_forR_1)
thickness_forR_1 <- thickness_forR_1 %>%
mutate(ALT2 = log(ALT.ave + 1))
-fit.reg22<-ols(ALT2 ~ age50 + BMI23 + genderRE, data=thickness_forR_1, x = TRUE, y = TRUE)
summary(fit.reg22)
plot(summary(fit.reg22))
plot(nomogram(fit.reg22,
-
fun = list(function(x) exp(x) - 1),
-
funlabel = "ALT.thickness",
-
fun.at = seq(0, 30, 3)))
Error in nomogram(fit.reg22, fun = list(function(x) exp(x) - 1), funlabel = "ALT.thickness", :
duplicated variable labels: 0 1 0 1