Displaying 5 results from an estimated 5 matches for "stval".
Did you mean:
steal
2011 Jun 17
0
Inconsistent results from var.get.nc in RNetCDF
...ot; ;
tmax:scale_factor = 0.01 ;
tmax:valid_min = -5000 ;
tmax:valid_max = 6000 ;
-----
I am getting behavior I don't understand when I use the var.get.nc
function from the RNetCDF package.
For example, when I attempt to extract 82 values beginning at stval
from the maximum temperature data with
> var.get.nc(p8m.tmax,'tmax', start=c(lon_val, lat_val, stval),
count=c(1,1,82))
I get
Error: Invalid argument
But after successfully running
> var.get.nc(p8m.tmax,'tmax', start=c(lon_val, lat_val, stval),
count=c(1,1,80))
&...
2007 Aug 16
0
Help with optimization using GENOUD
...<- (X%*%t.beta)+rnorm(nrow(X))
Y <- as.matrix(ifelse(prodterm<0, 0, 1))
# Defining the likelihood function
log.like <- function(beta, Y, X)
{
term1 <- pnorm(X%*%beta)
term2 <- 1-term1
loglik <- (sum(Y*log(term1))+sum((1-Y)*log(term2))) # Likelihood function to be maximized
}
stval <- c(0,0,0)
opt.output <- optim(stval,log.like,Y=Y[,1], X=X[,1:3],
hessian=T, method="BFGS", control=c(fnscale=-1,trace=1))
opt.output
### Now using GENOUD gives me errors
genoud.output <- genoud(log.like,beta=stval,X=X[,1:3], Y=Y[,1], nvars=3, pop.size=3000, max=TRUE)...
2012 Nov 12
1
Invalid 'times' argument three-category ordered probit with maximum likelihood
...g(pnorm(-xb))
if (t2<=0) p2 <- -(abs(t2)*10000)
else p2 <- log(pnorm(t2-xb)-pnorm(-xb))
p3 <- log(1-pnorm(t2-xb))
-sum(cbind(y==1,y==2,y==3) * cbind(p1,p2,p3))
}
#Define Data
y <- econ3
x <- partyid
model <- (econ3 ~ partyid)
#Use optim directly
ls.result <- lm(y~x)
stval <- c(ls.result$coefficients, 1)
oprobit.result <- optim(stval, llk.oprobit3, method="BFGS", x=x, y=y,
hessian=T) ###Here is where it all breaks down
pe <- oprobit.result$par
vc <- solve(oprobit.result$hessian)
se <- sqrt(diag(vc))
ll <- -oprobit.result$value
Any help...
2006 Jan 24
1
non-finite finite-difference value[]
...RUE)
generates the following message:
Zero-Inflated Count Model
Using logit to model zero vs non-zero
Using Negative Binomial for counts
dependent variable y:
Y
0 1 2 3
359 52 7 3
generating start values...done
MLE begins...
initial value 262.883959
error in optim(fn = llhfunc, par = stval, method = method, control =
control, :
non-finite finite-difference value [3]
Short version of my question:
what information does non-finite finite-difference value [3] give?
Extended version of my question:
Since zeroinfl() calls optim(), I assume, that an infinite value is
generated...
2009 Mar 27
3
nls, convergence and starting values
"in non linear modelling finding appropriate starting values is
something like an art"... (maybe from somewhere in Crawley , 2007) Here
a colleague and I just want to compare different response models to a
null model. This has worked OK for almost all the other data sets except
that one (dumped below). Whatever our trials and algorithms, even
subsetting data (to check if some singular