TERR or TSSS returns "Error in loess.raw(y[which], x[which, , drop = FALSE], weights[which]... : zero-width neighborhood. make span bigger" in the Spatial Heat Map Data Function tool on the TIBCO Community site.
book
Article ID: KB0080233
calendar_today
Updated On:
Products
Versions
Spotfire Analyst
All supported versions
Spotfire Enterprise Runtime for R
All supported versions
Spotfire Statistics Services
All supported versions
Description
TERR or TSSS returns "Error in loess.raw(y[which], x[which, , drop = FALSE], weights[which]... : zero-width neighborhood. make span bigger" in the Spatial Heat Map Data Function tool on the TIBCO Community site.
Issue/Introduction
TERR or TSSS returns "Error in loess.raw(y[which], x[which, , drop = FALSE], weights[which]... : zero-width neighborhood. make span bigger" in the Spatial Heat Map Data Function tool on the TIBCO Community site.
Environment
All supported environments
Resolution
The solution is to provide a larger value (but still between 0 and 1) for the example DXP file's "smooth.scale" document property.
Background:
The interactive Spatial Heat Map Data Function tool is an example Spotfire DXP file at the following URL on the TIBCO Community site:
It fits a local regression model to the data, using a call to the loess() function in the Spotfire desktop client's built-in local TIBCO Enterprise Runtime for R (TERR) engine. It can also be run from Spotfire Web Player, using a URL connection to a TIBCO Spotfire Statistics Services (TSSS) instance that uses TERR as its statistical engine.
The following error is returned if you specify a value for the example DXP file's "smooth.scale" document property that is too small for effective use with the input data:
Error in loess.raw(y[which], x[which, , drop = FALSE], weights[which]... : zero-width neighborhood. make span bigger
For example, values of 0.5 or 0.1 will work with the example's input data, but a value of 0.05 will fail.
The example DXP file's "[TERR] WKB Heatmap" data function uses the "smooth.scale" document property as its "smooth.scale" input parameter. The "smooth.scale" parameter is used in the data function's TERR script as the "span" argument in the script's call to TERR's built-in loess() function.
To fit a local regression model to the data, the loess() function calls its hidden stats:::loess.raw() method.
The loess.raw() method checks to see if the "span" value provided can be used with the input data provided and returns this error message if the test fails.
Additional Information
More information on TERR's built-in loess() function can be found in the help file that is opened in a web browser by issuing this command in a TERR Console session: