regression_coefficient_plot: Regression Coefficient Plot

Description Usage Arguments Value Examples

View source: R/regression_coefficient_plot.R

Description

Easy plotting for multiple regression results on same axes.

Usage

1
2
3
4
5
6
regression_coefficient_plot(
  data,
  text_size = 1,
  remove_intercept = FALSE,
  title = ""
)

Arguments

data

A data.frame produced by the 'preprocessing_choice_regression()' function, or a list created by the 'preText()' function.

text_size

The size of the text to be displayed. Defaults to 1.

remove_intercept

Logical indicating whether intercept coefficient should be plotted. Defaults to FALSE.

title

The title the user wishes to give the lot, which will be displayed instead of the axis title.

Value

A plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
# load the package
library(preText)
# load in the data
data("UK_Manifestos")
# preprocess data
preprocessed_documents <- factorial_preprocessing(
    UK_Manifestos,
    use_ngrams = TRUE,
    infrequent_term_threshold = 0.02,
    verbose = TRUE)
# run preText
preText_results <- preText(
    preprocessed_documents,
    dataset_name = "Inaugural Speeches",
    distance_method = "cosine",
    num_comparisons = 100,
    verbose = TRUE)
# generate regression results
regression_coefficient_plot(preText_results,
                            remove_intercept = TRUE)

## End(Not run)

matthewjdenny/preText documentation built on July 27, 2021, 1:18 a.m.