GLM error interpretation

57 views
Skip to first unread message

Ian Leinwand

unread,
May 20, 2014, 12:04:50 PM5/20/14
to vistrai...@googlegroups.com
Greeting All,

I'm encountering the following error when trying to run GLM in SAHM

An error was encountered in the R script for this module.

The R error message is below:

Error in apply(dat[, -c(rm.list)], 2, unique) :

dim(X) must have a positive length

Calls: FitModels -> read.ma -> which -> lapply -> apply

Execution halted



I test the same data and work flow using Random Forest and the model ran and produced maps. So I'm wondering if this is a case of GLM not being able to fit a model to the data. 


I'm trying to fit a simple model with only one independent parameter representing distance to previous year population of gypsy moth. 


We have 112,000 absence records and 20,000 presence locations. Could that be the issue? 


Essentially we are trying to create a yearly dispersal model where we predict the relative probability of gypsy moth detection based on the previous years established populations of gypsy moth. 


Thanks

Ian

Ian Leinwand

unread,
May 29, 2014, 11:42:35 AM5/29/14
to vistrai...@googlegroups.com
I solved the first error by including a second input parameter into the predictor list. Seems like GLM in SAHM didn't like trying to fit models with just one independent parameter. 

Now I'm running into a different error... see below... not sure how to interpret this. I've run the same work flow on a few other data sets and it runs fine but when I get to running it on later years of data I get this error. The GLM text output show that the model runs and gives model stats but it seems like it maybe getting hung up on generating the model ROC plot validation curve and the confusion matrix

The R scipt returned the following warning(s). The R warning message is below -

Warning in n.x * n.y : NAs produced by integer overflow

Warning in n.x * n.y : NAs produced by integer overflow

Error in plot.window(...) : need finite 'xlim' values

Calls: FitModels ... plot -> plot -> plot.default -> localWindow -> plot.window

In addition: Warning messages:

1: In min(x) : no non-missing arguments to min; returning Inf

2: In max(x) : no non-missing arguments to max; returning -Inf

Execution halted

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

An error was encountered in the R script for this module.

The R error message is below:

Warning in n.x * n.y : NAs produced by integer overflow

Warning in n.x * n.y : NAs produced by integer overflow

Error in plot.window(...) : need finite 'xlim' values

Calls: FitModels ... plot -> plot -> plot.default -> localWindow -> plot.window

In addition: Warning messages:

1: In min(x) : no non-missing arguments to min; returning Inf

2: In max(x) : no non-missing arguments to max; returning -Inf

Execution halted



Traceback (most recent call last):

File "vistrails.py", line 48, in <module>

userpackages_dir = os.environ['VISTRAILS_USERPACKAGES_DIR']

File "C:\VisTrails_SAHM\vistrails\Python27_64\lib\os.py", line 423, in __getitem__

return self.data[key.upper()]

KeyError: 'VISTRAILS_USERPACKAGES_DIR'


Reply all
Reply to author
Forward
0 new messages