Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'extracting parts of elements from a list' topicStudent Support Forum > General > Archives > "extracting parts of elements from a list"

Next Comment >Help | Reply To Topic
Author Comment/Response
Andy Wilson
03/08/99 06:23am

I'd like to extract the parameter values that I get when I use FindMinimum on a Likelihood function. I think it amounts to extracting part of an element from a list. Beyond that, I can't figure out how to do it. Do you have any suggestions?

I use the code below to find the minimum of a function of two variables, gm and gsd. I would like to take the values of gm and gsd at the minimum, assign them variable names, and use them in later functions.

sally = FindMinimum[-func4,{gm,60,10,100},{gsd,4,2,100}]

What I would ultimately like to do is to pull out 54.2512 and name it ''gmmle'' and pull out 3.08502 and name it ''gsdmle'' so that I can use them as variables in a likelihood ratio test.

I tried to do this by using

lucy = Flatten[sally]
{110.635, gm--> 54.2512, gsd--> 3.08502}

and then

marcy = lucy[[2]]
gm--> 54.2512

But here I get stuck. How do I separate the number from ''gm-->''?

Thanks in advance for any suggestions you may have.

Andy Wilson

URL: ,

Subject (listing for 'extracting parts of elements from a list')
Author Date Posted
extracting parts of elements from a list Andy Wilson 03/08/99 06:23am
Re: extracting parts of elements from a list Forum Modera... 03/09/99 6:42pm
Next Comment >Help | Reply To Topic