Collapse repeated spatial locations into unique locations
Krig.replicates.RdIn case that several observations are available for a single spatial location find the group means and replicate variability
Arguments
- out
A list with components
x,y,weights, and possibilyXMat.- x
Spatial locations.
- y
Spatial observations
- XMat
Spatial covariates.
- weights
Weights proportional to reciprocal varainces of observations.
- digits
Number of significant digits to consider in determing a replicate location.
- verbose
If TRUE print out details for debugging.
Details
This function figures out which locations are the same and within the function fast.1way
use tapply to find replicate group means and standard deviations.
NOTE: it is assumed the XMat covariates are unique at the locations. Currently these functions
can not handle a model with common spatial locations but different values for the XMat covariates.
Value
A list with components:
- yM
Data at unique locations and where more than one observation is available this is the mean of the replicates.
- xM
Unique spatial locations.
- weightsM
Weights matching the unique lcoations proportional to reciprocal variances This is found as a combination of the original weights at each location.
- XMatM
Values of the covariates at the unique lcoations.
- uniquerows
Index for unique rows of
x.- tauHat.rep, tauHat.pure.error
Standard deviation of pure error estimate based on replicate groups (and adjusting for possibly different weights.)
- rep.info
Integer tags indicating replicate groups.