marginal-effects

Is there a way of getting “marginal effects” from a `glmer` object

穿精又带淫゛_ 提交于 2019-11-30 06:18:27
I am estimating random effects logit model using glmer and I would like to report Marginal Effects for the independent variables. For glm models, package mfx helps compute marginal effects. Is there any package or function for glmer objects? Thanks for your help. A reproducible example is given below mydata <- read.csv("http://www.ats.ucla.edu/stat/data/binary.csv") mydata$rank <- factor(mydata$rank) #creating ranks id <- rep(1:ceiling(nrow(mydata)/2), times=c(2)) #creating ID variable mydata <- cbind(mydata,data.frame(id,stringsAsFactors=FALSE)) set.seed(12345) mydata$ran <- runif(nrow(mydata

marginal effects of mlogit in R

瘦欲@ 提交于 2019-11-29 08:41:44
I am new to R, and I don't understand yet completely the logic of its calculations... I cannot overcome my problem with the help from previous posts either. I have a data set of about 600 observations for 11 variables. I have successfully run the multinomial model on it, however I cannot achieve the marginal effects because my mean() command is getting NAs: The data set: > head(data,n=50) ID time CHINN DEBT ERA INFL MONEY OPENNESS RESERVES RGDP RSVS 1 POL 1993 -1.8639720 NA 0 32.8815343 33.47353 41.05223 4276726138 100.00000 4.2767261 2 POL 1994 -0.8081098 NA 0 30.7586977 31.98628 41.26984

marginal effects of mlogit in R

假装没事ソ 提交于 2019-11-28 02:07:50
问题 I am new to R, and I don't understand yet completely the logic of its calculations... I cannot overcome my problem with the help from previous posts either. I have a data set of about 600 observations for 11 variables. I have successfully run the multinomial model on it, however I cannot achieve the marginal effects because my mean() command is getting NAs: The data set: > head(data,n=50) ID time CHINN DEBT ERA INFL MONEY OPENNESS RESERVES RGDP RSVS 1 POL 1993 -1.8639720 NA 0 32.8815343 33