Title: | Multivariate Menu for Radiant: Business Analytics using R and Shiny |
---|---|
Description: | The Radiant Multivariate menu includes interfaces for perceptual mapping, factor analysis, cluster analysis, and conjoint analysis. The application extends the functionality in 'radiant.data'. |
Authors: | Vincent Nijs [aut, cre] |
Maintainer: | Vincent Nijs <[email protected]> |
License: | AGPL-3 | file LICENSE |
Version: | 1.6.6 |
Built: | 2024-11-11 04:46:05 UTC |
Source: | https://github.com/radiant-rstats/radiant.multivariate |
Carpet cleaners
data(carpet)
data(carpet)
A data frame with 18 rows and 5 variables
Rankings reflect the evaluation of 18 alternative carpet cleaners by one respondent. Description provided in attr(carpet," description")
City distances
data(city)
data(city)
A data frame with 45 rows and 3 variables
Distance in miles between nine cities in the USA. The dataset is used to illustrate multi-dimensional scaling (MDS). Description provided in attr(city, "description")
City distances 2
data(city2)
data(city2)
A data frame with 78 rows and 3 variables
Distance in miles between 12 cities in the USA. The dataset is used to illustrate multi-dimensional scaling (MDS). Description provided in attr(city2, "description")
Sort and clean loadings
clean_loadings(floadings, cutoff = 0, fsort = FALSE, dec = 8, repl = NA)
clean_loadings(floadings, cutoff = 0, fsort = FALSE, dec = 8, repl = NA)
floadings |
Data frame with loadings |
cutoff |
Show only loadings with (absolute) values above cutoff (default = 0) |
fsort |
Sort factor loadings |
dec |
Number of decimals to show |
repl |
Replace loadings below the cutoff by NA (or "") |
See https://radiant-rstats.github.io/docs/multivariate/full_factor.html for an example in Radiant
result <- full_factor(shopping, "v1:v6", nr_fact = 2) clean_loadings(result$floadings, fsort = TRUE, cutoff = .5, dec = 2)
result <- full_factor(shopping, "v1:v6", nr_fact = 2) clean_loadings(result$floadings, fsort = TRUE, cutoff = .5, dec = 2)
Perceptions of computer (re)sellers
data(computer)
data(computer)
A data frame with 5 rows and 8 variables
Perceptions of computer (re)sellers. The dataset is used to illustrate perceptual maps. Description provided in attr(computer, "description")
Conjoint analysis
conjoint( dataset, rvar, evar, int = "", by = "none", reverse = FALSE, data_filter = "", envir = parent.frame() )
conjoint( dataset, rvar, evar, int = "", by = "none", reverse = FALSE, data_filter = "", envir = parent.frame() )
dataset |
Dataset |
rvar |
The response variable (e.g., profile ratings) |
evar |
Explanatory variables in the regression |
int |
Interaction terms to include in the model |
by |
Variable to group data by before analysis (e.g., a respondent id) |
reverse |
Reverse the values of the response variable ('rvar') |
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 |
See https://radiant-rstats.github.io/docs/multivariate/conjoint.html for an example in Radiant
A list with all variables defined in the function as an object of class conjoint
summary.conjoint
to summarize results
plot.conjoint
to plot results
conjoint(mp3, rvar = "Rating", evar = "Memory:Shape") %>% str()
conjoint(mp3, rvar = "Rating", evar = "Memory:Shape") %>% str()
Factor analysis (PCA)
full_factor( dataset, vars, method = "PCA", hcor = FALSE, nr_fact = 1, rotation = "varimax", data_filter = "", envir = parent.frame() )
full_factor( dataset, vars, method = "PCA", hcor = FALSE, nr_fact = 1, rotation = "varimax", data_filter = "", envir = parent.frame() )
dataset |
Dataset |
vars |
Variables to include in the analysis |
method |
Factor extraction method to use |
hcor |
Use polycor::hetcor to calculate the correlation matrix |
nr_fact |
Number of factors to extract |
rotation |
Apply varimax rotation or no rotation ("varimax" or "none") |
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 |
See https://radiant-rstats.github.io/docs/multivariate/full_factor.html for an example in Radiant
A list with all variables defined in the function as an object of class full_factor
summary.full_factor
to summarize results
plot.full_factor
to plot results
full_factor(shopping, "v1:v6") %>% str()
full_factor(shopping, "v1:v6") %>% str()
Hierarchical cluster analysis
hclus( dataset, vars, labels = "none", distance = "sq.euclidian", method = "ward.D", max_cases = 5000, standardize = TRUE, data_filter = "", envir = parent.frame() )
hclus( dataset, vars, labels = "none", distance = "sq.euclidian", method = "ward.D", max_cases = 5000, standardize = TRUE, data_filter = "", envir = parent.frame() )
dataset |
Dataset |
vars |
Vector of variables to include in the analysis |
labels |
A vector of labels for the leaves of the tree |
distance |
Distance |
method |
Method |
max_cases |
Maximum number of cases allowed (default is 1000). Set to avoid long-running analysis in the radiant web-interface |
standardize |
Standardized data (TRUE or FALSE) |
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 |
See https://radiant-rstats.github.io/docs/multivariate/hclus.html for an example in Radiant
A list of all variables used in hclus as an object of class hclus
summary.hclus
to summarize results
plot.hclus
to plot results
hclus(shopping, vars = "v1:v6") %>% str()
hclus(shopping, vars = "v1:v6") %>% str()
K-clustering
kclus( dataset, vars, fun = "kmeans", hc_init = TRUE, distance = "sq.euclidian", method = "ward.D", seed = 1234, nr_clus = 2, standardize = TRUE, lambda = NULL, data_filter = "", envir = parent.frame() )
kclus( dataset, vars, fun = "kmeans", hc_init = TRUE, distance = "sq.euclidian", method = "ward.D", seed = 1234, nr_clus = 2, standardize = TRUE, lambda = NULL, data_filter = "", envir = parent.frame() )
dataset |
Dataset |
vars |
Vector of variables to include in the analysis |
fun |
Use either "kmeans" or "kproto" for clustering |
hc_init |
Use centers from hclus as the starting point |
distance |
Distance for hclus |
method |
Method for hclus |
seed |
Random see to use for k-clustering if hc_init is FALSE |
nr_clus |
Number of clusters to extract |
standardize |
Standardize data (TRUE or FALSE) |
lambda |
Parameter > 0 to trade off between Euclidean distance of numeric variables and simple matching coefficient between categorical variables. Also a vector of variable specific factors is possible where the order must correspond to the order of the variables in the data. In this case all variables' distances will be multiplied by their corresponding lambda value. |
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 |
See https://radiant-rstats.github.io/docs/multivariate/kclus.html for an example in Radiant
A list of all variables used in kclus as an object of class kclus
summary.kclus
to summarize results
plot.kclus
to plot results
store.kclus
to add cluster membership to the selected dataset
kclus(shopping, c("v1:v6"), nr_clus = 3) %>% str()
kclus(shopping, c("v1:v6"), nr_clus = 3) %>% str()
(Dis)similarity based brand maps (MDS)
mds( dataset, id1, id2, dis, method = "metric", nr_dim = 2, seed = 1234, data_filter = "", envir = parent.frame() )
mds( dataset, id1, id2, dis, method = "metric", nr_dim = 2, seed = 1234, data_filter = "", envir = parent.frame() )
dataset |
Dataset |
id1 |
A character variable or factor with unique entries |
id2 |
A character variable or factor with unique entries |
dis |
A numeric measure of brand dissimilarity |
method |
Apply metric or non-metric MDS |
nr_dim |
Number of dimensions |
seed |
Random seed |
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 |
See https://radiant-rstats.github.io/docs/multivariate/mds.html for an example in Radiant
A list of all variables defined in the function as an object of class mds
summary.mds
to summarize results
plot.mds
to plot results
mds(city, "from", "to", "distance") %>% str() mds(diamonds, "clarity", "cut", "price") %>% str()
mds(city, "from", "to", "distance") %>% str() mds(diamonds, "clarity", "cut", "price") %>% str()
Conjoint data for Movie theaters
data(movie)
data(movie)
A data frame with 18 rows and 6 variables
Rankings reflect the evaluation of 18 alternative movie theaters by one respondent. Description provided in attr(movie, "description")
Conjoint data for MP3 players
data(mp3)
data(mp3)
A data frame with 18 rows and 6 variables
Ratings reflect the evaluation of 18 alternative MP3 players by one respondent. Description provided in attr(mp3, "description")
Plot method for the conjoint function
## S3 method for class 'conjoint' plot( x, plots = "pw", show = "", scale_plot = FALSE, shiny = FALSE, custom = FALSE, ... )
## S3 method for class 'conjoint' plot( x, plots = "pw", show = "", scale_plot = FALSE, shiny = FALSE, custom = FALSE, ... )
x |
Return value from |
plots |
Show either the part-worth ("pw") or importance-weights ("iw") plot |
show |
Level in by variable to analyze (e.g., a specific respondent) |
scale_plot |
Scale the axes of the part-worth plots to the same range |
shiny |
Did the function call originate inside a shiny app |
custom |
Logical (TRUE, FALSE) to indicate if ggplot object (or list of ggplot objects) should be returned. This option can be used to customize plots (e.g., add a title, change x and y labels, etc.). See examples and https://ggplot2.tidyverse.org/ for options. |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/conjoint.html for an example in Radiant
conjoint
to generate results
summary.conjoint
to summarize results
result <- conjoint(mp3, rvar = "Rating", evar = "Memory:Shape") plot(result, scale_plot = TRUE) plot(result, plots = "iw")
result <- conjoint(mp3, rvar = "Rating", evar = "Memory:Shape") plot(result, scale_plot = TRUE) plot(result, plots = "iw")
Plot method for the full_factor function
## S3 method for class 'full_factor' plot(x, plots = "attr", shiny = FALSE, custom = FALSE, ...)
## S3 method for class 'full_factor' plot(x, plots = "attr", shiny = FALSE, custom = FALSE, ...)
x |
Return value from |
plots |
Include attribute ("attr"), respondents ("resp") or both in the plot |
shiny |
Did the function call originate inside a shiny app |
custom |
Logical (TRUE, FALSE) to indicate if ggplot object (or list of ggplot objects) should be returned. This option can be used to customize plots (e.g., add a title, change x and y labels, etc.). See examples and https://ggplot2.tidyverse.org/ for options. |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/full_factor.html for an example in Radiant
full_factor
to calculate results
plot.full_factor
to plot results
result <- full_factor(shopping, "v1:v6", nr_fact = 2) plot(result)
result <- full_factor(shopping, "v1:v6", nr_fact = 2) plot(result)
Plot method for the hclus function
## S3 method for class 'hclus' plot( x, plots = c("scree", "change"), cutoff = 0.05, shiny = FALSE, custom = FALSE, ... )
## S3 method for class 'hclus' plot( x, plots = c("scree", "change"), cutoff = 0.05, shiny = FALSE, custom = FALSE, ... )
x |
Return value from |
plots |
Plots to return. "change" shows the percentage change in within-cluster heterogeneity as respondents are grouped into different number of clusters, "dendro" shows the dendrogram, "scree" shows a scree plot of within-cluster heterogeneity |
cutoff |
For large datasets plots can take time to render and become hard to interpret. By selection a cutoff point (e.g., 0.05 percent) the initial steps in hierarchical cluster analysis are removed from the plot |
shiny |
Did the function call originate inside a shiny app |
custom |
Logical (TRUE, FALSE) to indicate if ggplot object (or list of ggplot objects) should be returned. This option can be used to customize plots (e.g., add a title, change x and y labels, etc.). See examples and https://ggplot2.tidyverse.org/ for options. |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/hclus.html for an example in Radiant
hclus
to generate results
summary.hclus
to summarize results
result <- hclus(shopping, vars = c("v1:v6")) plot(result, plots = c("change", "scree"), cutoff = .05) plot(result, plots = "dendro", cutoff = 0)
result <- hclus(shopping, vars = c("v1:v6")) plot(result, plots = c("change", "scree"), cutoff = .05) plot(result, plots = "dendro", cutoff = 0)
Plot method for kclus
## S3 method for class 'kclus' plot(x, plots = "density", shiny = FALSE, custom = FALSE, ...)
## S3 method for class 'kclus' plot(x, plots = "density", shiny = FALSE, custom = FALSE, ...)
x |
Return value from |
plots |
One of "density", "bar", or "scatter") |
shiny |
Did the function call originate inside a shiny app |
custom |
Logical (TRUE, FALSE) to indicate if ggplot object (or list of ggplot objects) should be returned. This option can be used to customize plots (e.g., add a title, change x and y labels, etc.). See examples and https://ggplot2.tidyverse.org/ for options. |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/kclus.html for an example in Radiant
kclus
to generate results
summary.kclus
to summarize results
store.kclus
to add cluster membership to the selected dataset
result <- kclus(shopping, vars = "v1:v6", nr_clus = 3) plot(result)
result <- kclus(shopping, vars = "v1:v6", nr_clus = 3) plot(result)
Plot method for the mds function
## S3 method for class 'mds' plot(x, rev_dim = NULL, fontsz = 5, shiny = FALSE, custom = FALSE, ...)
## S3 method for class 'mds' plot(x, rev_dim = NULL, fontsz = 5, shiny = FALSE, custom = FALSE, ...)
x |
Return value from |
rev_dim |
Flip the axes in plots |
fontsz |
Font size to use in plots |
shiny |
Did the function call originate inside a shiny app |
custom |
Logical (TRUE, FALSE) to indicate if ggplot object (or list of ggplot objects) should be returned. This option can be used to customize plots (e.g., add a title, change x and y labels, etc.). See examples and https://ggplot2.tidyverse.org/ for options. |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/mds.html for an example in Radiant
mds
to calculate results
summary.mds
to plot results
result <- mds(city, "from", "to", "distance") plot(result, fontsz = 7) plot(result, rev_dim = 1:2)
result <- mds(city, "from", "to", "distance") plot(result, fontsz = 7) plot(result, rev_dim = 1:2)
Plot method for the pre_factor function
## S3 method for class 'pre_factor' plot( x, plots = c("scree", "change"), cutoff = 0.2, shiny = FALSE, custom = FALSE, ... )
## S3 method for class 'pre_factor' plot( x, plots = c("scree", "change"), cutoff = 0.2, shiny = FALSE, custom = FALSE, ... )
x |
Return value from |
plots |
Plots to return. "change" shows the change in eigenvalues as variables are grouped into different number of factors, "scree" shows a scree plot of eigenvalues |
cutoff |
For large datasets plots can take time to render and become hard to interpret. By selection a cutoff point (e.g., eigenvalues of .8 or higher) factors with the least explanatory power are removed from the plot |
shiny |
Did the function call originate inside a shiny app |
custom |
Logical (TRUE, FALSE) to indicate if ggplot object (or list of ggplot objects) should be returned. This option can be used to customize plots (e.g., add a title, change x and y labels, etc.). See examples and https://ggplot2.tidyverse.org/ for options. |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/pre_factor.html for an example in Radiant
pre_factor
to calculate results
summary.pre_factor
to summarize results
result <- pre_factor(shopping, "v1:v6") plot(result, plots = c("change", "scree"), cutoff = .05)
result <- pre_factor(shopping, "v1:v6") plot(result, plots = c("change", "scree"), cutoff = .05)
Plot method for the prmap function
## S3 method for class 'prmap' plot( x, plots = "", scaling = 2, fontsz = 5, seed = 1234, shiny = FALSE, custom = FALSE, ... )
## S3 method for class 'prmap' plot( x, plots = "", scaling = 2, fontsz = 5, seed = 1234, shiny = FALSE, custom = FALSE, ... )
x |
Return value from |
plots |
Components to include in the plot ("brand", "attr"). If data on preferences is available use "pref" to add preference arrows to the plot |
scaling |
Arrow scaling in the brand map |
fontsz |
Font size to use in plots |
seed |
Random seed |
shiny |
Did the function call originate inside a shiny app |
custom |
Logical (TRUE, FALSE) to indicate if ggplot object (or list of ggplot objects) should be returned. This option can be used to customize plots (e.g., add a title, change x and y labels, etc.). See examples and https://ggplot2.tidyverse.org/ for options. |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/prmap.html for an example in Radiant
prmap
to calculate results
summary.prmap
to plot results
result <- prmap(computer, brand = "brand", attr = "high_end:business") plot(result, plots = "brand") plot(result, plots = c("brand", "attr")) plot(result, scaling = 1, plots = c("brand", "attr")) prmap( retailers, brand = "retailer", attr = "good_value:cluttered", pref = c("segment1", "segment2") ) %>% plot(plots = c("brand", "attr", "pref"))
result <- prmap(computer, brand = "brand", attr = "high_end:business") plot(result, plots = "brand") plot(result, plots = c("brand", "attr")) plot(result, scaling = 1, plots = c("brand", "attr")) prmap( retailers, brand = "retailer", attr = "good_value:cluttered", pref = c("segment1", "segment2") ) %>% plot(plots = c("brand", "attr", "pref"))
Evaluate if data are appropriate for PCA / Factor analysis
pre_factor( dataset, vars, hcor = FALSE, data_filter = "", envir = parent.frame() )
pre_factor( dataset, vars, hcor = FALSE, data_filter = "", envir = parent.frame() )
dataset |
Dataset |
vars |
Variables to include in the analysis |
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 |
See https://radiant-rstats.github.io/docs/multivariate/pre_factor.html for an example in Radiant
A list with all variables defined in the function as an object of class pre_factor
summary.pre_factor
to summarize results
plot.pre_factor
to plot results
pre_factor(shopping, "v1:v6") %>% str()
pre_factor(shopping, "v1:v6") %>% str()
Predict method for the conjoint function when a by variables is used
predict_conjoint_by( object, pfun, pred_data = NULL, pred_cmd = "", conf_lev = 0.95, se = FALSE, dec = 3, envir = parent.frame(), ... )
predict_conjoint_by( object, pfun, pred_data = NULL, pred_cmd = "", conf_lev = 0.95, se = FALSE, dec = 3, envir = parent.frame(), ... )
object |
Return value from |
pfun |
Function to use for prediction |
pred_data |
Name of the dataset to use for prediction |
pred_cmd |
Command used to generate data for prediction |
conf_lev |
Confidence level used to estimate confidence intervals (.95 is the default) |
se |
Logical that indicates if prediction standard errors should be calculated (default = FALSE) |
dec |
Number of decimals to show |
envir |
Environment to extract data from |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/conjoint.html for an example in Radiant
conjoint
to generate the result
summary.conjoint
to summarize results
plot.conjoint
to plot results
Predict method for the conjoint function
## S3 method for class 'conjoint' predict( object, pred_data = NULL, pred_cmd = "", conf_lev = 0.95, se = FALSE, interval = "confidence", dec = 3, envir = parent.frame(), ... )
## S3 method for class 'conjoint' predict( object, pred_data = NULL, pred_cmd = "", conf_lev = 0.95, se = FALSE, interval = "confidence", dec = 3, envir = parent.frame(), ... )
object |
Return value from |
pred_data |
Provide the dataframe to generate predictions. The dataset must contain all columns used in the estimation |
pred_cmd |
Command used to generate data for prediction |
conf_lev |
Confidence level used to estimate confidence intervals (.95 is the default) |
se |
Logical that indicates if prediction standard errors should be calculated (default = FALSE) |
interval |
Type of interval calculation ("confidence" or "prediction"). Set to "none" if se is FALSE |
dec |
Number of decimals to show |
envir |
Environment to extract data from |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/conjoint.html for an example in Radiant
conjoint
to generate the result
summary.conjoint
to summarize results
plot.conjoint
to plot results
result <- conjoint(mp3, rvar = "Rating", evar = "Memory:Shape") predict(result, pred_data = mp3)
result <- conjoint(mp3, rvar = "Rating", evar = "Memory:Shape") predict(result, pred_data = mp3)
Print method for predict.conjoint
## S3 method for class 'conjoint.predict' print(x, ..., n = 20)
## S3 method for class 'conjoint.predict' print(x, ..., n = 20)
x |
Return value from prediction method |
... |
further arguments passed to or from other methods |
n |
Number of lines of prediction results to print. Use -1 to print all lines |
Attribute based brand maps
prmap( dataset, brand, attr, pref = "", nr_dim = 2, hcor = FALSE, data_filter = "", envir = parent.frame() )
prmap( dataset, brand, attr, pref = "", nr_dim = 2, hcor = FALSE, data_filter = "", envir = parent.frame() )
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 |
See https://radiant-rstats.github.io/docs/multivariate/prmap.html for an example in Radiant
A list of all variables defined in the function as an object of class prmap
summary.prmap
to summarize results
plot.prmap
to plot results
prmap(computer, brand = "brand", attr = "high_end:business") %>% str()
prmap(computer, brand = "brand", attr = "high_end:business") %>% str()
Launch radiant.multivariate in the default web browser
radiant.multivariate(state, ...)
radiant.multivariate(state, ...)
state |
Path to state file to load |
... |
additional arguments to pass to shiny::runApp (e.g, port = 8080) |
See https://radiant-rstats.github.io/docs/ for documentation and tutorials
## Not run: radiant.multivariate() ## End(Not run)
## Not run: radiant.multivariate() ## End(Not run)
Launch radiant.multivariate in the Rstudio viewer
radiant.multivariate_viewer(state, ...)
radiant.multivariate_viewer(state, ...)
state |
Path to state file to load |
... |
additional arguments to pass to shiny::runApp (e.g, port = 8080) |
See https://radiant-rstats.github.io/docs/ for documentation and tutorials
## Not run: radiant.multivariate_viewer() ## End(Not run)
## Not run: radiant.multivariate_viewer() ## End(Not run)
Launch radiant.multivariate in an Rstudio window
radiant.multivariate_window(state, ...)
radiant.multivariate_window(state, ...)
state |
Path to state file to load |
... |
additional arguments to pass to shiny::runApp (e.g, port = 8080) |
See https://radiant-rstats.github.io/docs/ for documentation and tutorials
## Not run: radiant.multivariate_window() ## End(Not run)
## Not run: radiant.multivariate_window() ## End(Not run)
Perceptions of retailers
data(retailers)
data(retailers)
A data frame with 6 rows and 10 variables
Consumer evaluations for a set of retailers in the Chicago area on 7 attributes. The dataset is used to illustrate perceptual maps. Description provided in attr(retailers, "description")
Shopping attitudes
data(shopping)
data(shopping)
A data frame with 20 rows and 7 variables
Attitudinal data on shopping for 20 consumers. Description provided in attr(shopping, "description")
Store method for the Multivariate > Conjoint tab
## S3 method for class 'conjoint' store(dataset, object, name, ...)
## S3 method for class 'conjoint' store(dataset, object, name, ...)
dataset |
Dataset |
object |
Return value from conjoint |
name |
Variable name(s) assigned to predicted values |
... |
further arguments passed to or from other methods |
Store data frame with PWs or IWs in Radiant r_data list if available
Store predicted values generated in predict.conjoint
## S3 method for class 'conjoint.predict' store(dataset, object, name = "prediction", ...)
## S3 method for class 'conjoint.predict' store(dataset, object, name = "prediction", ...)
dataset |
Dataset to add predictions to |
object |
Return value from model predict function |
name |
Variable name(s) assigned to predicted values |
... |
Additional arguments |
See https://radiant-rstats.github.io/docs/multivariate/conjoint.html for an example in Radiant
conjoint(mp3, rvar = "Rating", evar = "Memory:Shape") %>% predict(mp3) %>% store(mp3, ., name = "pred_pref")
conjoint(mp3, rvar = "Rating", evar = "Memory:Shape") %>% predict(mp3) %>% store(mp3, ., name = "pred_pref")
Store factor scores to active dataset
## S3 method for class 'full_factor' store(dataset, object, name = "", ...)
## S3 method for class 'full_factor' store(dataset, object, name = "", ...)
dataset |
Dataset to append to factor scores to |
object |
Return value from |
name |
Name of factor score variables |
... |
Additional arguments |
See https://radiant-rstats.github.io/docs/multivariate/full_factor.html for an example in Radiant
full_factor
to generate results
summary.full_factor
to summarize results
plot.full_factor
to plot results
full_factor(shopping, "v1:v6", nr_fact = 3) %>% store(shopping, .) %>% head()
full_factor(shopping, "v1:v6", nr_fact = 3) %>% store(shopping, .) %>% head()
Add a cluster membership variable to the active dataset
## S3 method for class 'hclus' store(dataset, object, nr_clus = 2, name = "", ...)
## S3 method for class 'hclus' store(dataset, object, nr_clus = 2, name = "", ...)
dataset |
Dataset to append to cluster membership variable to |
object |
Return value from |
nr_clus |
Number of clusters to extract |
name |
Name of cluster membership variable |
... |
Additional arguments |
See https://radiant-rstats.github.io/docs/multivariate/hclus.html for an example in Radiant
hclus
to generate results
summary.hclus
to summarize results
plot.hclus
to plot results
hclus(shopping, vars = "v1:v6") %>% store(shopping, ., nr_clus = 3) %>% head()
hclus(shopping, vars = "v1:v6") %>% store(shopping, ., nr_clus = 3) %>% head()
Add a cluster membership variable to the active dataset
## S3 method for class 'kclus' store(dataset, object, name = "", ...)
## S3 method for class 'kclus' store(dataset, object, name = "", ...)
dataset |
Dataset to append to cluster membership variable to |
object |
Return value from |
name |
Name of cluster membership variable |
... |
Additional arguments |
See https://radiant-rstats.github.io/docs/multivariate/kclus.html for an example in Radiant
kclus
to generate results
summary.kclus
to summarize results
plot.kclus
to plot results
kclus(shopping, vars = "v1:v6", nr_clus = 3) %>% store(shopping, .) %>% head()
kclus(shopping, vars = "v1:v6", nr_clus = 3) %>% store(shopping, .) %>% head()
Summary method for the conjoint function
## S3 method for class 'conjoint' summary(object, show = "", mc_diag = FALSE, additional = FALSE, dec = 3, ...)
## S3 method for class 'conjoint' summary(object, show = "", mc_diag = FALSE, additional = FALSE, dec = 3, ...)
object |
Return value from |
show |
Level in by variable to analyze (e.g., a specific respondent) |
mc_diag |
Shows multicollinearity diagnostics. |
additional |
Show additional regression results |
dec |
Number of decimals to show |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/conjoint.html for an example in Radiant
conjoint
to generate results
plot.conjoint
to plot results
result <- conjoint(mp3, rvar = "Rating", evar = "Memory:Shape") summary(result, mc_diag = TRUE)
result <- conjoint(mp3, rvar = "Rating", evar = "Memory:Shape") summary(result, mc_diag = TRUE)
Summary method for the full_factor function
## S3 method for class 'full_factor' summary(object, cutoff = 0, fsort = FALSE, dec = 2, ...)
## S3 method for class 'full_factor' summary(object, cutoff = 0, fsort = FALSE, dec = 2, ...)
object |
Return value from |
cutoff |
Show only loadings with (absolute) values above cutoff (default = 0) |
fsort |
Sort factor loadings |
dec |
Number of decimals to show |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/full_factor.html for an example in Radiant
full_factor
to calculate results
plot.full_factor
to plot results
result <- full_factor(shopping, "v1:v6", nr_fact = 2) summary(result) summary(result, cutoff = .5, fsort = TRUE)
result <- full_factor(shopping, "v1:v6", nr_fact = 2) summary(result) summary(result, cutoff = .5, fsort = TRUE)
Summary method for the hclus function
## S3 method for class 'hclus' summary(object, ...)
## S3 method for class 'hclus' summary(object, ...)
object |
Return value from |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/hclus.html for an example in Radiant
hclus
to generate results
plot.hclus
to plot results
result <- hclus(shopping, vars = c("v1:v6")) summary(result)
result <- hclus(shopping, vars = c("v1:v6")) summary(result)
Summary method for kclus
## S3 method for class 'kclus' summary(object, dec = 2, ...)
## S3 method for class 'kclus' summary(object, dec = 2, ...)
object |
Return value from |
dec |
Number of decimals to show |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/kclus.html for an example in Radiant
kclus
to generate results
plot.kclus
to plot results
store.kclus
to add cluster membership to the selected dataset
result <- kclus(shopping, vars = "v1:v6", nr_clus = 3) summary(result)
result <- kclus(shopping, vars = "v1:v6", nr_clus = 3) summary(result)
Summary method for the mds function
## S3 method for class 'mds' summary(object, dec = 2, ...)
## S3 method for class 'mds' summary(object, dec = 2, ...)
object |
Return value from |
dec |
Rounding to use for output (default = 2). +1 used for stress measure |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/mds.html for an example in Radiant
mds
to calculate results
plot.mds
to plot results
result <- mds(city, "from", "to", "distance") summary(result, dec = 1)
result <- mds(city, "from", "to", "distance") summary(result, dec = 1)
Summary method for the pre_factor function
## S3 method for class 'pre_factor' summary(object, dec = 2, ...)
## S3 method for class 'pre_factor' summary(object, dec = 2, ...)
object |
Return value from |
dec |
Rounding to use for output |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/pre_factor.html for an example in Radiant
pre_factor
to calculate results
plot.pre_factor
to plot results
result <- pre_factor(shopping, "v1:v6") summary(result) pre_factor(computer, "high_end:business") %>% summary()
result <- pre_factor(shopping, "v1:v6") summary(result) pre_factor(computer, "high_end:business") %>% summary()
Summary method for the prmap function
## S3 method for class 'prmap' summary(object, cutoff = 0, dec = 2, ...)
## S3 method for class 'prmap' summary(object, cutoff = 0, dec = 2, ...)
object |
Return value from |
cutoff |
Show only loadings with (absolute) values above cutoff (default = 0) |
dec |
Rounding to use for output |
... |
further arguments passed to or from other methods |
See https://radiant-rstats.github.io/docs/multivariate/prmap.html for an example in Radiant
prmap
to calculate results
plot.prmap
to plot results
result <- prmap(computer, brand = "brand", attr = "high_end:business") summary(result) summary(result, cutoff = .3) prmap( computer, brand = "brand", attr = "high_end:dated", pref = c("innovative", "business") ) %>% summary()
result <- prmap(computer, brand = "brand", attr = "high_end:business") summary(result) summary(result, cutoff = .3) prmap( computer, brand = "brand", attr = "high_end:dated", pref = c("innovative", "business") ) %>% summary()
Function to calculate the PW and IW table for conjoint
the_table(model, dataset, evar)
the_table(model, dataset, evar)
model |
Tidied model results (broom) output from |
dataset |
Conjoint data |
evar |
Explanatory variables used in the conjoint regression |
See https://radiant-rstats.github.io/docs/multivariate/conjoint.html for an example in Radiant
conjoint
to generate results
summary.conjoint
to summarize results
plot.conjoint
to plot results
result <- conjoint(mp3, rvar = "Rating", evar = "Memory:Shape") the_table(tidy(result$model_list[[1]][["model"]]), result$dataset, result$evar)
result <- conjoint(mp3, rvar = "Rating", evar = "Memory:Shape") the_table(tidy(result$model_list[[1]][["model"]]), result$dataset, result$evar)
Toothpaste attitudes
data(toothpaste)
data(toothpaste)
A data frame with 60 rows and 10 variables
Attitudinal data on toothpaste for 60 consumers. Description provided in attr(toothpaste, "description")
Toothpaste brands
data(tpbrands)
data(tpbrands)
A data frame with 45 rows and 4 variables
Perceived (dis)similarity of a set of toothpaste brands. The dataset is used to illustrate multi-dimensional scaling (MDS). Description provided in attr(tpbrands, "description")