I want to fit my data set to a mixed effect logistic regression model and determine which of the coefficients of my model are statistically significant. How do I determine the p-values for the coefficients in nlmefit?
Thanks!

 Respuesta aceptada

the cyclist
the cyclist el 1 de Ag. de 2013

0 votos

I assume you mean you want to know if each coefficient is statistically significantly different from zero.
If you call nlmefit with stats output,
[beta,psi,stats,b] = nlmefit(...)
then
stats.sebeta
is the standard error of the coefficients. You can calculate p-values from the values of beta and their standard errors.
[Leave a comment if you don't know how to do that and I can try to add more detail.]

4 comentarios

ilana
ilana el 1 de Ag. de 2013
Thanks for the answer, and yes, I meant statistically different from 0. But how exactly do I calculate a p-value using beta and the standard error of beta?
the cyclist
the cyclist el 1 de Ag. de 2013
It's a straightforward calculation. I suggest you look at this wikipedia page for some background: http://en.wikipedia.org/wiki/Standard_score.
% Values of beta and sebeta from nlmefit
beta = 1.96; % MLE of the coefficient
sebeta = 1.0; % Standard error of the coefficient
% Calculate the z-score (number of standard deviations the mean is from zero, in your case)
z = beta/sebeta;
% Get the p-value from the z-score
pvalue = 2*(1 - normcdf(z))
Here I multiplied by 2, for a two-sided test (assuming you did not have reason to think ahead of time whether the coefficient might be bigger or smaller than 0, so either direction is significant).
Please be careful generalizing what I have done here. It is pretty specific to your case. I suggest you play around with the parameters, to get a feel for the relationships among the variables.
ilana
ilana el 1 de Ag. de 2013
I wasn't sure if I should assume a z-distribution or a t-distribution with a certain number of degrees of freedom. How do we know the z-distribution is correct in this case? thanks!
the cyclist
the cyclist el 1 de Ag. de 2013
I am starting to get a little out of my depth here, but I think you are right that one should actually use a t-distribution.
In that case, I think the correct calculation is
t = beta/sebeta;
pvalue = 2*(1-tcdf(t,dfe))
where dfe is the degrees of freedom from the stats output.

Iniciar sesión para comentar.

Más respuestas (1)

Alexis Villacis
Alexis Villacis el 15 de Dic. de 2018

0 votos

Hello everybody!
I am estimating a non-linear mixed effect model using nlmefit, and although Matlab produces standard errors for the estimated betas, it does not produce standard errors for the variance components (the PSI matrix). How can I obtain/estimate the standard errors for the variance components? Would it also be possible to estimate the s.e. for the covariance components of the PSI matrix?
Thank you in advance,

Etiquetas

Preguntada:

el 1 de Ag. de 2013

Respondida:

el 15 de Dic. de 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by