Dear list,
I'm working with Splus6 under windows, and am struggling with ms.
I'm making a call to ms with the first argument minus the loglikelihood of
a row in the dataframe "mydata".
"mydata" contains numeric colums named y1,y2 and x.
b1,b2 and r are the parameters of the function to be optimized.
The way I read the documentation, ms should now minimize the sum of the
formula provided in the first
argument, evaluated over the rows of mydata.
But I keep getting this error message and I can't figure out why.
Anybod got a clue?
Thanks for your help.
-Ad Feelders
> mydata
y1 y2 x
1 1 1 2
2 1 0 3
3 0 0 5
4 0 1 4
> ms(~ - (y1 * y2 * log(pmvnorm(c(b1 * x, b2 * x), rho = r)) + y1 * (1 -
y2) * log(pnorm(b1 * x) - pmvnorm(c(b1 * x, b2 * x), rho = r)) +
(1 - y1) * log(pnorm( - b1 * x))),data=mydata,start=list(b1=.5,b2=.2,r=.1))
Problem in pmvnorm(c(b1 * x, b2 * x), rho = r): d must be 2 if rho is used,
while calling subroutine setup_min
---------------------------------------------------------------------------
Ad Feelders
Universiteit Utrecht
Institute of Information & Computing Sciences
PO Box 80089
3508 TB Utrecht
The Netherlands
ad@cs.uu.nl
Phone: +31 30 2533176
|