[R] about fitting a regression line
lily li
chocold12 at gmail.com
Thu Jun 15 01:28:18 CEST 2017
Thanks. I thought lm() function is for linear model, such as the
correlation below:
Y= aX + b
On Wed, Jun 14, 2017 at 5:25 PM, MacQueen, Don <macqueen1 at llnl.gov> wrote:
> Start with the lm() function; i.e., see
>
> ?lm
>
> -Don
>
> --
> Don MacQueen
>
> Lawrence Livermore National Laboratory
> 7000 East Ave., L-627
> Livermore, CA 94550
> 925-423-1062
>
>
> On 6/14/17, 3:40 PM, "R-help on behalf of lily li" <
> r-help-bounces at r-project.org on behalf of chocold12 at gmail.com> wrote:
>
> Hi R users,
>
> I have some data points (Xi, Yi), and they may follow such a pattern
> Yi =
> cCOS(Xi) + d, how to find the c and d in R? which function to use?
> Also,
> how to get the R2 and p value for this correlation? Thanks for any
> kind of
> help.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>
>
>
[[alternative HTML version deleted]]
More information about the R-help
mailing list