We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi
I made lovely plots from a YouTube tutorial (new to R) and when I reopened my file, the script returned an error.
Can you help please, I have been googling for hours?
require(ggplot2) require(mediation) library(flexplot)
data= (Data_analysis_moderation) names(Data_analysis_moderation)
#step two: predict the mediator with the variable of interest
mediate_model = lm(CIT_TEAQGestation_, data=Data_analysis_moderation) summary(mediate_model) require(flexplot) visualize(mediate_model) #step 3:fit the whole model full_model = lm(PHQ_ScoreCIT_TEAQ + Gestation_, data = Data_analysis_moderation) summary(full_model) results = mediate(mediate_model, full_model, treat = 'Gestation_', mediator = "CIT_TEAQ",boot = TRUE, sims=500) summary(results)
error:
x
Backtrace: ▆
└─flexplot::flexplot(...)
└─flexplot:::flexplot_modify_data(...)
└─flexplot:::flexplot_convert_to_categorical(data, axis)
└─base::factor(data[, axis[1]], ordered = T)
├─base::unique(as.character(y)[ind])
├─base::as.character(y)
└─vctrs:::as.character.vctrs_vctr(y)
Run rlang::last_trace(drop = FALSE) to see 11 hidden frames.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi
I made lovely plots from a YouTube tutorial (new to R) and when I reopened my file, the script returned an error.
Can you help please, I have been googling for hours?
require(ggplot2)
require(mediation)
library(flexplot)
data= (Data_analysis_moderation)
names(Data_analysis_moderation)
#step two: predict the mediator with the variable of interest
mediate_model = lm(CIT_TEAQ
Gestation_, data=Data_analysis_moderation)CIT_TEAQ + Gestation_, data = Data_analysis_moderation)summary(mediate_model)
require(flexplot)
visualize(mediate_model)
#step 3:fit the whole model
full_model = lm(PHQ_Score
summary(full_model)
results = mediate(mediate_model, full_model, treat = 'Gestation_', mediator = "CIT_TEAQ",boot = TRUE, sims=500)
summary(results)
error:
! Can't convert
x
<haven_labelled> to .Backtrace:
▆
Run rlang::last_trace(drop = FALSE) to see 11 hidden frames.
The text was updated successfully, but these errors were encountered: