[R] Two dimensional likelihood surface plot

Duncan Murdoch murdoch.duncan at gmail.com
Tue Nov 11 21:56:58 CET 2014


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



More information about the R-help mailing list