Question: 4.1 Study the Matlab program given below for fitting a digit confusion model to fecundability data. Discuss the logistic transformation of parameters used in the

4.1 Study the Matlab program given below for fitting a digit confusion model to fecundability data. Discuss the logistic transformation of parameters used in the program. Use the fmax function to obtain maximumlikelihood parameter estimators and obtain estimates of standard error and correlation for the parameter estimators. Extend the program to include confusion into the digit 3. Comment on the comparison of the estimates of

μ in Tables 4.1 and 4.2.

function y=preference(x)

%

%PREFERENCE calculates the negative log-likelihood for

% the fecundability model, allowing for digit preference

% into 6 and 12 months.

% ‘data’ are global, and are set in the driving program.

%_________________________________________________________________ global data al=x(1); b1=x(2);m1=x(3); t1=x(4);

a=1/(1+exp(al)); % logistic transformation b=1/(1+exp(b1)); % to keep parameters a,b,m, m=1/(1+exp(m1)); % in the 0-1 range.

t=exp(t1); % exponential transformation

% to keep t positive for i=2:17 p(i)=p(i-1)*(1-(m+t)/(1+(i-1)*t)); % sets up the basic end % beta-geometric probabilities s1=0; % now we add the confusion for i=1:5 % probabilities p(i)=p(i)*(1-a^abs(i-6));

s1=s1+p(i);

end for i=7:11 p(i)=p(i)*(1-a^abs(i-6)-b^abs(12-i));

s1=s1+p(i);

end s=0;

for i=1:11 s=s+p(i)*a^abs(i-6);

end p(6)=s; s=0;

for i=7:17 s=s+p(i)*b^abs(i-12);

end p(12)=s;

p(13)=1-s1-p(6)-p(12);

p=log(p);

y=-data*p(1:13)’;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Probability And Stochastic Modeling Questions!