Extract Model Matrix from GKw Regression Model
Source:R/gkwreg-other-methods.R
model.matrix.gkwreg.RdExtracts the model matrix (design matrix) from a fitted Generalized Kumaraswamy regression model object.
Usage
# S3 method for class 'gkwreg'
model.matrix(object, ...)Examples
# \donttest{
data(GasolineYield)
fit <- gkwreg(yield ~ batch + temp, data = GasolineYield, family = "kw")
#> Warning: NaNs produced
head(model.matrix(fit))
#> (Intercept) batch1 batch2 batch3 batch4 batch5 batch6 batch7 batch8 batch9
#> 1 1 1 0 0 0 0 0 0 0 0
#> 2 1 1 0 0 0 0 0 0 0 0
#> 3 1 1 0 0 0 0 0 0 0 0
#> 4 1 1 0 0 0 0 0 0 0 0
#> 5 1 0 1 0 0 0 0 0 0 0
#> 6 1 0 1 0 0 0 0 0 0 0
#> temp
#> 1 205
#> 2 275
#> 3 345
#> 4 407
#> 5 218
#> 6 273
# }