Displaying 2 results from an estimated 2 matches for "funb".
Did you mean:
fun
2008 May 15
1
logistic transformation using nlminb
...<- nlminb(rep(0,4), lower=rep(0,4), upper=c(0.35, 1, 1, 1) ,
obj.funA, mat=mat)
opt.x <- opt$parameters
opt.x <- c(opt.x, 1-sum(opt.x))
opt.x
# Result
[1] 0.34999902 0.06475651 0.00000000 0.16561760 0.41962686
However, I don't get the same result from the logistic transformation
obj.funB <- function(opt, mat) {
opt <- c(opt, 0)
opt <- exp(opt)/sum(exp(opt))
LinearComb <- mat%*%opt
obj <- -min(LinearComb)
obj
}
opt <- nlminb(rep(0,4), upper=c(log(0.35), NA, NA, NA), obj.funB, mat=mat)
opt.x <- opt$parameters
opt.x <- c(opt.x, 0)
opt.x <- exp(op...
2011 Sep 06
2
Generalizing call to function
Hello guys,
I would like to ask for help to understand what is going on in
"func2". My plan is to generalize "func1", so that are expected same
results in "func2" as in "func1". Executing "func1" returns...
0.25 with absolute error < 8.4e-05
But for "func2" I get...
Error in dpois(1, 0.1, 23.3065168689948, 0.000429064542600244,