[R] Two dimensional likelihood surface plot

Bert Gunter gunter.berton at gene.com
Tue Nov 11 22:31:23 CET 2014


... as would the loess predict() method do from a loess() fit in the
base package.

I have used loess() for this purpose primarily to take advantage of
its "robustness" capabilities. I hasten to add that the algorithm is
not infallible in this regard, as it may not recover from a
sufficiently bad set of (least squares)starting values, as ?loess
explicitly says. It can also be slow.

Cheers,
Bert

Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
Clifford Stoll




On Tue, Nov 11, 2014 at 12:56 PM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:
> On 11/11/2014, 2:17 PM, Gyanendra Pokharel wrote:
>> Hi R users,
>> I am trying to plot two dimensional posterior likelihood surface. I have a
>> data like
>>
>> para1     para2     likehood
>> .......      ........      ...........
>> .......      ........      ...........
>>
>>
>>
>> I looked at contour plot but it needs a shorted values of parameters and a
>> matrix of likelihood values. Is there any way to get the plot? or how can I
>> change my likelihood values to a matrix for the function "contour"?
>
> The interp() function in the akima package should be able to do what you
> want.
>
> Duncan Murdoch
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list