Displaying 1 result from an estimated 1 matches for "stdy0".
Did you mean:
stdy
2008 Dec 31
2
function of mixture normal with covariates
...aximization function for the likelihood attached in
the document.
For some reason it's not working I keep getting \this error:
Error: unexpected symbol in:
" +log(v_pred))
return"
> }
Error: unexpected '}' in "}"
>
> opp<-optim(c(meany0,meany1,stdy0,stdy1,dx,V,d),logl)
Error in optim(c(meany0, meany1, stdy0, stdy1, dx, V, d), logl) :
function cannot be evaluated at initial parameters
>
This is what I wrote
# maximizing the log likelihood function
logl<-function(param,y,x)
{
mu0=param[1]
mu1=param[2]
sdy0=param[3]
sdy...