The names of the regressions can be placed on the y-axis using the vertical
option in coefplot()
function in R. The vertical
option specifies the position of the coefficients relative to the y-axis, and can take one of the following values:
"horizontal"
: for horizontal orientation"vertical"
(default): for vertical orientationTo place the names of the regressions on the y-axis, set vertical = "horizontal"
in the coefplot()
function. For example:
library(coefplot) # create example model data(mtcars) model <- lm(mpg ~ wt + hp + qsec, data = mtcars) # plot coefficients with names on y-axis coefplot(model, vertical = "horizontal", main = "Coefficients of model")
This will create a plot of the coefficients with the names of the regressions on the y-axis, as shown below:
Note that if the names of the regressions are long, they may not fit on the y-axis and may overlap with other labels. In such cases, it may be necessary to adjust the size or orientation of the plot, or to shorten the names of the regressions.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-05-26 11:00:00 +0000
Seen: 1 times
Last updated: Jul 03 '21