similar to: plot discriminant analysis

Displaying 20 results from an estimated 3000 matches similar to: "plot discriminant analysis"

2009 Oct 15
1
Discriminant plot
Hi Alejo, According to my knowledge the two plots are different because in the first one a point belongs to a group depending on its group in the data whereas in the second plot a point belongs to the group predicted by the linear discriminant analysis. I hope somebody will correct me if I am wrong. Alain Alejo C.S. wrote: > Hi Alain, this is the code: > > > library(MASS) >
2011 Dec 08
1
lda output missing
Hello everyone, I am working on a linear discriminant analysis and am having issues finding the full output of my lda. Specifically, there is no reporting of the Proportion of Trace that is a normal output of the procedure. I'm using a csv file and everything is reading in correctly. I've looked and looked and can't figure out why my output is not complete. Is it something simple that
2000 Mar 08
3
Reading data for discriminant analysis
Dear R users, I want to do discriminant analysis on my data. I have successfully followed the discriminant analysis in V & R on the iris data: > ir <- rbind (iris3[,,1],iris3[,,2],iris3[,,3]) > ir.species <- c(rep("s",50),rep("c",50),rep("v",50)) > a <- lda(log(ir),ir.species) > a$svd^2/sum(a$svd^2) [1] 0.996498601 0.003501399 > a.x <-
2009 Nov 17
1
Error running lda example: Session Info
> > library(MASS) > Iris <- data.frame(rbind(iris3[,,1], iris3[,,2], iris3[,,3]), + Sp = rep(c("s","c","v"), rep(50,3))) > train <- sample(1:150, 75) > table(Iris$Sp[train]) c s v 22 23 30 > z <- lda(Sp ~ ., Iris, prior = c(1,1,1)/3, subset = train) Error in if (targetlist[i] == stringname) { : argument is of length
2010 Sep 13
4
lattice: Set x-axis in italics only
Dear list, I making some box-and-whisker plots in R with vertebrate data. The x axis are species names that must be in italics. I tried with the "axis" function but no luck, and it seems that affects both axes. Any tip? Thanks a lot in Advance. Alej
2006 Apr 04
0
Fisher's discriminant functions
Hi, I am trying to solve a discriminant analysis in the same way as SPSS does it. I mean, given an amount of data, to train the discriminant analysis I obtain the Fisher's discriminant functions, an array of coefficients per group, so if I have 8 groups I get 8 linear functions, that allow me to operate with them easily and without a great cost of time. My main problem is that I need to
2013 Nov 10
0
Mark each group centroid in a linear discriminant analysis plot
Hi, How can I calculate and mark each group centroid in a linear discriminant analysis plot (using ggplot2)? Script: ## originate from http://r.789695.n4.nabble.com/LDA-and-confidence-ellipse-td4671308.html require(MASS) require(ggplot2) iris.lda<-lda(Species ~ Sepal.Length + Sepal.Width + Petal.Length + Petal.Width, data = iris) LD1<-predict(iris.lda)$x[,1]
2004 Nov 02
2
lda
Hi !! I am trying to analyze some of my data using linear discriminant analysis. I worked out the following example code in Venables and Ripley It does not seem to be happy with it. ============================ library(MASS) library(stats) data(iris3) ir<-rbind(iris3[,,1],iris3[,,2],iris3[,,3]) ir.species<-factor(c(rep("s",50),rep("c",50),rep("v",50)))
2010 Apr 09
3
NAs are not allowed in subscripted assignments
I'm trying to assign NAs to values that satisfy certain conditions (more complex than shown below) and it gives the right result, but breaks the loop having done the first one viz: new<-c(rep(5,4),6) for (i in 1:6) {new[new[i]>5.5][i]<-NA} gives the correct result, though an error message appears which causes a break if it's in a loop. If I can get rid of the error message and
2007 Jun 18
0
discriminant analysis with lda(MASS)
I use Widows, R version 2.4.1 I have 4 questions on lda (MASS) (code is pasted below): 1st. How can I obtain the statistics and p-value associated with discriminant analysis? Am I supposed to calculate that manually by squaring the svd value and looking the p value up in a table? I am writing the following code: training.mx<-read.table('C:\\Documents and Settings\\silvia\\My
2005 Apr 28
0
Linear Discriminant Analysis Biplots
Dear R I'm trying to plot the lda means onto a 2 D plot of discriminant scores. Preferably I'd like these to be in a larger font compared to the discriminant scores. I tried skull.mean.pred <- predict(skulls.lda, as.data.frame(skulls.lda$means), dimen=2) from which I got skull.mean.pred $class [1] 1 2 3 4 5 Levels: 1 2 3 4 5 $posterior 1 2 3 4
2009 Aug 03
1
principal component analysis for class variables
Dear Forum, I have a class variable 1 (populations A-E), and two other class variables, variable 2 and variable 3. What I want is to see if the combination of var 2 and var 3, will give me a pattern that allows to distinguish populations. I found several packages like ade4, with pcaiv function and factoMineR. but there are not working. Using the ade4 package, when I try to build the pca: pca1
2010 Oct 20
1
Biplot: plot group name instead of row number
Dear list, I'm trying to make a biplot, but instead of plotting the row number for each observation, plot a group factor. Example: prcomp(iris[,1:4]) -> PCA biplot(PCA) #this makes a nice biplot but with row names Instead of row numbers I want to plot iris[,5], which is a factor. I can do this: plot(PCA$x[,1], PCA$x[,2], type="n") text(PCA$x[,1], PCA$x[,2], labels=iris[,5],
2002 Mar 17
3
apply problem
> data(iris) # iris3 is first 3 rows of iris > iris3 <- iris[1:3,] # z compares row 1 to each row of iris3 and is correctly computed > z <- c(F,F,F) > for(i in seq(z)) z[i] <- identical(iris3[1,],iris3[i,]) > z [1] TRUE FALSE FALSE # this should do the same but is incorrect > apply(iris3,1,function(x)identical(x,iris3[1,])) 1 2 3 FALSE FALSE FALSE
2004 Jan 09
3
ipred and lda
Dear all, can anybody help me with the program below? The function predict.lda seems to be defined but cannot be used by errortest. The R version is 1.7.1 Thanks in advance, Stefan ---------------- library("MASS"); library("ipred"); data(iris3); tr <- sample(1:50, 25); train <- rbind(iris3[tr,,1], iris3[tr,,2], iris3[tr,,3]); test <- rbind(iris3[-tr,,1],
2013 Feb 20
1
Plotting Discriminants from qda
Dear R Help Members, I am aware how to plot the LD1 vs LD2 from a lda in R, using the code: plot(baseline.systat.hat$x, col=baseline.systat.hat$class,pch=as.numeric(baseline.systat.hat$class)) However, I need to use the quadratic discriminant function, qda due to data properties. Is there a way to obtain the same sort of plot for from a qda object (and the output of predict qda). I have not
2011 Jun 06
2
adding an ellipse to a PCA plot
Hi, I created a principal component plot using the first two principal components. I used the function princomp() to calculate the scores. now, I would like to superimpose an ellipse representing the center and the 95% confidence interval of a series of points in my plot (as to illustrate the grouping of my samples). I looked at the ellipse() function in the ellipse package but can't get it
2013 Mar 20
3
Introduction to R. Any such documentation in Vietnamese?
Dear fellow users Are there any Vietnamese language resources for beginners of R? If so, I would be interested in hearing from people who have had experience with them and which are better (if there is more than one). I am involved with an aid project in Vietnam, and would like to move the scientists involved from using Excel for 'analysis' to R. Thanks .... Peter Alspach The
2004 May 24
1
discriminant analysis
Hi, I have done different discriminant function analysis of multivariat data. With the CV=True option I was not able to perform the predict() call. What do I have to do? Or is there no possibility at all? You also need the predicted values to produce a plot of the analysis, as far as I know. Here my code: pcor.lda2<-lda(pcor~habarea+hcom+isol+flowcov+herbh+inclin+windprot+shrubcov+baregr,
2010 Jun 15
1
Problem with the recode function
Hello, I am using the recode() function in Rcmdr and the result is not what I expect so I am almost sure I did something wrong but what... > test <- data.frame(x=1:10) > library(car) > recode(test$x,'1:5=0 ; else=1', as.factor.result=TRUE) [1] 0 0 0 0 0 1 1 1 1 1 Levels: 0 1 BUT > library(Rcmdr) # recode from the car package is now masked Now I recode test$x