Attribute based brand maps

prmap(dataset, brand, attr, pref = "", nr_dim = 2, hcor = FALSE,
  data_filter = "", envir = parent.frame())

Arguments

dataset

Dataset

brand

A character variable with brand names

attr

Names of numeric variables

pref

Names of numeric brand preference measures

nr_dim

Number of dimensions

hcor

Use polycor::hetcor to calculate the correlation matrix

data_filter

Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000")

envir

Environment to extract data from

Value

A list of all variables defined in the function as an object of class prmap

Details

See https://radiant-rstats.github.io/docs/multivariate/prmap.html for an example in Radiant

See also

summary.prmap to summarize results

plot.prmap to plot results

Examples

prmap(computer, brand = "brand", attr = "high_end:business") %>% str()
#> List of 15 #> $ scores :'data.frame': 5 obs. of 2 variables: #> ..$ RC1: num [1:5] 1.299 -0.318 -1.187 -0.522 0.728 #> ..$ RC2: num [1:5] 0.0937 -0.2089 -0.9343 1.6481 -0.5986 #> $ fres :List of 29 #> ..$ values : num [1:7] 5.36 1.15 3.27e-01 1.59e-01 4.21e-16 ... #> ..$ rotation : chr "varimax" #> ..$ n.obs : logi NA #> ..$ communality : Named num [1:7] 0.908 0.965 0.975 0.939 0.986 ... #> .. ..- attr(*, "names")= chr [1:7] "high_end" "stylish" "modern" "value" ... #> ..$ loadings : 'loadings' num [1:7, 1:2] 0.939 0.98 0.987 -0.928 -0.972 ... #> .. ..- attr(*, "dimnames")=List of 2 #> .. .. ..$ : chr [1:7] "high_end" "stylish" "modern" "value" ... #> .. .. ..$ : chr [1:2] "RC1" "RC2" #> ..$ fit : num 0.996 #> ..$ fit.off : num 0.997 #> ..$ fn : chr "principal" #> ..$ Call : language psych::principal(r = cmat, nfactors = nr_dim, rotate = "varimax", scores = FALSE, oblique.scores = FALSE) #> ..$ uniquenesses: Named num [1:7] 0.0923 0.035 0.0252 0.061 0.0136 ... #> .. ..- attr(*, "names")= chr [1:7] "high_end" "stylish" "modern" "value" ... #> ..$ complexity : Named num [1:7] 1.06 1.01 1 1.18 1.09 ... #> .. ..- attr(*, "names")= chr [1:7] "high_end" "stylish" "modern" "value" ... #> ..$ chi : num NA #> ..$ EPVAL : num NA #> ..$ R2 : Named num [1:2] 1 1 #> .. ..- attr(*, "names")= chr [1:2] "RC1" "RC2" #> ..$ objective : num 58.4 #> ..$ residual : num [1:7, 1:7] 0.0923 -0.0448 0.0388 0.0264 -0.0284 ... #> .. ..- attr(*, "dimnames")=List of 2 #> .. .. ..$ : chr [1:7] "high_end" "stylish" "modern" "value" ... #> .. .. ..$ : chr [1:7] "high_end" "stylish" "modern" "value" ... #> ..$ rms : num 0.0389 #> ..$ factors : int 2 #> ..$ dof : num 8 #> ..$ null.dof : num 21 #> ..$ null.model : num 70.2 #> ..$ criteria : Named num [1:3] 58.4 NA NA #> .. ..- attr(*, "names")= chr [1:3] "objective" "" "" #> ..$ PVAL : logi NA #> ..$ weights : num [1:7, 1:2] 0.0836 0.2339 0.2632 -0.0951 -0.2511 ... #> .. ..- attr(*, "dimnames")=List of 2 #> .. .. ..$ : chr [1:7] "high_end" "stylish" "modern" "value" ... #> .. .. ..$ : chr [1:2] "RC1" "RC2" #> ..$ r.scores : num [1:2, 1:2] 1.00 -6.32e-12 -6.32e-12 1.00 #> .. ..- attr(*, "dimnames")=List of 2 #> .. .. ..$ : chr [1:2] "RC1" "RC2" #> .. .. ..$ : chr [1:2] "RC1" "RC2" #> ..$ rot.mat : num [1:2, 1:2] 0.999 -0.044 0.044 0.999 #> ..$ Vaccounted : num [1:5, 1:2] 5.352 0.765 0.765 0.822 0.822 ... #> .. ..- attr(*, "dimnames")=List of 2 #> .. .. ..$ : chr [1:5] "SS loadings" "Proportion Var" "Cumulative Var" "Proportion Explained" ... #> .. .. ..$ : chr [1:2] "RC1" "RC2" #> ..$ Structure : 'loadings' num [1:7, 1:2] 0.939 0.98 0.987 -0.928 -0.972 ... #> .. ..- attr(*, "dimnames")=List of 2 #> .. .. ..$ : chr [1:7] "high_end" "stylish" "modern" "value" ... #> .. .. ..$ : chr [1:2] "RC1" "RC2" #> ..$ scores : num [1:5, 1:2] 1.299 -0.318 -1.187 -0.522 0.728 ... #> .. ..- attr(*, "dimnames")=List of 2 #> .. .. ..$ : chr [1:5] "Apple" "Dell" "Gateway" "HP" ... #> .. .. ..$ : chr [1:2] "RC1" "RC2" #> ..- attr(*, "class")= chr [1:2] "psych" "principal" #> $ cmat : num [1:7, 1:7] 1 0.865 0.96 -0.798 -0.974 ... #> ..- attr(*, "dimnames")=List of 2 #> .. ..$ : chr [1:7] "high_end" "stylish" "modern" "value" ... #> .. ..$ : chr [1:7] "high_end" "stylish" "modern" "value" ... #> $ nrObs : int 5 #> $ anyCategorical: Named logi [1:7] FALSE FALSE FALSE FALSE FALSE FALSE ... #> ..- attr(*, "names")= chr [1:7] "high_end" "stylish" "modern" "value" ... #> $ brands : chr [1:5] "Apple" "Dell" "Gateway" "HP" ... #> $ df_name : chr "computer" #> $ vars : chr [1:2] "brand" "high_end:business" #> $ dataset :Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 5 obs. of 8 variables: #> ..$ brand : chr [1:5] "Apple " "Dell " "Gateway " "HP " ... #> ..$ high_end : num [1:5] 5.7 4.81 3.12 3.62 5.58 #> ..$ stylish : num [1:5] 6.01 3.79 3.27 4.16 5.46 #> ..$ modern : num [1:5] 6.04 4.37 2.78 3.77 5.18 #> ..$ value : num [1:5] 2.77 5.12 5.98 4.09 3.1 #> ..$ dated : num [1:5] 3.15 4.29 5.08 4.88 3.27 #> ..$ innovative: num [1:5] 4.76 2.56 2.27 2.87 2.97 #> ..$ business : num [1:5] 4.02 4.07 2.93 5.63 3.53 #> ..- attr(*, "description")= chr "## Computer positioning\n\n### Description\n\nThe data represent consumer evaluations for a set of computers on"| __truncated__ #> $ brand : chr "brand" #> $ attr : chr [1:7] "high_end" "stylish" "modern" "value" ... #> $ pref : chr "" #> $ nr_dim : num 2 #> $ hcor : logi FALSE #> $ data_filter : chr "" #> - attr(*, "class")= chr [1:3] "prmap" "full_factor" "list"