What type of line does the "smooth" line plot with Scatr??

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
Kaim
Posts: 2
Joined: Sat Nov 12, 2022 3:41 pm

What type of line does the "smooth" line plot with Scatr??

Post by Kaim »

I'm looking to know what type of fitted line the "smooth" line is when one makes a scatterplot in Scatr. It seems to be a Loess regression, but does not specify. Hope someone can clarify :)
User avatar
MAgojam
Posts: 421
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Re: What type of line does the "smooth" line plot with Scatr

Post by MAgojam »

Hey Kaim,
I saw you asked Ravi this question on GitHub as well.

You were already there and didn't think about taking a look at the code.
Do it now:
https://github.com/raviselker/scatr/blo ... .R#L57-L58

As you can see, there is a function call ggplot2::geom_smooth(), with the method to use.
Which method it will use can be found a few lines above (row: 41).
Having chosen the Smooth option for "Regression Line", the method will be 'auto'.
This results in the loess method and formula.
If the messages weren't purposely suppressed (row: 43), there would be a message like this

Code: Select all

`geom_smooth()` using method = 'loess' and formula 'y ~ x'
Cheers,
Maurizio
Kaim
Posts: 2
Joined: Sat Nov 12, 2022 3:41 pm

Re: What type of line does the "smooth" line plot with Scatr

Post by Kaim »

Salve Maurizio,

Grazie tanto per la riposta. I thought to ask here too since there didn't seem to be much activity on Ravi's Github page. Thanks very much for the clear explanation to someone new to Jamovi!

Best,
Kai
Post Reply