Description Usage Arguments Details Value Warning Note Author(s) References See Also Examples
This function helps choosing the optimal bandwidth for the Geographically Weighted Zero Inflated Poisson Regression (GWZIPR).
1 2 |
formula |
the local model to be fitted using the same syntax used in the zeroinfl function of the R package |
family |
a specification of the count model family to be used in the local model as in the |
dframe |
a numeric data frame of at least two suitable variables (one dependent and one independent) |
coords |
a numeric matrix or data frame of two columns giving the X,Y coordinates of the observations |
kernel |
the kernel to be used in the regression. Options are "adaptive" or "fixed". The weighting scheme used here is defined by the bi-square function |
algorithm |
a character argument that specifies whether the function will use an |
optim.method |
the optimisation method to be used. A detailed discussion is available at the 'Details' section of the function |
b.min |
the minimum bandwidth. This is important for both algorithms. In the case of the |
b.max |
the maximum bandwidth. This is important for both algorithms. In the case of the |
step |
this numeric argument is used only in the case of a |
Please carefully read the function optim(stats)
when using a heuristic
algorithm.
bw |
The optimal bandwidth (fixed or adaptive) |
CV |
The corresponding Cross Validation score for the optimal bandwidth |
CVs |
Available only in the case of the |
Large datasets increase the processing time.
Please select the optimisation algorithm carefully. This function needs further testing. Please report any bugs!
Stamatis Kalogirou <stamatis@lctools.science>
Kalogirou, S. (2016) Destination Choice of Athenians: an application of geographically weighted versions of standard and zero inflated Poisson spatial interaction models, Geographical Analysis, 48(2),pp. 191-230. DOI: 10.1111/gean.12092 http://onlinelibrary.wiley.com/doi/10.1111/gean.12092/abstract
1 2 3 | RDF <- random.test.data(9,9,3,"zip")
gw.zip.bw <- gw.zi.bw(dep ~ X1 + X2, "poisson", RDF, cbind(RDF$X,RDF$Y),
kernel = 'adaptive', b.min = 54, b.max=55)
|
Loading required package: reshape
Loading required package: weights
Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2
Attaching package: 'Hmisc'
The following objects are masked from 'package:base':
format.pval, units
Loading required package: gdata
sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to locate valid perl interpreter
gdata:
gdata: read.xls() will be unable to read Excel XLS and XLSX files
gdata: unless the 'perl=' argument is used to specify the location of a
gdata: valid perl intrpreter.
gdata:
gdata: (To avoid display of this message in the future, please ensure
gdata: perl is installed and available on the executable search path.)
sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLX' (Excel 97-2004) files.
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLSX' (Excel 2007+) files.
gdata: Run the function 'installXLSXsupport()'
gdata: to automatically download and install the perl
gdata: libaries needed to support Excel XLS and XLSX formats.
Attaching package: 'gdata'
The following object is masked from 'package:stats':
nobs
The following object is masked from 'package:utils':
object.size
The following object is masked from 'package:base':
startsWith
Loading required package: mice
Attaching package: 'mice'
The following objects are masked from 'package:base':
cbind, rbind
Loading required package: pscl
Classes and Methods for R developed in the
Political Science Computational Laboratory
Department of Political Science
Stanford University
Simon Jackman
hurdle and zeroinfl functions by Achim Zeileis
Loading required package: MASS
Number of Observations: 81
Bandwidth: 54 CV: 1211.327
Bandwidth: 55 CV: 1206.747There were 50 or more warnings (use warnings() to see the first 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.