Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 0 (non-NA) cases but there is NO NA

$
0
0

I've got a really annoying problem that I tried to solve multiple days but I wasn't able. The code that I want to run is the following:

subsample2 <- as.data.frame(subsample)

m.extremistvote <- ictreg.joint(formula = resid_model1 ~ stateofeconomy + self_placement_extreme +
                      interaction_resid_1 + age + education + income + electoral_system + election_loser +
                      polity_IV + module1 + module4,
                               J=3,
                               data=extremist2, 
                               treat="gender",
                               outcome="extremist_vote",
                               constrained=TRUE,
                               maxIter = 5000)
summary(m.extremistvote)

However, I keep getting the following error message:

Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 
  0 (non-NA) cases"

But I've got not clue why this is the case... my dataset has no missings. I've checked this with multiple commands in R and STATA. Additionally, I tried to solve it with variations of this:

na.action=na.omit

But I'm still getting the error. I planed to attach a subsample of my STATA dataset that I exported into Rdata but I don't know where I can attach or upload something. I will try to add it. If you have any questions or need more of my code, I'm happy to provide it.

If anyone could help me, I would be more than thankful...

Best wishes, Klara


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>