正在加载图片...
1.J.Myung I Journal of Mathematical Psychology 47(2003)90-100 99 y=[.94.77 .40.26.24.16];%observed proportion correct as a column vector init_w=rand(2,1);%starting parameter values low-w zeros(2,1);%parameter lower bounds up-w =100*ones(2,1):%parameter upper bounds [w1,sse1,res1,exit1]lsqnonlin('power_lse',init_w,low-w,up-w,opts,y); optimization for power model %w1:LSE estimates sse1:minimized SSE value %res1:value of the residual at the solution exit1:optimization has converged if exit1 >0 or not otherwise [w2,sse2,res2,exit2]=1sqnonlin('expo_lse',init-w,low-w,up-w,opts,y); optimization for exponential model r2(1,1)=1-sse1/sum((y-mean(y)).2);r.2 for power model r2(2,1)=1-sse2/sum((y-mean(y)).2);r2 for exponential model format long; disp(num2str([w1 w2 r2],5));%display out results disp(num2str([sse1 sse2 exit1 exi2],5));%display out results end end of the main program function dev power_lse(w,y) POWER LSE The deviation between observation and prediction of the power model global t; p=w(1,1)t(-w(2,1));%power model prediction dev=p-y; deviation between prediction and observation,the square of which is being minimized function dev expo_lse(w,y) %EXPO_LSE The deviation between observation and prediction of the exponential model global t; p=w(1,1)exp(-w(2,1)*t):%exponential model prediction dev =p-y; deviation between prediction and observation,the square of which is being minimized References Lamberts,K.(2000).Information-accumulation theory of speeded categorization.Psychological Review,107(2).227-260. Akaike,H.(1973).Information theory and an extension of Linhart,H..Zucchini,W.(1986).Model selection.New York,NY: the maximum likelihood principle.In:Petrox,B.N.,Caski, Wiley. F.Second international symposium on information theory Murdock Jr..B.B.(1961).The retention of individual items.Journal of (pp.267-281).Budapest:Akademiai Kiado. Experimental Psychology,62,618-625. Batchelder,W.H.,Crowther,C.S.(1997).Multinomial processing Myung,I.J.,Forster,M.,Browne,M.W.(2000).Special issue tree models of factorial categorization.Journal of Mathematical on model selection.Journal of Mathematical Psychology,44, Psychology,41.45-55. 1-2. Bickel,P.J..&Doksum,K.A.(1977).Mathematical statistics. Pitt,M.A..Myung.I.J.,&Zhang.S.(2002).Toward a method of Oakland,CA:Holden-day,Inc. selecting among computational models of cognition.Psychological Casella,G.,Berger,R.L.(2002).Statistical inference (2nd ed.). Review,109,472-491. Pacific Grove,CA:Duxberry. Ratcliff,R.(1978).A theory of memory retrieval.Psychological DeGroot,M.H.,Schervish,M.J.(2002).Probability and statistics Review,85.59-108. (3rd ed.).Boston,MA:Addison-Wesley. Rubin,D.C..Hinton,S..&Wenzel,A.(1999).The precise time course Kirkpatrick,S..Gelatt,C.D.,Vecchi,M.P.(1983).Optimization by of retention.Journal of Experimental Psychology:Learning. simulated annealing.Science,220.671-680. Memory,and Cognition,25.1161-1176.References Akaike, H. (1973). Information theory and an extension of the maximum likelihood principle. In: Petrox, B.N., & Caski, F. Second international symposium on information theory (pp. 267–281). Budapest: Akademiai Kiado. Batchelder, W. H., & Crowther, C. S. (1997). Multinomial processing tree models of factorial categorization. Journal of Mathematical Psychology, 41, 45–55. Bickel, P. J., & Doksum, K. A. (1977). Mathematical statistics. Oakland, CA: Holden-day, Inc. Casella, G., & Berger, R. L. (2002). Statistical inference (2nd ed.). Pacific Grove, CA: Duxberry. DeGroot, M. H., & Schervish, M. J. (2002). Probability and statistics (3rd ed.). Boston, MA: Addison-Wesley. Kirkpatrick, S., Gelatt, C. D., & Vecchi, M. P. (1983). Optimization by simulated annealing. Science, 220, 671–680. Lamberts, K. (2000). Information-accumulation theory of speeded categorization. Psychological Review, 107(2), 227–260. Linhart, H., & Zucchini, W. (1986). Model selection. New York, NY: Wiley. MurdockJr., B. B. (1961). The retention of individual items. Journal of Experimental Psychology, 62, 618–625. Myung, I. J., Forster, M., & Browne, M. W. (2000). Special issue on model selection. Journal of Mathematical Psychology, 44, 1–2. Pitt, M. A., Myung, I. J., & Zhang, S. (2002). Toward a method of selecting among computational models of cognition. Psychological Review, 109, 472–491. Ratcliff, R. (1978). A theory of memory retrieval. Psychological Review, 85, 59–108. Rubin, D. C., Hinton, S., & Wenzel, A. (1999). The precise time course of retention. Journal of Experimental Psychology: Learning, Memory, and Cognition, 25, 1161–1176. y ¼ ½:94 :77 :40 :26 :24 :16 0 ;% observed proportion correct as a column vector init w ¼ randð2; 1Þ;% starting parameter values low w ¼ zerosð2; 1Þ;% parameter lower bounds up w ¼ 100nonesð2; 1Þ;% parameter upper bounds ½w1; sse1; res1; exit1 ¼ lsqnonlinð‘power lse0 ; init w; low w; up w; opts; yÞ; % optimization for power model % w1: LSE estimates % sse1: minimized SSE value % res1: value of the residual at the solution % exit1: optimization has converged if exit1 40 or not otherwise ½w2; sse2; res2; exit2 ¼ lsqnonlinð‘expo lse0 ; init w; low w; up w; opts; yÞ; % optimization for exponential model r2ð1; 1Þ ¼ 1-sse1=sumððy-meanðyÞÞ: # 2Þ; % r# 2 for power model r2ð2; 1Þ ¼ 1-sse2=sumððy-meanðyÞÞ: # 2Þ; % r# 2 for exponential model format long; disp(num2str([w1 w2 r2],5));% display out results disp(num2str([sse1 sse2 exit1 exi2],5));% display out results end % end of the main program function dev ¼ power lseðw; yÞ % POWER LSE The deviation between observation and prediction of the power % model global t; p ¼ wð1; 1Þ n t: # ð-wð2; 1ÞÞ;% power model prediction dev ¼ p  y; % deviation between prediction and observation, the square of which is being minimized function dev ¼ expo lseðw; yÞ % EXPO LSE The deviation between observation and prediction of the % exponential model global t; p ¼ wð1; 1Þ n expðwð2; 1Þ n tÞ;% exponential model prediction dev ¼ p  y; % deviation between prediction and observation, the square of which is being minimized I.J. Myung / Journal of Mathematical Psychology 47 (2003) 90–100 99
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有