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
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
..@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
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
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
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.
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
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
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
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
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:
>
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?
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 <-
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
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
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
> --
>
16 matches
Mail list logo