Extract the (normalized) utility scale for an elimination-by-aspects (EBA) model.

uscale(object, norm = "sum", log = FALSE)

Arguments

object

an object of class eba, typically the result of a call to eba

norm

either sum, so the scale values sum to unity (default); or a number from 1 to number of stimuli, so this scale value becomes one; or NULL (no normalization)

log

should the log of the utility scale values be returned? Defaults to FALSE.

Details

Each utility scale value is defined as the sum of aspect values (EBA model parameters) that characterize a given stimulus. First these sums are computed for all stimuli, then normalization (if any) is applied. As each type of normalization corresponds to a multiplication by a positive real number, the ratio between scale values remains constant.

Value

The (normalized) utility scale of the stimuli.

See also

Examples

data(drugrisk)
A <- list(c(1), c(2,7), c(3,7), c(4,7,8), c(5,7,8), c(6,7,8))
eba1 <- eba(drugrisk[, , group = "male30"], A)  # EBA model

uscale(eba1)                    # sum-to-unity normalization
#>        alc        tob        can        ecs        her        coc 
#> 0.04264735 0.02178031 0.02385802 0.17877250 0.53993276 0.19300905 
uscale(eba1, norm=1)            # u(alcohol) := 1
#>        alc        tob        can        ecs        her        coc 
#>  1.0000000  0.5107072  0.5594256  4.1918779 12.6604047  4.5256982 
uscale(eba1, norm=5)            # u(heroine) := 1
#>        alc        tob        can        ecs        her        coc 
#> 0.07898642 0.04033893 0.04418702 0.33110142 1.00000000 0.35746869 
uscale(eba1, norm=NULL)         # no normalization
#>        alc        tob        can        ecs        her        coc 
#> 0.04027701 0.02056976 0.02253199 0.16883632 0.50992327 0.18228160 
uscale(eba1, norm=1, log=TRUE)  # log utility scale, log u(alcohol) := 0
#>        alc        tob        can        ecs        her        coc 
#>  0.0000000 -0.6719589 -0.5808448  1.4331488  2.5384794  1.5097719