BENG 449 Problem 7 4

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

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

View Full Document Right Arrow Icon
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');
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

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 Right Arrow Icon
Ask a homework question - tutors are online