Function for generates a numeric matrix with principal coordinates of a new individual then you could obtain distances from this matrix and you can do a prediction using a Gower's result (1971) and Cuadras & Arenas (1990) which relates the squared distances vector with the principal coordinates vector associated to the new individual.

1 |

`newdata` |
data frame values of new individual. |

`eigenvalues` |
the |

`data` |
matrix or data frame containing the explanatory variables. These variables can be numeric, ordered, or factor, the symmetric or asymmetric binary variables should be numeric and only contain 0 and 1 character variables will be converted to factor. NAs are tolerated. With these variables the principal coordinates are built which become the regressors in the linear model. |

`trend` |
matrix |

`...` |
further parameters to be passed to the |

Returns a numeric matrix with principal coordinates of the new individual.

Cuadras, CM. and Arenas, C. (1990).*A distance-based regression model for prediction with mixed data*.
Communications in Statistics A - Theory and Methods 19, 2261-2279

Gower, J. C. (1971). *A general coefficient of similarity and some of its properties*. Biometrics 27:857-871.

Melo, C. E. (2012). *Analisis geoestadistico espacio tiempo basado en distancias y splines con
aplicaciones*. PhD. Thesis. Universitat de Barcelona. 276 p. [link]

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
## Not run:
data(croatia.temp)
data(croatiadb)
# prediction case: one point
point <- data.frame(670863,5043464,5,170,200,15.7,3)
names(point) <- c("x","y","t","dem","dsea","twi","est")
croatia.temp[,7] <- as.factor(croatia.temp[,7])
dblm1 <- dblm(data=croatia.temp,y=croatiadb$MTEMP)
newdata1 <- t(cp.xnews(newdata=point,eigenvalues=dblm1$ev, data=croatia.temp,
trend=dblm1$cp))
colnames(newdata1) <- c("X1","X2","X3","X4","X5","X6","X7","X8","X9","X10")
## End(Not run)
``` |

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.