similar to: Bus Error

Displaying 20 results from an estimated 10000 matches similar to: "Bus Error"

2001 Mar 19
0
DUP=T/F
In some tests I am getting a difference in the 7th or 8th significant digit depending on whether I set DUP=T or DUP=F in the .Fortran call below. While this is not a huge error it is bigger than I would expect and may be a symptom of another problem. Any comments or suggestions? (R1.2.2 on Solaris.) Paul Gilbert _______ genD.ARMA <- function(model, data, d=0.01, eps=1e-4, r=6, warn=F){ n
2008 Jan 26
1
Any numeric differentiation routine in R for boundary points?
Hi, I have a scalar valued function with several variables. One of the variables is restricted to be non-negative. For example, f(x,y)=sqrt(x)*exp(y), then x should be non-negative. I need the gradient and hessian for some vector (0,y), i.e., I need the gradient and hessian at the boudary of parameter space. The "numderiv" package does not work, even for f(x)=sqrt(x), if you do
2008 Sep 12
1
Error in solve.default(Hessian) : system is computationally singular
Hello everyone, I'm trying to estimate the parameters of the returns series attached using the GARCH code below, but I get the following error message: Error in solve.default(Hessian) : system is computationally singular: reciprocal condition number = 0 Error in diag(solve(Hessian)) : error in evaluating the argument 'x' in selecting a method for function 'diag' Can
2003 Oct 17
2
nlm, hessian, and derivatives in obj function?
I've been working on a new package and I have a few questions regarding the behaviour of the nlm function. I've been (for better or worse) using the nlm function to fit a linear model without suppling the hessian or gradient attributes in the objective function. I'm curious as to why the nlm requires 31 iterations (for the linear model), and then it doesn't work when I try to add
2003 Jul 31
0
Trouble with optim
Dear All; Searching on the achieve, many questions on optim() have been asked, but I haven't seen the following. The question began with my original inquiry on "Optimization failed in fitting mixture 3-parameter Weibul l distribution using fitdistr()" which I posted on Jul. 28, Prof. Ripley kindly advised me to look into options of optim() for the answer. Following his advice and
2004 Feb 19
1
Obtaining SE from the hessian matrix
Dear R experts, In R-intro, under the 'Nonlinear least squares and maximum likelihood models' there are ttwo examples considered how to use 'nlm' function. In 'Least squares' the Standard Errors obtained as follows: After the fitting, out$minimum is the SSE, and out$estimates are the least squares estimates of the parameters. To obtain the approximate standard
2003 Dec 02
0
names of parameters from nonlinear model?
I've been trying to figure out how to build a list of terms from a nonlinear model (terms() returns a error). I need to compute and evaluate the partial derivatives (Jacobian) for each equaiton in a set of equations. For example: > eqn <- q ~ s0 + s1 * p + s2 * f + s3 * a > sv2 <- c(d0=3,d1=4.234,d2=4,s0=-2.123,s1=0.234,s2=2.123,s3=4.234) > names( sv2 ) [1] "d0"
2011 Mar 19
2
problem running a function
Dear people, I'm trying to do some analysis of a data using the models by Royle & Donazio in their fantastic book, particular the following function: http://www.mbr-pwrc.usgs.gov/pubanalysis/roylebook/panel4pt1.fn that applied to my data and in the console is as follows: > `desman.y` <- structure(c(3L,4L,3L,2L,1L), .Names = c("1", "2", "3",
2010 Nov 06
1
saddle points in optim
Hi, I've been trying to use optim to minimise least squares for a function, and then get a guess at the error using the hessian matrix (calculated from numDeriv::hessian, which I read in some other r-help post was meant to be more accurate than the hessian given in optim). To get the standard error estimates, I'm calculating sqrt(diag(solve(x))), hope that's correct. I've found
2006 Mar 21
1
Hessian from optim()
Hello! Looking on how people use optim to get MLE I also noticed that one can use returned Hessian to get corresponding standard errors i.e. something like result <- optim(<< snip >>, hessian=T) result$par # point estimates vc <- solve(result$hessian) # var-cov matrix se <- sqrt(diag(vc)) # standard errors What is actually Hessian representing here?
2009 May 03
3
Optim function in the loop
Hi all, I wrote the following lines of codes try to do some iterations to find the global optimal values, but the function does not execute properly. Every time codes stop after one iteration right after executing the optim() function. Does anyone could have me to take a look? Thanks. if (count>0){ k=k+0.05; mu0=c(83+k,0,0) Sigma0= diag(0.4,3) initpar=c(.1+10*k,10*k,10*k,10*k) # initial
2007 Jul 13
1
Correlation matrix
I have a model with 5 parameters that I am optimising where the (best) value of the objective function is negative. I would like to use the Hessian matrix (from genoud and/or optim functions) to construct the covariance and correlation matrices. This is the code that I am using: est <- out$par # Parameter estimates H <- out$hessian # Hessian V <-
2008 Jun 24
1
Hessian in box-constraint problem - concern OPTIM function
Hello all useRs, I am using the OPTIM function with particular interest in the method L-BFGS-B, because it is a box-constraint method. I have interest in the errors estimates too. I make: s.e. <- sqrt( diag( solve( optim(...,method='L-BFGS-B', hessian=TRUE)$hessian ))) but in help say: "Note that this is the Hessian of the unconstrained problem even if the box constraints
1998 Apr 14
1
R-beta: SEs for one-param MLE in R?
Simple-mindedly I tried getting MLE and SE for one-parameter model in the same way as for multi-param models. out<-nlm(fn,p=c(2),hessian=T) But sqrt(diag(solve(out$hessian))) gives the answer 1. The Hessian has only one entry, not really a matrix. diag(x) gives 1 if x is just a single number. Is this what I should be doing to get SE for MLE? sqrt(solve(out$hessian)) Thanks very much for
1998 Apr 14
1
R-beta: SEs for one-param MLE in R?
Simple-mindedly I tried getting MLE and SE for one-parameter model in the same way as for multi-param models. out<-nlm(fn,p=c(2),hessian=T) But sqrt(diag(solve(out$hessian))) gives the answer 1. The Hessian has only one entry, not really a matrix. diag(x) gives 1 if x is just a single number. Is this what I should be doing to get SE for MLE? sqrt(solve(out$hessian)) Thanks very much for
2010 Sep 16
0
problems trying to reproduce structural equation model using the sem package
Hello, I've been unsuccessfully trying to reproduce a sem from Grace et al. (2010) published in Ecological Monographs: http://www.esajournals.org/doi/pdf/10.1890/09-0464.1 The model in question is presented in Figure 8, page 81. The errors that I've been getting are: 1. Using a correlation matrix: res.grace <- sem(grace.model, S = grace, N = 190) Warning message: In sem.default(ram
1998 Apr 21
1
R-beta: R make problem
I've just got a new workstation with Solaris 5.6 and seem to be having some R 0.61.1 installation problems that did not occur in 5.5. If anyone can see the problem I would appreciate suggestions. Following is output from make at the point of failure. TIA Paul Gilbert ... gcc -g -I../include -c relop.c gcc -g -I../include -c saveload.c In file included from
2010 Nov 09
0
convergence message & SE calculation when using optim( )
Hi R-users, I am trying to estimate function parameters using optim(). My count observations follows a Poisson like distribution. The problem is that I wanna express the lambda coefficient, in the passion likelihood function, as a linear function of other covariates (and thus of other coefficients). The codes that I am using (except data frame) are the following (FYI the parameters need to be
2004 Oct 19
1
lapack test failed (PR#7294)
Hallo, I've just installed R on our Opteron System (AMD Opteron 246). Running make check-all results in a failure during the lapack test: > ## ------- tests of random real and complex matrices ------ > > ## 100 may cause failures here. > eigenok <- function(A, E, Eps=1000*.Machine$double.eps) + { + V <- E$vect; lam <- E$values +
2011 Jul 11
0
Zero Columns/Rows in Hessian Matrix
Hello R users, I am trying to get the Std. errors of some estimators using the optim function. But when computing them using sqrt(diag(solve(ans$hessian))) I get an error that says... Lapack routine dgesv: system is exactly singular. Or sometimes I also get that system is computationally singular. When I check the Hessian matrix it has at least one column&row of mostly zeros. My