Displaying 1 result from an estimated 1 matches for "constlow".
Did you mean:
constlo
2012 Nov 04
1
Struggeling with nlminb...
...theta[12]*my.sigmasq[i-1])*(data[i-1]>d1)*(my.sigmasq[i-1]>d3)
}
my.mean<-rep(0,n+1)
for(j in 2:(n+1)) {
my.mean[j]<-theta[13]*data[j-1]
}
1/2*sum(log(my.sigmasq[2:(n+1)])) + n/2*log(2*pi) +
1/2*sum((data[2:(n+1)]-my.mean[2:(n+1)])^2/(my.sigmasq[2:(n+1)]))
}
constLow=c(rep(0,(length(par.start)-1)),-2)
my.optpar3<-
nlminb(par.start,my.loglike.normal,lower=constLow,control=list(eval.max=500,iter.max=100)
)
Second, I estimate a similar function but with only 7 instead of 13
parameters, I fix theta[1]-theta[6] to some constant, but vary d3 in a loop.
It seems...