### "Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...)..." in Ordered Logit R2MLwiN

Posted:

**Tue Mar 05, 2019 1:46 am**Hello

I am now building an Ordered Logit Model. My DV is 3 category response (0 = no support, 1 = 1 type of support, 2 = multiplex; Reference = 0). The IGLS worked. Both single-level models using IGLS and MCMC worked as well. However, when trying the MCMC I got the following error.

Below are the code for both Variance Component Models.

"Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :

0 (non-NA) cases"

# ============= Variance Component Ordered Logit with IGLS ============================== =

m2 = logit(AltMultiplexSupport) ~ 1 + (1 [1:2] | EgoIdentifier)

(VarCompMCMCIgls <- runMLwiN(Formula = m2, D = "Ordered Multinomial", data = RomaAllData2))

# ============= Variance Component Ordered Logit with MCMC ============================== =

m3 = logit(AltMultiplexSupport) ~ 1 + (1 [1:2] | EgoIdentifier)

(VarCompMCMC <- runMLwiN(Formula = m3, D = "Ordered Multinomial", data = RomaAllData2,

estoptions = list(EstM = 1)))

I double checked whether I have missing values in my DV and I don't.

What can I do?

One more question. I read in Browne (2015) "MCMC manual for MLwiN 2.32" that I

I am now building an Ordered Logit Model. My DV is 3 category response (0 = no support, 1 = 1 type of support, 2 = multiplex; Reference = 0). The IGLS worked. Both single-level models using IGLS and MCMC worked as well. However, when trying the MCMC I got the following error.

Below are the code for both Variance Component Models.

"Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :

0 (non-NA) cases"

# ============= Variance Component Ordered Logit with IGLS ============================== =

m2 = logit(AltMultiplexSupport) ~ 1 + (1 [1:2] | EgoIdentifier)

(VarCompMCMCIgls <- runMLwiN(Formula = m2, D = "Ordered Multinomial", data = RomaAllData2))

# ============= Variance Component Ordered Logit with MCMC ============================== =

m3 = logit(AltMultiplexSupport) ~ 1 + (1 [1:2] | EgoIdentifier)

(VarCompMCMC <- runMLwiN(Formula = m3, D = "Ordered Multinomial", data = RomaAllData2,

estoptions = list(EstM = 1)))

I double checked whether I have missing values in my DV and I don't.

What can I do?

One more question. I read in Browne (2015) "MCMC manual for MLwiN 2.32" that I

**must**first run every model with IGLS in order to obtain the appropriate starting values for MCMC? I just want to confirm this.