[R] How to plot vertical line

David Barron mothsailor at googlemail.com
Sat Jun 9 22:38:46 CEST 2007


abline(v=c(intercept1,intercept2,intercept3))

On 09/06/07, adschai at optonline.net <adschai at optonline.net> wrote:
> Hi,I have a result from polr which I fit a univariate variable (of ordinal data) with probit function. What I would like to do is to overlay the plot of my fitted values with the different intercept for each level in my ordinal data. I can do something like:lines(rep(intercept1, 1000), seq(from=0,to=max(fit),by=max(fit)/1000))where my intercept1 is, for example, the intercept that breaks between y=1 and y=2 labels and the max(fit) is the maximum of overall fitted values or maximum of all ordinal y labels. I'm wondering if there is better way to do this? If you could let me know, I would really appreciated. Thank you.- adschai
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>


-- 
=================================
David Barron
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP



More information about the R-help mailing list