Dear Rui, Thanks it works!
Best,
Hana
On 6/15/22, Rui Barradas wrote:
> Hello,
>
> With ggplot it's easy, add color = id and coord_flip().
>
>
> ggplot(ORCI, aes(id, OR, color = id)) +
>geom_point() +
>geom_errorbar(aes(ymin = `2.5 %`, max = `97.5 %`)) +
>coord_flip() +
>theme_bw()
Dear Rui, thanks a lot, dose it possible to have the horizontal line
for scale OR value on Y axis and different color for entire box plots
?
Best,
Hana
On 6/15/22, Rui Barradas wrote:
> Hello,
>
> To extract all but the first 2 rows, use a negative index on the rows.
> I will also coerce to data
Hello,
To extract all but the first 2 rows, use a negative index on the rows.
I will also coerce to data.frame and add a id column, it will be needed
to plot the confidence intervals.
ORCI <- exp(cbind(OR = coef(model ), confint(model )))[-(1:2), ]
ORCI <- cbind.data.frame(ORCI, id = row.name
sample_data =
read.table("http://freakonometrics.free.fr/db.txt",header=TRUE,sep=";";)
head(sample_data)
model = glm(Y~0+X1+X2+X3,family=binomial,data=sample_data)
summary(model)
exp(coef(model ))
exp(cbind(OR = coef(model ), confint(model )))
I have the aove sample data on logistic regression wit
4 matches
Mail list logo