The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: mle for custom function
Replies: 1   Last Post: Jan 16, 2014 9:47 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 2
Registered: 1/16/14
mle for custom function
Posted: Jan 16, 2014 12:13 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi, I just started using Matlab for medical physics research
and now have problem using mle function to fit a custom
function to TCP model fitting.

My custom function is a TCP model of Poisson hypothesis.

exp = 2.71828182845904523536;

TCP = @(x, a, b,k) exp(-k*exp(-a*x-b*x^2));

%Custom Function (negative loglikelihood)
custom = @ (x, n,t ,a,b,kl) -(t*log(TCP(x,a,b,k)+(n-t)*log(1-TCP(x,a,b,k))

n = patients number of each group
x = dose
t = survival patients number of each group
k,a,b are parameter of estimated by mle.

Using this custom function to fit my data (5x1 matrix),
I used a syntax of;

[paramEsts,paramCIs] =

However, it gives me the following error.

>>Error using mlecustom (line 150)
Error evaluating the user-supplied nloglf

Error in mle (line 228)
[phat, pci] =

Caused by:
Error using
Not enough input arguments.

At this point, I have no clue to solve this...
Could anybody please help me?
Thank you so much...

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.