Skip to contents

This method extracts a list containing the regression coefficients for a PrestoGP model.

Usage

# S4 method for class 'PrestoGPModel'
get_beta(model)

Arguments

model

The PrestoGP model object

Value

A list containing the regression coefficients. Each element of the list corresponds to an outcome variable. The final element of the list contains the intercept(s).

Details

It is important to note that the intercepts are estimated on the transformed data. They are not useful for making predictions on the original (untransformed) data. Use prestogp_predict to make predictions based on a PrestoGP model.

References

  • Messier, K.P. and Katzfuss, M. "Scalable penalized spatiotemporal land-use regression for ground-level nitrogen dioxide", The Annals of Applied Statistics (2021) 15(2):688-710.

Examples

data(soil)
soil <- soil[!is.na(soil[,5]),] # remove rows with NA's
y <- soil[,4]                   # predict moisture content
X <- as.matrix(soil[,5:9])
locs <- as.matrix(soil[,1:2])

soil.vm <- new("VecchiaModel", n_neighbors = 10)
soil.vm <- prestogp_fit(soil.vm, y, X, locs)
#> 
#> Beginning iteration 1 
#> Estimating theta... 
#> Estimation of theta complete 
#> Estimating beta... 
#> Estimation of beta complete 
#> Iteration 1 complete 
#> Current penalized likelihood: 487.4668 
#> Current MSE: 9.104869 
#> Beginning iteration 2 
#> Estimating theta... 
#> Estimation of theta complete 
#> Estimating beta... 
#> Estimation of beta complete 
#> Iteration 2 complete 
#> Current penalized likelihood: 486.6606 
#> Current MSE: 9.107287 
#> Beginning iteration 3 
#> Estimating theta... 
#> Estimation of theta complete 
#> Estimating beta... 
#> Estimation of beta complete 
#> Iteration 3 complete 
#> Current penalized likelihood: 486.6414 
#> Current MSE: 9.107472 
#> Beginning iteration 4 
#> Estimating theta... 
#> Estimation of theta complete 
#> Estimating beta... 
#> Estimation of beta complete 
#> Iteration 4 complete 
#> Current penalized likelihood: 486.6414 
#> Current MSE: 9.107445 
get_beta(soil.vm)
#> $Y
#>   NO3.N Total.N   NH4.N     DOC    N20N 
#>       0       0       0       0       0 
#> 
#> $`(Intercept)`
#> (Intercept) 
#>  0.05075931 
#>