Displaying 2 results from an estimated 2 matches for "org_result".
Did you mean:
org_results
2010 Nov 03
2
memory allocation problem
Hi R users
I am trying to run a non linear parameter optimization using the
function optim() and I have problems regarding memory allocation.
My data are in a dataframe with 9 columns. There are 656100 rows.
>head(org_results)
comb.id p H1 H2 Range Rep no.steps dist aver.hab.amount
1 1 0.1 0 0 1 100 0
0.2528321 0.1393901
2 1 0.1 0 0 1 100 0
0.4605934 0.1011841
3 1 0.1 0 0 1...
2010 Nov 09
0
convergence message & SE calculation when using optim( )
...lt;- function(coeff,Range,H1,H2,p,steps)
{
sum((steps - myfun(coeff,Range,H1,H2,p))^2)
}
coeff <-
c(0.1,0.1,0.1,0.1,0.1,1,5,5,5,1,1,1,1,1,1,1,0.1,0.1,0.1,0.1,0.1)
scale <-
c(0.1,0.1,0.1,0.1,0.1,1,5,5,5,1,1,1,1,1,1,1,0.1,0.1,0.1,0.1,0.1)
est_coeff <- optim(par=coeff, fn = SS, H1=org_results$H1,
H2=org_results$H2, p=org_results$p, Range=org_results$Range,
steps=org_results$no.steps, method= 'L-BFGS-B', lower = rep(0, 21),
upper = rep(Inf, 21), control = list(trace=FALSE, parscale=scale),
hessian=TRUE)
this is the output:
$par
[1] 0.099794607 0.099841098 0.09989612...