start values

289 views
Skip to first unread message

Ias S

unread,
Jul 22, 2016, 6:09:14 AM7/22/16
to unmarked



Hi,

I am getting an error message for my simplest models (see below).
I have read that in response to this error you should add start values.
What is a start value and how do you know what the start value is for a given data set?

Thanks fro your help,

Ing


m.haz <- distsamp(~1 ~1, umf, keyfun="hazard", output="density", unitsOut="kmsq")
Error in optim(starts, nll, method = method, hessian = se, ...) :
  initial value in 'vmmin' is not finite

Chris Sutherland

unread,
Jul 22, 2016, 6:55:49 AM7/22/16
to unma...@googlegroups.com

Hi Ing,

Starting values are 'ballpark' values of the parameters you are trying to estimate (noting that they should be provided on the correct scale). These are provided so that the optimizer starts off in a sensible place and is more likely to find the maximum likelihood estimates of the density and detection parameters.

Chris


--
You received this message because you are subscribed to the Google Groups "unmarked" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ias S

unread,
Jul 22, 2016, 8:08:15 AM7/22/16
to unmarked

Thanks Chris.

I am now getting this error in response to the following model.

m.half <- distsamp(~1 ~1, umf, keyfun="halfnorm", output="density", unitsOut="kmsq", starts=c(0))
Error in names(starts) <- c(lamParms, detParms) :   'names' attribute [2] must be the same length as the vector [1]

What am I doing wrong?

Jeffrey Royle

unread,
Jul 22, 2016, 8:34:59 AM7/22/16
to unma...@googlegroups.com
you don't have the correct number of starting values -- there should be a starting value for each parameter of the model.

Ias S

unread,
Jul 22, 2016, 8:58:26 AM7/22/16
to unmarked

So for each parameter I need a start value. So in this model I would need two?
Is this right?

m.half <- distsamp(~1 ~1, umf, keyfun="halfnorm", output="density", unitsOut="kmsq", starts=c(0,0))

Chris Sutherland

unread,
Jul 22, 2016, 9:00:04 AM7/22/16
to unma...@googlegroups.com

Yes, thats right.
The idea being that the two values correspond to some reasonable stab at what the values _might_ be.

Ias S

unread,
Jul 22, 2016, 9:05:50 AM7/22/16
to unmarked
I am still getting an error.
This is a null model so I assumed the start values were 0. Am I wrong to make this assumption?


> m.half <- distsamp(~1 ~1, umf, keyfun="halfnorm", output="density", unitsOut="kmsq", starts=c(0,0))
Error in optim(starts, nll, method = method, hessian = se, ...) :
  initial value in 'vmmin' is not finite
> m.haz <- distsamp(~1 ~1, umf, keyfun="hazard", output="density", unitsOut="kmsq", starts=c(0,0))
Error in names(starts) <- c(lamParms, detParms, "scale") :
  'names' attribute [3] must be the same length as the vector [2]
> m.uni <- distsamp(~1 ~1, umf, keyfun="uniform", output="density", unitsOut="kmsq", starts=c(0,0))

Error in optim(starts, nll, method = method, hessian = se, ...) :
  initial value in 'vmmin' is not finite




Jeffrey Royle

unread,
Jul 22, 2016, 9:43:31 AM7/22/16
to unma...@googlegroups.com
0 is not a good starting value for the parameters usually.  For example if units of space are meters then for many surveys sigma = 50 or 100 meters and the starting value should therefore be about log(50) or log(100)  (but note: this highly depends on the specific situation, perhaps higher or lower).
I don't know what a good value would be for density, it depends on the size of the sample units and the true value of E(N) for your system.  I would recommend playing around with different values and see if you can get something to work.

Reply all
Reply to author
Forward
0 new messages