Displaying 3 results from an estimated 3 matches for "psup".
Did you mean:
psu
2005 Apr 08
0
TR: The results of your email commands
...to minimise
sce<-function(param){
return(sum(sum((yy-(param[i+nb]-(xx/param[i])^param[(nb*2)+1]))^2)))
}
#initial value for optim function
ninit<-vector(length=nb)
for(i in 1:nb){
ninit[i]<-x[long[i]+1]
}
pinf=c(rep(0.01,nb),rep(3,nb),0.5)
psup=c(rep(10,nb),rep(8,nb),4)
pinit=c(runif(nb,min=0.1,max=5),ninit,runif(1,min=0.5,max=4))
print(pinit)
for (i in 1:nb)
{
yy<-y[((long[i]+1):long[i+1])]
for( k in 1:length(yy)){
ifelse((yy[k]<=log10(nbr)),(yy<-yy[1:(min(which(yy<=log10(nbr),arr.ind=FALSE...
2005 Apr 01
1
optim problem, nls regression
...I applied
optim(p=pinit,sce, method="L-BFGS-B", lower=c(0,0,0,0,0,0,0), upper=c(10,
10,10,10,10,10,4),control=list(maxit=20000000,temp=20000))
but the program does not run. And I get this message
"Error in optim(p = pinit, sce, method = "L-BFGS-B", lower = pinf, upper =
psup, :
L-BFGS-B needs finite values of fn"
And I don't understand why it doesn't work. Do I forget an option in optim
computation. Or is there an other function instead of optim that I can use.
Thanks in advance
Anne Kervahu
annekervahu at yahoo.fr
2012 Mar 21
0
runif error - maximum limit?
...below, I think because my n is exceeding the
allowable limit for a vector.
Can anyone confirm, and help with the following questions?
The function and error:
> stPte8 <- rtrunc(rnorm, nx * ny * nsimu, linf=0, mean=as.vector(PTmn),
> sd=as.vector(PTsd))
Error in runif(n, min = pinf, max = psup) : invalid arguments
My total n is calculated by:
nx=4053, ny=4848, nsimu=1000,
n = nx*ny*nsimu = 19,648,994,000
I believe the maximum size of a vector is 2^31-1 (2,147,483,647) - clearly
smaller than my n.
I have done some initial reading about how to deal with large datasets in R,
with referen...