Hi all,

I'm trying to use the betamix function (betareg package) to create a beta 
mixture model but get this error that I don't understand:
"Error in lm.wfit(x, linkfun(y), weights, offset = offset[[1L]]) :
  NA/NaN/Inf in 'y'
Error in lm.wfit(x, linkfun(y), weights, offset = offset[[1L]]) :
  NA/NaN/Inf in 'y'
Error in lm.wfit(x, linkfun(y), weights, offset = offset[[1L]]) :
  NA/NaN/Inf in 'y'
Error in flexmix::stepFlexmix(fullformula, data = mf, k = k, nrep = nstart,  :
  no convergence to a suitable mixture"

The code I wrote was:
"beta_mix_model <- betamix(formula = def_relat ~ data_roads,
                          k = 2)"

I'm making the hypothesis that def_relat (ie the level of deforestation) is a 
function of data_roads (ie distance to roads). When a pixel is far from a road, 
its probability of deforestation is very close to zero with very low 
uncertainty. Closer to roads however, deforestation is possible (with very high 
uncertainty of the intensity of deforestation) but occurences of deforestation 
also occur. This is why I'm considering to groups of observations, with a beta 
distribution of probability for modelling a probability of deforestation 
between 0 and 1.

I don't understand the error message, because none of the data I'm using 
includes NA or Inf. Does anyone has an idea of the reason why I get this error, 
or can tell me if I'm using the function betamix the wrong way?

Thanks,
Camille

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to