# Statistical Consult: Negative Binomial Regression with Random Effects

I need a statistician who can help me diagnose and fix a negative binomial regression incorporating random effects that is failing to converge. I am using R and the lme4 package, but I am open to having this work performed in STATA.

The study is examining the use of parliamentary questions by Members of Parliament (MPs) from a national parliament between 1999-2016. I am using MP-level observations. The dependent variable (QW) is the number of written questions each MP asks in a particular calendar year (i.e. 2001, 2002, 2003). It is count data, so I am employing a negative binomial regression. Since I have multiple (5) observations for each MP from each of the parliamentary sessions, I am employing MP-level random effects. As a result, I have a total of 9,528 observations grouped into 1,371 groupings.

The basic model I am attempting to estimate is:

basemod <- ([login to view URL](WQ ~ VM + Opp + Jpart + LS_Exp + uCM + uJM + log(QDays) + (1|ID), data=qdata, verbose=T, control=glmerControl(optimizer="bobyqa",optCtrl=list(maxfun=2e5))))

WQ = the number of written parliamentary questions asked in a given year

VM = the vote margin that the MP won their last election by

Opp = Binary variable: 1= member of an opposition party (not in the government)

Jpart = Binary variable: 1= member of a junior party in the ruling coalition (part of the government)

LS_Exp = Years of parliamentary experience

uCM = Years of experience as a Cabinet Minister

uJM = Years of experience as a Junior Minister

QDays = the number of days allotted to parliamentary questions in a given year

ID = unique identifier for each MP

When I attempt to run this, I get the following warnings:

Warning messages:

1: In checkConv(attr(opt, "derivs"), opt\$par, ctrl = control\$checkConv, :

Model failed to converge with max|grad| = 0.0011218 (tol = 0.001, component 1)

2: In checkConv(attr(opt, "derivs"), opt\$par, ctrl = control\$checkConv, :

Model is nearly unidentifiable: very large eigenvalue

- Rescale variables?

As a result, I have tried to scale the model back to the basics (just the dependent variable and the random effects) and start building it up, but I get convergence failure even when I run a bare bones model with just the dependent variable and the random effects, I still get convergence failure.

minmod <- ([login to view URL](WQ ~ (1|ID), data=qdata, verbose=T, control=glmerControl(optimizer="bobyqa",optCtrl=list(maxfun=2e5))))

Warning messages:

1: In checkConv(attr(opt, "derivs"), opt\$par, ctrl = control\$checkConv, :

Model failed to converge with max|grad| = 0.174211 (tol = 0.001, component 1)

2: In checkConv(attr(opt, "derivs"), opt\$par, ctrl = control\$checkConv, :

Model is nearly unidentifiable: very large eigenvalue

- Rescale variables?

Can you help fix this?

I have access to STATA and am happy to have this work performed in STATA as well, as long as you can provide me with the code.

I know that some freelancers bid on projects without reading the full description. To confirm that you have read this and understand the task, can you please make the following sentence the first line of your response: "I understand NBR using FE and I can help with this problem."

Квалификация: Математика, Язык программирования R, Статистический анализ, Статистика

О работодателе:
( 25 отзыв(-а, -ов) ) London, United Kingdom

ID проекта: #17086839

## Поручен:

TomPricePhD

I understand NBR with FE I am familiar with NBR from analysing RNAseq data. Mixed effects models with individual level random effects can be recast as GEE models with a single parameter for the correlations between i Больше

\$83 USD за 1 день
(0 отзывов(-а))
0.0

## 6 фрилансеров(-а) в среднем готовы выполнить эту работу за \$81

sumbali

I'm an Engineer in Statistics and Applied Economics, i've got many skills and expertise that will allow me achieving perfectly all the projects and assignments because my priority is your satisfaction I am a master of Больше

\$100 USD за 7 дней(-я)
(139 отзывов(-а))
6.4
ProDataAnalyzer

"I understand NBR using FE and I can help with this problem." Hi, I am interested to complete the assignment using STATA. I have expertise in panel data modelling using STATA. Please visit my public profile. I c Больше

\$80 USD за 3 дней(-я)
(78 отзывов(-а))
6.3
schoudhary1553

Hello, I can help with you in your project Statistical Consult: Negative Binomial Regression with Random Effects. I have more than 5 years of experience in Mathematics, R Programming Language, Statistical Analysis, Больше

\$140 USD за 3 дней(-я)
(26 отзывов(-а))
5.7
blackbox311

Dear I am a professional in mathematics. I am sure I can do it. Please reply to me. I wait for you now. Thanks.

\$50 USD за 10 дней(-я)
(17 отзывов(-а))
4.2
statexpert215

hi, bro. i am glad to meet you. I am a MATLAB, statistic and R expert.I have many experience in this field. I can help you 100% completely. Best regards!

\$35 USD за 3 дней(-я)
(10 отзывов(-а))
2.4