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,
thank you in advance for having a look at it. We are currently writing functions for internal use, that can plot the model predicitions considering only a single independent variable to vary. I understand that modelbased is providing these functions already, but I am having some issues when trying them.
According to my understanding the above described intention should be carried out accordingly:
fit <- lm(mpg ~ cyl + disp + gear, data = mtcars)
result <- estimate_means(fit, by = "disp", fixed = c("cyl", "gear"))
plot(result)
Unfortunately, when I run this I get the following error:
Error in rlang::sym():
! Can't convert a character vector to a symbol.
I tried other plotting options like:
result <- estimate_relation(fit)
plot(result)
where I get the following error:
Error in geom_from_list():
! Problem while computing aesthetics.
ℹ Error occurred in the 2nd layer.
Caused by error:
! object 'interaction(gear, disp)' not found
Of course the plot cannot easily depict the prediction with respect to four variables, but I cannot find out how to select the variables that should be considered for plotting.
Another approach I tried is:
result <- estimate_expectation(fit)
plot(result)
where I get the same error as before:
Error in geom_from_list():
! Problem while computing aesthetics.
ℹ Error occurred in the 2nd layer.
Caused by error:
! object 'interaction(gear, disp)' not found
I find it kind strange that for the last two examples the interaction(gear,disp) object is required even though my model does not contain any interactions and I am also wondering why it is focusing on only this interaction.
I look forward to your response!
The text was updated successfully, but these errors were encountered:
Hello,
thank you in advance for having a look at it. We are currently writing functions for internal use, that can plot the model predicitions considering only a single independent variable to vary. I understand that modelbased is providing these functions already, but I am having some issues when trying them.
According to my understanding the above described intention should be carried out accordingly:
Unfortunately, when I run this I get the following error:
Error in
rlang::sym()
:! Can't convert a character vector to a symbol.
I tried other plotting options like:
where I get the following error:
Error in
geom_from_list()
:! Problem while computing aesthetics.
ℹ Error occurred in the 2nd layer.
Caused by error:
! object 'interaction(gear, disp)' not found
Of course the plot cannot easily depict the prediction with respect to four variables, but I cannot find out how to select the variables that should be considered for plotting.
Another approach I tried is:
where I get the same error as before:
Error in
geom_from_list()
:! Problem while computing aesthetics.
ℹ Error occurred in the 2nd layer.
Caused by error:
! object 'interaction(gear, disp)' not found
I find it kind strange that for the last two examples the interaction(gear,disp) object is required even though my model does not contain any interactions and I am also wondering why it is focusing on only this interaction.
I look forward to your response!
The text was updated successfully, but these errors were encountered: