[R] Linear regression

John Sorkin jsorkin at grecc.umaryland.edu
Wed Nov 12 22:00:29 CET 2008


lm, for example:

fit1<-lm(y~x,data=mydata)

if you enter 
?lm 
in an R session you will get more information.
John

John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)

>>> "Dr. Alireza Zolfaghari" <ali.zolfaghari at gmail.com> 11/12/2008 3:56 PM >>>
Hi List,
Does anybody know what function I need to use for a simple regression?

Here is the data: I want to find the value for x1=3.5
data<-data.frame(x=c(1:30),Value=c(31:60))
x1<-3.5

Regards,
Alireza

	[[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.

Confidentiality Statement:
This email message, including any attachments, is for th...{{dropped:6}}



More information about the R-help mailing list