Skip to content
New issue

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

Missing data and categorical M #7

Open
EmmHee opened this issue Jan 30, 2023 · 4 comments
Open

Missing data and categorical M #7

EmmHee opened this issue Jan 30, 2023 · 4 comments

Comments

@EmmHee
Copy link

EmmHee commented Jan 30, 2023

Dear Dr. Erin M. Buchanan,

Thank you very much for developing this R package and providing code, examples, and more! It is so educational and I appreciate it greatly.

My data suffers missing data (in the dv), and I think it is why get the following error:

Error in data.frame(..., check.names = FALSE) :
arguments imply differing number of rows: 122, 72
In addition: Warning messages:
1: In badmahal + badleverage :
longer object length is not a multiple of shorter object length
2: In badmahal + badleverage + badcooks :
longer object length is not a multiple of shorter object length

I did not manage to find an argument for excluding NAs; is that correct? Do you know if there is a way around this problem?

Furthermore, I wonder if the mediation1 function could be used for a categorical M? I have found the processR (catMediation)
package, but again no argument for omitting/excluding NAs.

Thank you very much for your time.

Best regards,
Emma

@doomlab
Copy link
Owner

doomlab commented Jan 30, 2023 via email

@EmmHee
Copy link
Author

EmmHee commented Jan 31, 2023

Thank you for your response! I will try it out.

Best regards,
Emma

@EmmHee
Copy link
Author

EmmHee commented Feb 4, 2023

Hi Erin!

I managed to do the mediation analysis with a categorical M. I used the tidyr package to remove the NAs ( %>% drop_na() ). Thank you again for your support!

@doomlab
Copy link
Owner

doomlab commented Feb 4, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants