Format data for fitting a glmmfields model
format_data(
data,
y,
X,
time,
lon = "lon",
lat = "lat",
station = NULL,
nknots = 25L,
covariance = c("squared-exponential", "exponential", "matern"),
fixed_intercept = FALSE,
cluster = c("pam", "kmeans")
)A data frame to be formatted
A numeric vector of the response
A matrix of the predictors
A character object giving the name of the time column
A character object giving the name of the longitude column
A character object giving the name of the latitude column
A numeric vector giving the integer ID of the station
The number of knots
The type of covariance function
Should the intercept be fixed?
The type of clustering algorithm used to determine the not locations.
"pam" = pam. kmeans is faster for large datasets.