# fullSVC_line: Sample Function for GP-based SVC Model on Real Line In varycoef: Modeling Spatially Varying Coefficients

## Description

Samples SVC data on a real line. The SVCs parameters and the sample locations have to be provided. The SVCs are assumed to have an Matern covariance function. The sampled model matrix contains an intercept as a first column and further covariates sampled from a standard normal. The SVCs are sampled according to their given parametrization and at respective observation locations. The error vector sampled from a nugget effect. Finally, the response vector is computed.

## Usage

 `1` ```fullSVC_line(df.pars, nugget.sd, locs) ```

## Arguments

 `df.pars` (`data.frame(p, 3)`) Contains the mean and covariance parameters of SVCs. The four columns must have the names `"mean"`, `"nu"`, `"var"`, and `"scale"`. `nugget.sd` (`numeric(1)`) Standard deviation of the nugget / error term. `locs` (`numeric(n)`) The vector contains the observation locations and therefore defines the number of observations to be `n`.

## Value

`list`
Returns a list with the response `y`, model matrix `X`, a matrix `beta` containing the sampled SVC at given locations, a vector `eps` containing the error, and a vector `locs` containing the original locations.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17``` ```set.seed(123) # SVC parameters (df.pars <- data.frame( nu = c(1.5, 1.5), var = c(2, 1), scale = c(3, 1), mean = c(1, 2))) # nugget standard deviation tau <- 0.5 # sample locations s <- sort(runif(500, min = 0, max = 10)) SVCdata <- fullSVC_line( df.pars = df.pars, nugget.sd = tau, locs = s ) ```

varycoef documentation built on June 3, 2021, 5:10 p.m.