Hi All
I am trying to get a density plot of the "p" variable which ranges from 0 to around 0.6. There are 8500 observations (please see attached data file). I used both ggplot and lattice. The Y-axis of the output graphs in both the options range from 0 to 100+. Is that possible? I assume that the density is bounded by 1 - which means the Y-axis can range at most from 0 to 1.
psplot <- ggplot(data, aes(x = p, color = flex2, fill = flex2)) + geom_density(alpha=.2) +
ylab("Density") + xlab("Propensity Scores")
The output graph is also attached.
Thanks for your help.