Learn R Programming

NominalLogisticBiplot (version 0.2)

plotNominalFittedVariable: Function for plotting in the reduced space an unordered and fitted categorical variable.

Description

Graphical representation of a polytomous unordered variable previously fitted in the reduced space, according to the Nominal Logistic Biplot theory. It can be choosen some parameters related to the way in which the variable is plotted.

Usage

plotNominalFittedVariable(nameVar, numcateg, beta, varstudyC, rowCoords, levelsVar = NULL, numFactors = 2, 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 = TRUE, linesVoronoi = TRUE, LabelVar = TRUE)

Arguments

nameVar
Name of the variable to be plotted.
numcateg
Number of categories of the variable.
beta
Estimated coefficients matrix.
varstudyC
Values of the categorical variable to be plotted. It should be a factor with information about a nominal variable, i.e., an unordered variable.
rowCoords
Estimation coordinates for the individuals in the spanned space.
levelsVar
Vector with the labels for each level of the variable.
numFactors
Dimension of the reduced 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?

See Also

polylogist

Examples

Run this code
data(Env)
nlbo = NominalLogisticBiplot(Env,sFormula=NULL,
numFactors=2,method="EM",penalization=0.2,show=FALSE)
nameVar = nlbo$dataSet$ColumNames[1]
numcateg = 4
beta = nlbo$VariableModels[,1]$beta
Nagelkerke = nlbo$VariableModels[,1]$Nagelkerke 
varstudyC = as.matrix(as.numeric(Env[,1]))
rowCoords = nlbo$RowsCoords
levelsVar = c("M1","M2","M4","M5")
plotNominalFittedVariable(nameVar,numcateg,beta,varstudyC,rowCoords,levelsVar=NULL,
            numFactors=2,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=TRUE,linesVoronoi=TRUE,LabelVar=TRUE)

Run the code above in your browser using DataLab