Displaying 1 result from an estimated 1 matches for "tp4646891p4646953".
2012 Oct 20
1
rms plot.Predict question: swapping x- and y- axis for categorical predictors
Hello all,
I'm trying to plot the effects of variables estimated by a regression model
fit individually, and for categorical predictors, the independent variable
shows up on the y-axis, with the dependent variable on the x-axis. Is there
a way to prevent this reversal?
Sample code with dummy data:
# make dummy data
set.seed(1)
x1 <- runif(200)
x2 <- sample(c(1,2),200, TRUE)
x3 <-