Skip to content
Back to formatted view

Raw Message

Message-ID: <CAGxFJbQarrTEYTdRafc-MWdDJ9OpdZrMbqhffz3vwWSRr1KpQg@mail.gmail.com>
Date: 2016-05-23T11:44:19Z
From: Bert Gunter
Subject: meaning of lm( y~., data=mydat ), is it a language feature, is it documented, is it supported?
In-Reply-To: <5742B0A3020000CB001550DE@smtp.medicine.umaryland.edu>

It's about formula syntax, so ?formula documents it.

Bert

On Monday, May 23, 2016, John Sorkin <JSorkin at grecc.umaryland.edu> wrote:

>
> The syntax
> mydat <- data.frame( y,x )
> fit1 <- lm( y~., data=mydat )
> appears to perform a multivariable regression of y on every non-y variable
> in the data frame mydat. I can not find this syntax (y~.) in R
> documentation. Is y~. a supported feature of the R language? Where can I
> find it documented? I would hate to write code that is dependent on a
> non-supported, non-documented language feature.
> Thank you,
> John
> John David Sorkin M.D., Ph.D.
> Professor of Medicine
> Chief, Biostatistics and Informatics
> University of Maryland School of Medicine Division of Gerontology and
> Geriatric Medicine
> 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)
>
> Confidentiality Statement:
> This email message, including any attachments, is for ...{{dropped:25}}