[R] Linear Discriminant Analysis in R

cobbler_squad la.foma at gmail.com
Sat May 29 18:53:21 CEST 2010


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=TRUE)

the "mydata" file in my case is the 3dmaskdump file with 52 columns and 671
rows (all values range between 0 and 1 after they're scaled)

the other file, what I assumed was the "grouping file" (or the
"vowel_feature") is the file that defines features for the vowels (i.e.
column 1 of the file is vowel name (a, i, u) and every other column in a
distinct combination of 0's and 1's defining the vowel (so this file has 26
columns and 254 rows). Therefore, every column that follows represents a
particular "feature" of that vowel.. (hope this makes sense!!)

So, the reason I wanted to return G <- vowel_feature[15] in my previous post
is because I need to extract a column that represents "backness" of the
vowel  (while other columns represent "roundedness", "nasalization"
features, etc). So what (in my mind) G <- vowel_feature[15] would return is
1 column which is 254 rows long with 0's and 1's in it.
i.e.

1       0
2       1
3       1
4       0
...
..
.
254    1

I am a novice with R (so I know my questions are pretty dumb!), but I really
hope I clarified my confusion a bit better.  I very much appreciate your
help. 

Looking forward to your replies.

Thank you again,
Cobbler


-- 
View this message in context: http://r.789695.n4.nabble.com/Linear-Discriminant-Analysis-in-R-tp2231922p2235777.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list