Message-ID: <49C9110C.1090104@statistik.tu-dortmund.de>
Date: 2009-03-24T16:57:48Z
From: Uwe Ligges
Subject: Display Equation on plot
In-Reply-To: <49C90F6E.4060302@metstat.com>
Douglas M. Hultstrand wrote:
> Hello,
>
> I am using the lm to fit a linear model to data, I was wondering if
> there is a way to display the equation on a plot using the extracted lm
> coefficients? I am using the plot() function to create the plot/.png.
>
> Example:
> lm_mod <- lm(data1~data2)
>
> intercept = 48.54
> slope = 0.4856
>
> I want to display equation on a plot as y=0.4856x+48.54
>
> Any thoughts or suggestions are appreciated.
See ?abline:
abline(lm_mod)
Uwe Ligges
> Thanks,
> Doug
>