To further the understanding of the loess fit and how the tricube weight
work you may want to look at the loess.demo function in the TeachingDemos
package.  It will create a scatterplot of the data and show the loess fit,
then when you click on the plot it will show the weights used for
predicting at that point and the fitted line/curve for that point. Click at
another place in the graph and it will show the weights and local fit
corresponding to that point.


On Tue, Jan 8, 2013 at 9:24 PM, Joyce Lin <joyceli...@gmail.com> wrote:

> Thank you Mr Gunter!  I will look into it.
>
>
> On Wed, Jan 9, 2013 at 11:59 AM, Bert Gunter <gunter.ber...@gene.com>
> wrote:
>
> > As this does not seem to have been answered...
> >
> > I believe you may misunderstand how loess works. The tricube weights
> > are part of the smoothing algorithm and change with each local fit,
> > not fixed weights for observations, which is what the "weights"
> > argument provides (and initially multiplies the tricube weight, IIRC).
> >
> > I suggest you consult
> >
> > ?predict.loess
> >
> > to get standard deviations of fitted values at existing or new points.
> >
> > -- Bert
> >
> >
> >
> > On Tue, Jan 8, 2013 at 12:57 AM, Joyce Lin <joyceli...@gmail.com> wrote:
> > > Hi
> > >
> > > I am trying to get the tricube weights from the loess outputs as I need
> > to
> > > calculate an error function which requires the weight.
> > >
> > > So I have used the following example from the R:
> > >
> > > cars.lo <- loess(dist ~ speed, cars, span=0.5, degree=1,
> > family="symmetric")
> > >
> > > Then i try to get the weights:
> > >
> > > cars.lo$weights
> > >  [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> 1
> > 1 1
> > > 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> > >
> > > The results are all 1 so i dont think that the tricube weighting are
> set.
> > > May I know what other parameters do i need to tweak to set the weights
> to
> > > tricube weights? Thank you.
> > >
> > >
> > > --
> > > Best regards
> > > Joyce Lin
> > >
> > >         [[alternative HTML version deleted]]
> > >
> > > ______________________________________________
> > > R-help@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.
> >
> >
> >
> > --
> >
> > Bert Gunter
> > Genentech Nonclinical Biostatistics
> >
> > Internal Contact Info:
> > Phone: 467-7374
> > Website:
> >
> >
> http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm
> >
>
>
>
> --
> Best regards
> Joyce Lin
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@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.
>



-- 
Gregory (Greg) L. Snow Ph.D.
538...@gmail.com

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to