BENG 449 Problem 7 4

# BENG 449 Problem 7 4 - 4/3/08 11:13 PM MATLAB Command...

This preview shows pages 1–2. Sign up to view the full content.

4/3/08 11:13 PM MATLAB Command Window 1 of 2 >> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Alex Lemon % % BENG 449 -- Biomedial Data Analysis % % Problem Set 7, Question 4 % % Due April 4th, 2008 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Write a Matlab to test the F-test for model comparison. Generate random % data from one exponential (t = 1,. ..,40, beta1 * exp(- beta2 * t), beta1 % = 20, beta2 = 0.1, sigma = 2). Fit the data to one exponential (using % exponential.m with 2 parameters) or one exponential plus a constant (3 % parameters). Calculate the F statistic. Repeat the experiment 100 % times, what fraction of the experiments did you consider to show a % statistically significant difference at p < 0.05? t = 1:40; n = length(t); beta1 = 20; beta2 = 0.1; sigma = 2; p2 = 2; p3 = 3; eta = exponential( [beta1 beta2], t ); num_iter = 1000; FStats = zeros(1,num_iter); SignficantDifference = zeros(1,num_iter); Fcrit = finv(0.95, p3 - p2, n - p3); options=optimset('display','off','LargeScale','off');

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## BENG 449 Problem 7 4 - 4/3/08 11:13 PM MATLAB Command...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online