ipft (version 0.2.2)

ipfEstimate: This function estimates the location of the test observations

Description

This function estimates the location of the test observations

Usage

ipfEstimate(ipfmodel, locdata, loctest = NULL)

Arguments

ipfmodel
an ipfModel
locdata
a matrix or a data frame containing the position of the training set observations
loctest
a matrix or a data frame containing the position of the test set observations

Value

An S4 class object of type ipfEstimation, with the following slots: location -> a matrix with the predicted locations grouploc -> a matrix with the location data for each group errors -> a numeric vector with the errors

Examples

Run this code

    model <- ipfKnn(ipftrain[, 1:168], ipftest[, 1:168])
    estimation <- ipfEstimate(model, ipftrain[, 169:170], ipftest[, 169:170])

    groups <- ipfGroup(ipftrain, LONGITUDE, LATITUDE)
    model <- ipfProb(ipftrain[, 1:168], ipftest[, 1:168], groups, k = 9, delta = 10)
    estimation <- ipfEstimate(model, ipftrain[, 169:170], ipftest[, 169:170])

Run the code above in your browser using DataLab