[R] Trendline and R square value
Peter Ehlers
ehlers at ucalgary.ca
Mon Sep 28 14:13:19 CEST 2009
Maria,
Does rq() provide an R2? Anyway, have a look at ?text.
-Peter Ehlers
Lathouri, Maria wrote:
> Hi
>
> I would like to display the trendline and the R-square value in a xy scatter in R. For example if I want to plot f vs g I add the trendline using the commands below
>
>> library(quantreg)
>> plot(f,g)
>> abline(rq(g~f))
>
> however I don't know how to display the R2 in the graph.
>
> Thank you in advance.
>
> Kind regards
> Maria
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org 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.
>
>
More information about the R-help
mailing list