This function predicts the response values data using the results of a model object returned from gdm and a data frame environmental data for a set of sites formatted as follows:

Observed,X0,Y0,X1,Y1,Pred1SiteA,Pred2SiteA,...,PredNSiteA, Pred1SiteB,Pred2SiteB,...,PredNSiteB

The first column should be a ratio based dissimilarity measure between SitesA and SitesB. In the case of gdm.predict, the first column could be set with dummy data as it is only the predictor data (and the XY columns if geo=TRUE) that will be used for the predictions. The second and third columns, X0 and Y0 represent the coordinates of the first site from a site pair. The fourth and fifth columns, X1 and Y1 represent the coordinates of the second site from a site pair. Note that these columns MUST be included, even if you do not intend to use geographic distance as a predictor. These columns can be loaded with dummy data if the actual coordinates are unknown. The next columns are for N predictors for SiteA and followed by N predictors for Site B.

1 | ```
predict.gdm(model, data)
``` |

`model` |
A gdm object. |

`data` |
A data frame representing the model data values for a collection of site pairs. The observed response data must be located in the first column. The weights data must be located in the second column. If geo is TRUE, then the X0,Y0 and Y0,Y1 columns will be used for calculating the geographic distance between each site in each site pair for inclusion of the geographic predictor term into the GDM model. If geo is FALSE, the default, then the X0,Y0,X1 and Y1 data columns are ignored. The predictor data for Site A and the predictor data for Site B follows. |

Predict returns a response vector with the same length as the number of rows in each of the input data frame.

Glenn Manion

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.