В Thu, 23 Mar 2023 19:48:40 +0530
Anupam Tyagi <anupty...@gmail.com> пишет:

> lines(loess(si_pov_gini ~ ny_gnp_pcap_pp_kd, gini_pci_wdi_narm))

lines() on an object of class "loess" ends up calling
lines.default(...), which uses xy.coords(...) to obtain the points to
plot, which, in turn, ends up extracting the $x and $y components from
the list returned by loess(). The structure of the "loess" object is
_not_ documented, but it turns out that the $x and the $y components
are the source data points which were originally used to fit the model,
not the smooth predictions.

Solution: use predict() on the loess object in order to obtain the
smooth predictions.

-- 
Best regards,
Ivan

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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