Re: [R] Linear discriminant analysis

2023-10-12 Thread Uwe Ligges
On 12.10.2023 16:25, Fernando Archuby wrote: Hi. I have successfully performed the discriminant analysis with the lda function, I can classify new individuals with the predict function, but I cannot figure out how the lda results translate into the classification decision. That is, I don't rea

Re: [R] Linear discriminant analysis

2023-10-12 Thread Ben Bolker
It's possible that neither of these will help, but (1) you can look at the source code of the predict method (MASS:::predict.lda) (2) you can look at the source reference ("Modern Applied Statistics in S", Venables and Ripley) to see if it gives more information (although it might not); th

Re: [R] Linear Discriminant Analysis error: "Variables appear constant"

2011-05-17 Thread Uwe Ligges
..@statistik.tu-dortmund.de] Sent: Tuesday, May 17, 2011 04:25 AM To: Songer, Katherine B - DNR Cc: r-help@r-project.org Subject: Re: [R] Linear Discriminant Analysis error: "Variables appear constant" On 16.05.2011 22:07, Songer, Katherine B - DNR wrote: Hi R experts, I'm attempt

Re: [R] Linear Discriminant Analysis error: "Variables appear constant"

2011-05-17 Thread Songer, Katherine B - DNR
mailto:lig...@statistik.tu-dortmund.de] Sent: Tuesday, May 17, 2011 04:25 AM To: Songer, Katherine B - DNR Cc: r-help@r-project.org Subject: Re: [R] Linear Discriminant Analysis error: "Variables appear constant" On 16.05.2011 22:07, Songer, Katherine B - DNR wrote: > Hi R experts

Re: [R] Linear Discriminant Analysis error: "Variables appear constant"

2011-05-17 Thread Uwe Ligges
On 16.05.2011 22:07, Songer, Katherine B - DNR wrote: Hi R experts, I'm attempting to run Linear Discriminant Analysis using the lda function in the MASS package. I've got around 50 predictor variables and one response variable. My response variable has 5 numeric categories that represent d

Re: [R] Linear Discriminant Analysis in R

2010-06-02 Thread cobbler_squad
Joris, Thank you, I have corrected my mistakes. I very much appreciate your time and patience. All my best, Cobbler. -- View this message in context: http://r.789695.n4.nabble.com/Linear-Discriminant-Analysis-in-R-tp2231922p2240547.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Linear Discriminant Analysis in R

2010-05-31 Thread Joris Meys
I checked your data. Now I have to get some sense out of your code. You do : G <- vowel_features[15] cvc_lda <- lda(G~ vowel_features[15], data=mask_features, na.action="na.omit", CV=TRUE) Firstly, as I suspected, you need to select a column by using vowel_features[,15] . Mind the comma! Essentia

Re: [R] Linear Discriminant Analysis in R

2010-05-29 Thread cobbler_squad
Hi Janis, As you have suggested below is the output for the following: test.vowel <- vowel_features[,1:10] test.mask <- mask_features[,1:10] dput(test.vowel) dput(test.mask) --- NOTE: outputs are limited >>test_vowel first 12 columns are all zero (total of 26 columns) V1 V2 V3

Re: [R] Linear Discriminant Analysis in R

2010-05-29 Thread Joris Meys
It's not your questions, Cobbler, but could you PLEASE just do what we asked for? Copy-paste the following in R and copy-paste ALL output you get in your next mail. test.vowel <- vowel_features[,1:10] test.mask <- mask_features[,1:10] dput(test.vowel) dput(test.mask) I don't know whether your vow

Re: [R] Linear Discriminant Analysis in R

2010-05-29 Thread cobbler_squad
Thanks for being patient with me. I guess my problem is with understand how grouping in this particular case is used: one of the sample codes I found online (http://www.statmethods.net/advstats/discriminant.html) library(MASS) fit <- lda(G ~ x1 + x2 + x3, data=mydata, na.action="na.omit", CV=TRU

Re: [R] Linear Discriminant Analysis in R

2010-05-28 Thread Liaw, Andy
Behalf Of Joris Meys > Sent: Friday, May 28, 2010 8:50 AM > To: cobbler_squad > Cc: r-help@r-project.org > Subject: Re: [R] Linear Discriminant Analysis in R > > Could you provide us with data to test the code? use dput > (and limit the > size!) > > eg: >

Re: [R] Linear Discriminant Analysis in R

2010-05-28 Thread Joris Meys
Could you provide us with data to test the code? use dput (and limit the size!) eg: dput(vowel_features) dput(mask_features) Without this information, it's impossible to say what's going wrong. It looks like you're doing something wrong in the selection. What should vowel_features[15] return?

Re: [R] Linear Discriminant Analysis in R

2010-05-27 Thread cobbler_squad
Joris, You are a life saver. Based on two sample files above, I think lda should go something like this: vowel_features <- read.table(file = "mappings_for_vowels.txt") mask_features <- data.frame(as.matrix(read.table(file = "3dmaskdump_ICA_37_Combined.txt"))) G <- vowel_features[15] cvc_lda <-

Re: [R] Linear Discriminant Analysis in R

2010-05-26 Thread Joris Meys
Why exactly do you need lda and not another method? For lda to be applicable, you should check : 1) whether the regressors are normally distributed within the classes 2) whether the variance-covariance matrices are equal for all classes Essentially, this means that the boundary between both classe

Re: [R] Linear Discriminant Analysis

2009-02-25 Thread Christos Hatzis
Maybe as a starter RSiteSearch("linear discriminant analysis") R has tools to help you help yourself with this types of questions. -Christos > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Arup > Sent: Wednesday, February

Re: [R] Linear Discriminant Analysis

2009-02-25 Thread Jorge Ivan Velez
Dear Arup, See the lda function in the MASS package. In general, > require(MASS) Loading required package: MASS > ?lda HTH, Jorge On Wed, Feb 25, 2009 at 4:44 AM, Arup wrote: > > Kindly let me know the process to carry out a Linear discriminant > analysis...thanks in advance > > Arup > -- >