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

Error in model.frame.default(weights, data = list(OUTCOME = c(1, 1, 1, : object is not a matrix #12

Open
b-w-a opened this Issue Feb 3, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@b-w-a
Copy link

b-w-a commented Feb 3, 2019

Cannot get past this error code and not sure what the issue is. Tried lots of things to match some of the formatting of the 'immigration' data set, but cant get anything to work. I stacked 4 data.frames exported from read.qualtrics where I added a group variable based off race/ethnic group.

Happy to send the data directly, but don't to post here.

Put your code here:

## load package
library("cregg")

model <- selected ~ Convenience + Crime + Housing.Cost + Neighborhood.Composition +
  Neighborhood.Quality + School.Quality + Type.of.Place

out <- cj(df, model, id = ~ Response.ID, estimate = "mm", by ~ group)


## session info for your system
sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6
@leeper

This comment has been minimized.

Copy link
Owner

leeper commented Feb 4, 2019

Is this the exact code? Are you just missing an = in by = ~ group?

@b-w-a

This comment has been minimized.

Copy link

b-w-a commented Feb 4, 2019

Ok, well that solved that problem! I had that in earlier code and still could not get it to run. Now when I run the code I get Error in fix.by(by.y, y) : 'by' must specify a uniquely valid column

However, that is only when i read the data in from a .csv using read.csv. When I stack the object from read.qualtrics, I don't have the issue. Thanks for your help, I got it working.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment