Displaying 20 results from an estimated 3000 matches similar to: "Y axis of 1-D Linear Discriminant Histograms"
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
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 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,
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
2009 Aug 05
1
Decision boundaries for lda function?
Hi,
I am using the lda function from the MASS library. I would to find the
decision boundaries of each class and subsequently plot them. I wonder if
anybody can offer any help on this topic?
Below I applied the lda function on a small dataset of mine.
Any help will be much appreciated.
> library(MASS)
>
2005 Jun 16
1
how to use plot.lda included in MASS package?
Hi there,
I am a master student in Denmark, and apply R to analyze the drug data.
I use the function 'lda' to obtain a linear discriminant object, and
then wish to use 'plot.lda' to do the plot on this object like below.
drug.lda <- lda(Inhibition ~ NET_CHARGE + PKA_1 + MW + MLOGP,
data = drug.class, method = "moment")
plot.lda(drug.lda,
2009 Oct 14
1
plot discriminant analysis
I'm confused on how is the right way to plot a discriminant analysis made by
lda function (MASS package).
(I had attached my data fro reproduction). When I plot a lda object :
X <- read.table("data", header=T)
lda_analysis <- lda(formula(X), data=X)
plot(lda_analysis)
#the above plot is completely different to:
plot(predict(lda_analysis)$x,
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 <-
2011 Jun 09
0
(no subject)
> #
>> # Generate the figures (on screen)
>> #
>> # Image generation - function definition
>> pic_onscr<-function(matrix, title, cex_val=1)
> + {x11() + par(mgp=c(5,2,0), # axis margins + # (title,
> labels, line) + mar=c(7,4,4,2), # plot margins (b,l,t,r) +
> las=1) # horizontal labels + plot(matrix, # data to plot +
>
2011 Jun 09
1
what is the mistake?? the coding still not function. no result display
# lda.r
> #
> # Author: Amsha Nahid, Jairus Bowne, Gerard Murray
> # Purpose: Perform Linear Discriminant Analysis (LDA)
> #
> # Input: Data matrix as specified in Data-matrix-format.pdf
> # Output: LDA plot
> #
> # Notes: Missing values (if any) are replaced by the half of the lowest
> # value in the entire data matrix.
>
2008 Jan 18
0
forming a linear discriminant function from the output of lda()
Hello all-
I am a relatively new user of R and am working through a graduate course
in
Statistics that uses Minitab, SAS and some Matlab. I like using R but
am
having some trouble lining up the output from lda() to that of the other
programs'
results. The dataset below is a modified set of wine data from the
Pinot Noir
data set as an illustration of the 2 group LDA scenario.
Mo Ba
2011 Jun 21
1
(no subject)
hello,
i already include the error in blue color word.
i hope it can help you to understand my question.
if not burden you, please give me a guide how to correct the error or maybe you
can correct the coding cause error.
thank you.
> # lda.r
> #
> # Author: Amsha Nahid, Jairus Bowne, Gerard Murray
> # Purpose: Perform Linear Discriminant Analysis (LDA)
> #
> #
2005 Jun 23
0
how to reconstruct the discriminant funciton from lda$prior, $means and $scaling
Hi R folks,
How can I generate the discriment function from lda?
I have an unbalanced data set. one class has about 25
entries and another class has about 200 entries.
I used lda for classification
> z<- lda(V3 ~ V1+V2, data)
> z
Prior probabilities of groups:
0 1
0.91111111 0.08888889
Group means:
V1 V2
0 0.4445161 0.04723951
1 0.4058900
2000 Apr 28
1
obtaining the discriminant line from lda
Dear R folks,
Thanks to all your help before I have loaded a 1-D toy data set into
R and did LDA on it. The toy data has Class=0 if value>0.
> XY <-- read.table ("test.xy",header=T )
> XY
X.Class value
1 0 60.4897262
2 0 32.9554489
3 -1 -53.6459189
4 0 44.4450579
.
.
.
998 -1 -43.4183157
999 0
2005 Feb 05
0
question about ldahist function
Hi,
When I am using ldahist function I would like to
specify different colors for each of the groups in the
data I am using. Is it possible? If not does anybody
know of another function to plot multiple histograms
on one plot for different groups.
Thanks
=====
Thanks
Fairouz Makhlouf
2007 Feb 27
0
Optimizing the loop for large data
Rusers:
I am trying to apply a quadratic discriminant function to find the best
classification outcomes.
1 is assigned to the values greater than a threshold value; and 0 otherwise.
I would like to see how the apparent error rates and the optimal error
rate change with increasing threshold values.
I have a 1000*10 data matrix: n=1000 and p=10.
Here is what I wrote so far, but seems to be
2007 Jul 14
1
return() in nested functions
Dear WizaRds,
After consulting different sources I am still unable to understand the
correct use of return() in nested functions. To illustrate the problem:
f <- function(x,y,type){
est1<-function(x,y){
z=x+y
out(x,y,z)}
est2<-function(x,y){
z=x*y
out(x,y,z)}
out<-function(x,y,z)
return(x,y,z)
if (type=="est1") est1(x,y)
if (type=="est2") est2(x,y)
}
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
2012 Jun 11
1
saving sublist lda object with save.image()
Greetings R experts,
I'm having some difficulty recovering lda objects that I've saved within sublists using the save.image() function. I am running a script that exports a variety of different information as a list, included within that list is an lda object. I then take that list and create a list of that with all the different replications I've run. Unfortunately I've been