You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm trying to plot 2 regression lines with their corresponding r2 values using groupby. I can get the lines to appear on the plot for the 2 groups but I'm not sure how to access the rSquared values for the 2 groups.
Code I have right now:
{
"regression": "y_column_name",
"on": "x_column_name",
"params": true,
"groupby": [
"groupby_column_name"
]
},
{
"calculate": "'R2:'+ format(datum.rSquared,'.2f')",
"as": "r2"
}
How do I modify datum.rSquared to access the 2 groups' values?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm trying to plot 2 regression lines with their corresponding r2 values using groupby. I can get the lines to appear on the plot for the 2 groups but I'm not sure how to access the rSquared values for the 2 groups.
Code I have right now:
{
"regression": "y_column_name",
"on": "x_column_name",
"params": true,
"groupby": [
"groupby_column_name"
]
},
{
"calculate": "'R2:'+ format(datum.rSquared,'.2f')",
"as": "r2"
}
How do I modify datum.rSquared to access the 2 groups' values?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions