[R] newbie problem using Design.rcs
sp
to_rent_2000 at yahoo.com
Tue Dec 23 23:26:09 CET 2008
Dr. Harrell,
Thanks for your patient replies. I've two more questions:
1) Is your book appropriate for beginners or is it more for advanced users?
2) f <- ols(y ~ rcs(x,3), data=mydata)
Function(f)
does not produce anything for me (i.e.) it's empty.
Sincerely,
sp
--- On Tue, 12/23/08, Frank E Harrell Jr <f.harrell at vanderbilt.edu> wrote:
> From: Frank E Harrell Jr <f.harrell at vanderbilt.edu>
> Subject: Re: [R] newbie problem using Design.rcs
> To: to_rent_2000 at yahoo.com
> Cc: "David Winsemius" <dwinsemius at comcast.net>, r-help at r-project.org
> Date: Tuesday, December 23, 2008, 4:57 PM
> sp wrote:
> > 2. I didn't have x^3 b/c that co-efficient happens
> to be zero in this fitting.
>
> That's strange.
>
> >
> > Also, I'm forced to call win.graph() before my
> first plot() to see the first plot. Is that normal?
>
> no
>
> >
> > I started with testing it on just x,y dimensions so
> that I can visually evaluate the fitting. I tried y=x, y=x^2
> etc, adding Gaussian noise each time (to the y).
> > I plot original x,y and x,y' where y' is
> calculated using the co-efficients returned by rcs. I find
> that the regression curve differs from the actual points by
> as high as 10^5 with 3 knots and roughly -10^5 with 4 knots
> as I make y=x^2, y=x^3....
>
> wait until you have studied regression
>
> Frank
>
>
> >
> > If this is NOT a good way to test fitting, could you
> pls tell me a better way?
> >
> > Respectfully,
> > sp
More information about the R-help
mailing list