Hi,
How to solve this problem. The following is the code. 

betabinexch0=function(theta,data)
+ {
+ eta=theta[,1]
+ K=theta[,2]
+ y=data[,1]; n=data[,2]
+ N=length(y)
+ val=0*K;
+ for (i in 1:N)
+ val=val+lbeta(K*eta+y[i],K*(1-eta)+n[i]-y[i])
+ val=val-N*lbeta(K*eta,K*(1-eta))
+ val=val-2*log(1+K)-log(eta)-log(1-eta)
+ return(val)
+ }
> data(cancermortality)
> mycontour(betabinexch0,c(.0001,.003,1,20000),cancermortality)

Error in theta[, 1] : incorrect number of dimensions





      
        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to