How to solve unknown elements of a matrix in mle function?

1 visualización (últimos 30 días)
Mithun Ghosh
Mithun Ghosh el 26 de Sept. de 2018
Comentada: Viren Gupta el 4 de Oct. de 2018
I have been trying to find the unknown value of a basis function by using mle estimation method. My basis function consists of basis(x,k) where x is the data and k is the unknown parameter with (5X1) dimension say[k(1), k(2),k(3),k(4),k(5)]. My liklihood function estimation is like:
function Z=bbasis(x,k)
k=[k(1), k(2),k(3),k(4),k(5)];
z=[];
for i=1:5
Z=[x-k(i)];
z=[z,Z];
end
end
x=rand(20,1);
y=rand(20,1);
F=ones(20,1);
f = @(x,w) (2*3.1416)^-(20)*(det(bbasis(x,w)*rand(10,10)*bbasis(x,w)'))^(-.5)*exp(-.5*(y-F)'*inv(bbasis(x,w)*rand(10,10)*bbasis(x,w)')*(y-F))
lk=mle(x,'pdf','f','start',[0 0 0 0 0 ])
*I am getting the following error:*
Error using mlecustom (line 93)
The 'pdf' parameter value must be a function handle or a cell array
containing a function handle.
Error in mle (line 237)
phat = mlecustom(data,varargin{:});
  3 comentarios
Mithun Ghosh
Mithun Ghosh el 1 de Oct. de 2018
Thanks, I corrected that dimensional mismatch problem and redefine pdf which should be okay. But it is still giving me the same error.
Viren Gupta
Viren Gupta el 4 de Oct. de 2018
have you updated the changes in the question above? If yes, then still there is dimension problem. bbasis1 returns 20*1 matrix and multiplying that with rand(10,10) is wrong. I suggest you to try giving some sample inputs to your pdf function and see if that works before working on mle first.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by