Description Usage Arguments Value Author(s) See Also Examples
Creates a data matrix from a STdata
/STmodel
object.
Missing observations are marked as NA
.
1 2 |
STdata |
A |
obs |
A vector of observations. |
date |
A vector of observation times. |
ID |
A vector of observation locations. |
subset |
A subset of locations to extract the data matrix for. A warning
is given for each name not found in |
Returns a matrix with dimensions (number of timepoints)-by-(number
of locations). Row and column names of the matrix are taken as ID
and sort(unique(date))
respectively.
Johan Lindstrom
Other data matrix: SVDmiss
,
SVDsmooth
,
estimateBetaFields
,
mesa.data.raw
Other STdata functions: c.STmodel
,
createSTdata
, createSTmodel
,
detrendSTdata
,
estimateBetaFields
,
removeSTcovarMean
,
updateTrend.STdata
Other STmodel functions: createCV
,
createSTmodel
,
dropObservations
,
estimateBetaFields
,
loglikeSTdim
, loglikeST
,
predictNaive
, processLUR
,
processLocation
, updateCovf
,
updateTrend.STdata
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ##load the data
data(mesa.model)
##create a data matrix
M1 <- createDataMatrix(mesa.model)
dim(M1)
head(M1)
##create data matrix for only a few locations
M2 <- createDataMatrix(mesa.model, subset =
c("60370002","60370016","60370113","60371002",
"60371103","60371201","L001","L002"))
dim(M2)
head(M2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.