p-value for nlmlefit

5 views (last 30 days)
ilana
ilana on 1 Aug 2013
Answered: Alexis Villacis on 15 Dec 2018
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!

Accepted Answer

the cyclist
the cyclist on 1 Aug 2013
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 Comments
ilana
ilana on 1 Aug 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 on 1 Aug 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.

Sign in to comment.

More Answers (1)

Alexis Villacis
Alexis Villacis on 15 Dec 2018
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,

Community Treasure Hunt

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

Start Hunting!