From my understanding, the best way to deal with ordered ordinal data type is by applying the logistic regression.
library(mice) library(nnet) library(MASS) dat <- read.csv(file = 'data.csv') female <- dat$Em3 == 1 NaFm05 <- sum(female) * 0.05 dat$Em3[sample(which(female),NaFm05)]<-NA datImpute<-dat[,-1] ## to exclude the gender in the imputation process imp <-mice(datImpute, m=5, printFlag=FALSE, maxit = 30, seed=2525,meth='polr') fit <- with(imp, multinom(Perspective ~ Em1 + Em2 + Em3 + SN1+SN2+SN3+Ec1+Ec2+Ec3, model =T)) tab051 <- summary(pool(fit), conf.int = TRUE) ## do i need to include exponentiate = TRUE to calculate Odd ratio? tab051[-1] <- round(tab051[-1],3)
After I run this code, I guess the results are not sensible.. Do you have any suggestions to improve this code?
My another questions:
- is it possible if I apply the logistic regression for the imputation of missing data whilst for the analysis, I apply the linear regression?
- from my reading, to impute the ordered ordinal data, we need to perform factor() all relevant data. Is it true and compulsory?
- is it possible to apply PMM for imputation in a survey and apply linear regression for missing data analysis