How to recover the Data (fields) from the Structure
Afficher commentaires plus anciens
I am running a glmfit model in a loop and I want to recover the data stored in a structure as fields. The model is:
for j=1:length(gnames) t = (n==gnames(j)); [beta(:,j),dev(:,j), stat(:,j)] = glmfit([x1(t) x2(t)],y(t,:),'gamma', 'link', 'reciprocal', 'const','on'); end
Several 'stat' structures are genereted and I want to recover all dispersion paramters stored in stat.sfit field and I am stack.
I also want to use glmval to get the intervals of y. Any practical help will be appreciated
Réponses (1)
Sarah Wait Zaranek
le 28 Avr 2011
allstats = [stat.sfit]
should save all the outputs in an array for you.
diff(yfit)
should give you the intervals of y (if I am understanding what you want), to get yfit - you use glmval as you mentioned above.
Catégories
En savoir plus sur Binomial Distribution dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!