Description Usage Arguments Details Value Examples
View source: R/nugget_estimate.R
Estimates the nugget variance τ^2 under the simplified assumption that Q = α I. If not desired, user can initially pass tau_sq
.
1 | nugget_estimate(Phi_Phi, Phi_S_Phi, trS, n)
|
Phi_Phi |
Inner product of basis matrices, Φ'Φ. Computed as |
Phi_S_Phi |
Inner product of the basis matrices and data, Φ'SΦ. This is where the data directly enters the algorithm. Note: do not compute sample covariance S explicitly. With |
trS |
Trace of empirical covariance matrix. |
n |
Number of locations. |
Performs a joint optimization over α,τ^2 in the -2*negative log likelihood with respect to Q = α I and τ^2. Calls L-BFBS-B using optim
.
Estimate of the nugget variance.
1 2 3 4 5 6 | basis.setup <- BGLBasisSetup(y=tmin$data,locs=tmin$lon.lat.proj,basis="LatticeKrig",
crossvalidation=FALSE, NC=30,nlevel=1)
Phi_Phi <- basis.setup$Phi_Phi
Phi_S_Phi <- basis.setup$Phi_S_Phi
trS <- basis.setup$trS
tau_sq <- nugget_estimate(Phi_Phi,Phi_S_Phi,trS,n=dim(tmin$lon.lat)[1])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.