Description Usage Arguments Author(s) Examples
View source: R/BiplotDensity.r
This function draws for a set of points a density contour lines plot. The densities can be calculated for the whole set of points or for the groups defined by a nominal variable.
1 2 3 4 |
X |
A matrix with the coordinates for the plane in which the the contour lines will be plotted. |
y |
Categorical variable used for defining clusters. If NULL, the density is calculated for the whole set of points. |
nlevels |
Number of clusters. |
grouplabels |
Set of labels for the centers of each cluster. It should be a vector with "nlevels" components. |
ncontours |
Number of contours that will be used in the representation. |
groupcols |
Vector whith a set of colors for the clusters. |
img |
Should the density be plotted (with different colors) together with the contour lines?. Default value is TRUE. |
separate |
Should the density for each cluster be represented on a different picture?. Default value is FALSE. |
ncolors |
Number of colors for the densities. |
ColorType |
Type of color schema for the density image. It should be a number between 1 and 5. |
xliml |
Minimum value on the x-axis. |
xlimu |
Maximum value on the x-axis. |
yliml |
Minimum value on the y-axis. |
ylimu |
Maximum value on the y-axis. |
plotInd |
Should the individuals be plotted? |
Julio Cesar Hernandez Sanchez, Jose Luis Vicente-Villardon
Maintainer: Julio Cesar Hernandez Sanchez <juliocesar_avila@usal.es>
1 2 3 4 5 6 7 8 9 | data(LevelSatPhd)
olbo = OrdinalLogisticBiplot(LevelSatPhd)
x = olbo$RowCoords[, 1]
y = olbo$RowCoords[, 2]
plot(x,y, cex = 0, xlim=c(-1,1),ylim=c(-1,1))
X = olbo$RowCoords
y = as.matrix(as.numeric(LevelSatPhd[,4]))
gcols = c("midnightblue","black","red","gray87")
BiplotDensity(X,y,groupcols = gcols)
|
Loading required package: mirt
Loading required package: stats4
Loading required package: lattice
Loading required package: MASS
Loading required package: NominalLogisticBiplot
Loading required package: gmodels
logLik Deviance df p-value PCC CoxSnell Macfaden
Salary -59.05458 118.10917 2 0.000000e+00 0.81 0.6562246 0.4748039
Benefits -26.13845 52.27690 2 0.000000e+00 0.95 0.8595105 0.7896633
Job Security -91.54182 183.08365 2 8.528733e-13 0.65 0.4263885 0.2328810
Job Location -30.03541 60.07081 2 0.000000e+00 0.91 0.7922981 0.7234767
Working conditions -49.94899 99.89799 2 0.000000e+00 0.81 0.6878952 0.5382353
Nagelkerke
Salary 0.7336378
Benefits 0.9376065
Job Security 0.4695589
Job Location 0.8941494
Working conditions 0.7772248
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.