Hi!
Thanks for the response. I checked and it doesn't have a column with Probability. Not sure if this will help but this is the code i had entered prior to there. Apologies but i am still in the novice stage so I appreciate the help.
newdata5 <- with(data,
data.frame(EvCameron_NoNa =rep(seq(from = 1, to = 10,
length.out = 100), 4),
employmentdum = mean(employmentdum, na.rm = TRUE),
rsex_fac = factor(rep(1:2, each=100))))
head(newdata5)
newdata6 <- melt(newdata5,
id.vars = c("EvCameron_NoNa", "employmentdum", "rsex_fac"),
variable.name = "Level",
value.name = "Probability")
head(newdata6)
newdata6$rsex <- as.factor (mapvalues(newdata6$rsex_fac,
from = c("1", "2"),
to = c ("1. Male", "2. Female")))