Trying to do run this code:
A <- gnm(wigooutwi ~ -1 + Dref(as.factor(domx$Womaneduc),as.factor(domx$Husbandeduc)),family = binomial, data = domx)
But the error I got is
Error in baseMatrix[, factorAssign == i] <- termTools[[i]] :
number of items to replace is not a multiple of replacement length
How can I fix this?
/
This is my whole code:
install.packages("xlsx")
library(readxl)
domx <- read_excel("C:/Users/../Desktop/domx.xlsx")
View(domx)
install.packages("gnm")
require(gnm)
set.seed(1)
classMobility <- gnm(wigooutwi ~ -1 + Dref(as.function((domx$Womaneduc),as.function(domx$Husbandeduc)),family = binomial, data = domx)
domx$neglectch +domx$argueswhu + domx$refuhsex + domx$burnsfood
/
And the data is 0,1 and 2's.