Estimate CIs with robust variance poisson mixed model - r

I am trying to estimate confidence intervals for a mixed effects poisson model using robust standard errors in R. I followed these instructions and was able to estimate confidence intervals for a model without random effects.
Now, I would like to estimate confidence intervals with robust standard errors for a poisson model, with a random term. It seems like the sandwich command does not work for glmer, only glm. I have not been able to find a good solution yet. Any suggestions?

Related

SE for logistic regression predictions

I have been tasked with calculating the SE for logistic regression point estimates (where all my predictor variables are factors). I typically use ggpredict to estimate my predictions which provides CI's. However, we are comparing our results to estimates from program MARK and we find readers have a better grasp at understanding our plots with SE as opposed to 95% CI's.
Based on reading the package notes, it appears I can simply calculate (conf.high - predicted value)/1.96). Am I correct? Or am I missing something and that is not the correct way to calculate SE for the predicted estimates. If I am wrong, any ideas on how I can do this or do I need to just use CI's?
Thank you very much for your help.

No standard error output in quantile regression using R

I am running a quantile regression (as my residuals in linear regression were not normally distributed) for a study on the association of mediterranean diet and inflammatory markers. As I was building the model I got outputs for beta coefficients and standard error plus p-values, and confidence intervals. However, once I stratified for low and high levels of exercise, there was no longer an output for standard error. Any ideas?enter image description here
By default rq does not returns standard errors, but rather the confidence interval by inverting a rank test. If you want standard errors you have to specify another method for se, such as se="boot".
Note: the whole point of quantile regression is to move away from means and SD, so this may not be the most adequate estimate for your problem.

auto.arima produces non-gaussian residual

I'm using R's auto.arimafunction - but it seems like that it does not produce gaussian errors all the time. I cannot find any documentation that it does some bootstrapping of the prediction error (if the error is not gaussian), or what it does if the error is not gaussian?
Estimation does not require Gaussian errors, even when a Gaussian likelihood is being used. A Gaussian likelihood is almost the same as least squares and will give consistent estimates for any error distribution with finite variance.
The only time that the distribution of residuals really matters is when producing prediction intervals. If the residuals are not Gaussian, the default prediction intervals will not necessarily have the correct coverage. But then you can set bootstrap=TRUE and get bootstrapped prediction intervals which are based on the empirical distribution of the residuals.

Autocorrelation in Panel Data

I employed a random-effects plm model (from package plm) to estimate my coefficients and I used the vcovHC in order to correct for heteroskedasticity.
However, how can I correct for autocorrelation as well? Should I use vcovNW or vcovSCC? because I tried with the vcovHC Arellano but, as it would be expected, I obtain the same results as by using only vcovHC.
How can I take the residuals autocorrelation into account in such a model?

Q: How to calculate p-values in Cox PH model with maximal test statistic in R?

I am interested in calculating p-values within a Cox PH model based upon the maximal test statistic, to get very robust estimates. Does anyone have experience with this?
I have played around a bit with the R package 'coxphf' that incorporates Firth's penalized likelihood, but it seems to be giving me different coefficients and p-values if I chose firth=FALSE vs. use the standard coxph function in 'survival'.
I do not discount being completely lost on this, so any advice would be useful.
Thanks!

Resources