datadist() in Design library

3 messages Options
Embed this post
Permalink
array chip

datadist() in Design library

Reply Threaded More More options
Print post
Permalink

Hi I got an error message using datadist() from Design package:

> library(Design,T)
> dd <- datadist(beta.final)          
> options(datadist="dd")
> lrm(Disease ~ gsct+apcct+rarct, x=TRUE, y=TRUE)
Error in eval(expr, envir, enclos) : object "Disease" not found

All variables inclduing response variable "Disease" are in the data frame "beta.final", why then "Disease" can not be found? I thought with datadist(), all variables are presented to the model fitting functions. maybe I am wrong?

thanks

John

______________________________________________
[hidden email] 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.
Jorge Ivan Velez

Re: datadist() in Design library

Reply Threaded More More options
Print post
Permalink
Dear John,
Have you tried it specifying the 'data' argument as suggested in lrm help?

Try this:

 lrm(Disease ~ gsct + apcct + rarct,  data = beta.final, x = TRUE,  y = TRUE
)

HTH,

Jorge


On Thu, Jul 9, 2009 at 6:46 PM, array chip <[hidden email]> wrote:

>
> Hi I got an error message using datadist() from Design package:
>
> > library(Design,T)
> > dd <- datadist(beta.final)
> > options(datadist="dd")
> > lrm(Disease ~ gsct+apcct+rarct, x=TRUE, y=TRUE)
> Error in eval(expr, envir, enclos) : object "Disease" not found
>
> All variables inclduing response variable "Disease" are in the data frame
> "beta.final", why then "Disease" can not be found? I thought with
> datadist(), all variables are presented to the model fitting functions.
> maybe I am wrong?
>
> thanks
>
> John
>
> ______________________________________________
> [hidden email] 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.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
array chip

Re: datadist() in Design library

Reply Threaded More More options
Print post
Permalink
In reply to this post by array chip

Dear Jorge, Yes, with "data=beta.final" in the lrm(), it worked. But I thought one of the reasons for datadist() is to make it unnecessary to specify the data frame in the lrm(). Maybe I am completely wrong here.

Thanks

John

--- On Thu, 7/9/09, Jorge Ivan Velez <[hidden email]> wrote:

> From: Jorge Ivan Velez <[hidden email]>
> Subject: Re: [R] datadist() in Design library
> To: "array chip" <[hidden email]>
> Cc: "R mailing list" <[hidden email]>
> Date: Thursday, July 9, 2009, 6:55 PM
> Dear John,
> Have you tried it specifying the 'data'
> argument as suggested in lrm help?
> Try this:
>  lrm(Disease ~ gsct +
> apcct + rarct,  data = beta.final, x
> = TRUE,  y = TRUE)
>
>
> HTH,
> Jorge
>
> On Thu, Jul 9, 2009 at 6:46 PM,
> array chip <[hidden email]>
> wrote:
>
>
>
>
> Hi I got an error message using datadist() from Design
> package:
>
>
>
> > library(Design,T)
>
> > dd <- datadist(beta.final)
>
> > options(datadist="dd")
>
> > lrm(Disease ~ gsct+apcct+rarct, x=TRUE, y=TRUE)
>
> Error in eval(expr, envir, enclos) : object
> "Disease" not found
>
>
>
> All variables inclduing response variable
> "Disease" are in the data frame
> "beta.final", why then "Disease" can not
> be found? I thought with datadist(), all variables are
> presented to the model fitting functions. maybe I am wrong?
>
>
>
>
>
> thanks
>
>
>
> John
>
>
>
> ______________________________________________
>
> [hidden email]
> 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.
>
>
>
>




______________________________________________
[hidden email] 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.