hadley wickham | 1 Oct 2007 01:24
Picon
Gravatar

Re: Graphics and LaTeX documents with the same font [double-Y-axis graphs]

> Thanks for trying this, Hadley, because the comparison
> is instructive in terms of the difference between the
> communication goals of analysis and presentation graphs.

Yes, and I think it's a difference that not enough people are familiar with.

> Actually, one should regard income as the independent variable,
> deaths as response, so what you want is
>
>  > ggplot(csr, aes(y=deaths, x=income)) +
> + geom_path(colour="grey80") + geom_point()
>  >
> but, instead of/in addition to geom_path, a bolder loess smooth
> would show the trend better.

+ geom_smooth()
will add a loess smooth to the above plot.

> This does, indeed show the inverse, and non-linear relation
> between welfare income and deaths more directly, a few outliers.
> Good for an analysis graph, but it fails the Interocular Traumatic
> Test for a presentation graph-- the message should hit you between
> the eyes.

But unless you trust the source of the presentation graph, one needs
the analysis graph to be sure that IOT isn't caused by manipulation of
the data.

Hadley
--

-- 
(Continue reading)

hadley wickham | 1 Oct 2007 02:41
Picon
Gravatar

Re: plot graph with error bars trouble

On 9/30/07, jiho <jo.irisson <at> gmail.com> wrote:
> On 2007-September-30  , at 22:40 , hadley wickham wrote:
> >> hadley wickham wrote:
> >>> [...]
> >> PS if one specifies "errorbars" without specifying min and max one
> >> gets
> >> the error
> >>
> >> Error in rbind(max, max, max, min, min, min) :
> >>         cannot coerce type closure to list vector
> >>
> >>   perhaps a more transparent error message could be supplied in this
> >> (admittedly
> >> stupid-user-error-obvious-in-hindsight) case?
> >
> > Yes, that's a good idea.  I'm still working on making the error
> > messages more user friendly.  I think I'm making some progress, but
> > it's fairly slow.
>
> BTW, have you thought about opening ggplot2 development (provide a
> way to check out the dev code and have the possibility to submit
> patches at least) or do you prefer to keep it a personal project for
> now? I don't know how intricate your research and the development of
> ggplot2 are and would understand that you want to keep in 100% hadley
> wickham if you are to be judged on it academically. But boring work
> such as improving error messages, writing documentation and chasing
> small bugs is probably more efficiently done by a team than by a
> single person, with little free time. Furthermore, most of these
> things can be done without deep knowledge of the architecture of
> ggplot2.
(Continue reading)

Gabor Grothendieck | 1 Oct 2007 03:15
Picon

Re: plot graph with error bars trouble

On 9/30/07, hadley wickham <h.wickham <at> gmail.com> wrote:
> On 9/30/07, jiho <jo.irisson <at> gmail.com> wrote:
> > On 2007-September-30  , at 22:40 , hadley wickham wrote:
> > >> hadley wickham wrote:
> > >>> [...]
> > >> PS if one specifies "errorbars" without specifying min and max one
> > >> gets
> > >> the error
> > >>
> > >> Error in rbind(max, max, max, min, min, min) :
> > >>         cannot coerce type closure to list vector
> > >>
> > >>   perhaps a more transparent error message could be supplied in this
> > >> (admittedly
> > >> stupid-user-error-obvious-in-hindsight) case?
> > >
> > > Yes, that's a good idea.  I'm still working on making the error
> > > messages more user friendly.  I think I'm making some progress, but
> > > it's fairly slow.
> >
> > BTW, have you thought about opening ggplot2 development (provide a
> > way to check out the dev code and have the possibility to submit
> > patches at least) or do you prefer to keep it a personal project for
> > now? I don't know how intricate your research and the development of
> > ggplot2 are and would understand that you want to keep in 100% hadley
> > wickham if you are to be judged on it academically. But boring work
> > such as improving error messages, writing documentation and chasing
> > small bugs is probably more efficiently done by a team than by a
> > single person, with little free time. Furthermore, most of these
> > things can be done without deep knowledge of the architecture of
(Continue reading)

Irene Mantzouni | 1 Oct 2007 03:52
Picon

non-linear model parameterization

Dear all,

I would like to fit a non-linear model of the form:
y=g*x/(a+b*x)
with nls().
However this model is somehow overparameterized and I get the error message about
singular gradient matrix at initial parameter estimates.
What I am interested in is to make inference about parameters b and g, so this has to be taken into account in
the model formulation. 
What options do I have?
Also, how is it possible to fit a partially linear model? 

Thank you!!

Irene Mantzouni
----------------
PhD student
DIFRES

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

Gabor Grothendieck | 1 Oct 2007 04:08
Picon

Re: non-linear model parameterization

The model is not identifiable since if (a, b, g) is a solution then
so is every multiple of it.

On 9/30/07, Irene Mantzouni <ima <at> difres.dk> wrote:
> Dear all,
>
> I would like to fit a non-linear model of the form:
> y=g*x/(a+b*x)
> with nls().
> However this model is somehow overparameterized and I get the error message about
> singular gradient matrix at initial parameter estimates.
> What I am interested in is to make inference about parameters b and g, so this has to be taken into account in
the model formulation.
> What options do I have?
> Also, how is it possible to fit a partially linear model?
>
> Thank you!!
>
> Irene Mantzouni
> ----------------
> PhD student
> DIFRES
>
> ______________________________________________
> 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.
>

(Continue reading)

Luis Guillermo Diaz Monroy | 1 Oct 2007 04:27
Picon

Reenviar: variables selection in Aalen and Cox model


   Luis Guillermo Díaz Monroy
   Profesor Asociado Departamento de Estadística
   Universidad Nacional de Colombia
Picon
From: Luis Guillermo Diaz Monroy <lgdiazm <at> unal.edu.co>
Subject: variables selection in Aalen and Cox model
Date: 2007-09-29 12:57:55 GMT

   Dear members of R community,

   I  want  to know about the R procedures (or routines) to carry out the
   selection of covariates in an Aalen or
   cox model, respectively.

   Thanks a lot
   Luis Guillermo Díaz Monroy
   Profesor Asociado Departamento de Estadística
   Universidad Nacional de Colombia
______________________________________________
R-help <at> r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
(Continue reading)

John Sorkin | 1 Oct 2007 04:45

3-dimensional graph

Windows XP
R 2.3.1

I have a funciton
fit1<-lm(y~x+z)
Is there a function that will produce a 3-dimensional plot of y,x,z?

I looked at the help files, but did not find a clean answer to my question.

Thanks,
John

John 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)

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

______________________________________________
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.
(Continue reading)

Moshe Olshansky | 1 Oct 2007 04:51
Picon
Favicon

Re: non-linear model parameterization

Hi Irene,

In this case the computer is right - your gradient is
really singular!
If you scale all you parameters (g,a and b) by any
nonzero constant c nothing changes, meaning that there
is a "degree of freedom" and this causes the gradient
to be singular.
You can check whether g = 0 (and then y = 0) is good.
If not, assume that g != 0 and divide both numerator
and denominator by g to get y = x/(A + B*x) where A =
a/g, B = b/g.
Now your gradient should not be singular.
Formally, if y = x/(A + B*x) then 1/y = A/x + B or 
y' = B + A*x' where y' = 1/y and x' = 1/x, and this is
a linear model! You certainly can not use it to
estimate A and B, but you can try to use the values
for A and B you get as an initial estimate for nls for
the original model (if you do not have a better
starting point).

Regards,

Moshe.

--- Irene Mantzouni <ima <at> difres.dk> wrote:

> Dear all,
>  
> I would like to fit a non-linear model of the form:
(Continue reading)

John Sorkin | 1 Oct 2007 04:51

data structure with coefficients, and call from lm()

Widows XP
R 2.3.1

I have been trying to make a data structure that will contain both the coefficients from a linear regression
along with column and row titles AND the call, i.e.
myreg<-lm(y~x+y+z)
whatIwant<-cbind(c(summary(myreg)$call,"",""),summary(myreg)$coefficients)

Neither the statement above, nor any one of twenty variations I have tried work. I would appreciate any advice.
Thanks,
John

John 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)

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

______________________________________________
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.
(Continue reading)

jim holtman | 1 Oct 2007 04:56
Picon

Re: 3-dimensional graph

There are many.  Check out the 'rgl' package to see an interactive
version of 3D plots.

On 9/30/07, John Sorkin <jsorkin <at> grecc.umaryland.edu> wrote:
> Windows XP
> R 2.3.1
>
> I have a funciton
> fit1<-lm(y~x+z)
> Is there a function that will produce a 3-dimensional plot of y,x,z?
>
> I looked at the help files, but did not find a clean answer to my question.
>
> Thanks,
> John
>
> John 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)
>
> Confidentiality Statement:
> This email message, including any attachments, is for the so...{{dropped}}
>
> ______________________________________________
(Continue reading)


Gmane