Learn R Programming

NominalLogisticBiplot (version 0.2)

plotNominalVariable: Function for plotting in the reduced space an unordered categorical variable.

Description

Graphical representation of a polytomous unordered variable in the reduced space, according to the Nominal Logistic Biplot theory. Inside the function, the estimations needed for the variable will be done. It can be choosen some parameters related to the way in which the variable is plotted.

Usage

plotNominalVariable(nameVar, nominalVar, estimRows, planex = 1, planey = 2, xi = -3.5, xu = 3.5, yi = -3.5, yu = 3.5, CexVar = 0.7, ColorVar = "blue", PchVar = 0.7, addToPlot = FALSE, QuitNotPredicted = TRUE, ShowResults = FALSE, linesVoronoi = TRUE, LabelVar = TRUE, tol = 1e-04, maxiter = 100, penalization = 0.1, showIter = FALSE)

Arguments

nameVar
Name of the variable to be plotted.
nominalVar
Values of the categorical variable to be plotted. It should be a factor with information about a nominal variable, i.e., a variable without ordered values.
estimRows
Estimation coordinates for the individuals in the spanned space.
planex
Dimension for X axis.
planey
Dimension for Y axis.
xi
Minimum value on the x-axis.
xu
Maximum value on the x-axis.
yi
Minimum value on the y-axis.
yu
Maximum value on the y-axis.
CexVar
Size of the category points.
ColorVar
Color for the variable.
PchVar
Symbol for the variable.
addToPlot
Should the graph be added to an existing representation?
QuitNotPredicted
Should the non-predicted categories be represented on the graph?
ShowResults
Should the results of the proccess of calculating the prediction regions be shown?
linesVoronoi
Should the tesselation be plotted.? Default is FALSE and only the category points are plotted for a better reading of the plot
LabelVar
Should the variable labels be shown?
tol
Value to stop the process of iterations.
maxiter
Maximum number of iterations in the process of solving the regression coefficients.
penalization
Penalization used in the diagonal matrix to avoid singularities.
showIter
Boolean parameter to show the information about the iterations.

See Also

polylogist

Examples

Run this code
data(HairColor)
nlbo = NominalLogisticBiplot(HairColor,sFormula=NULL,
numFactors=2,method="EM",penalization=0.2,show=FALSE)
nameVar = nlbo$dataSet$ColumNames[2]
nominalVar = HairColor[,2]
estimRows = nlbo$RowsCoords 
plotNominalVariable(nameVar,nominalVar,estimRows,planex = 1,planey = 2,
    xi=-1.5,xu=1.5,yi=-1.5,yu=1.5,CexVar=0.7,ColorVar="blue",PchVar=0.7,
    addToPlot=FALSE,QuitNotPredicted=TRUE,ShowResults=TRUE,
    linesVoronoi=TRUE,LabelVar=TRUE,tol = 1e-04, maxiter = 100,
    penalization = 0.3,showIter = FALSE)

Run the code above in your browser using DataLab