similar to: Cross-validation for Linear Discrimitant Analysis

Displaying 20 results from an estimated 10000 matches similar to: "Cross-validation for Linear Discrimitant Analysis"

2004 Jan 23
1
predict.lda problem with posterior probabilities
With predict.lda the posterior probabilities only relate to the existing Class definitions. This is fine for Class definitions like gender but it is a problem when new data does not necessarily belong to an existing Class. Is there a classification method that gives posterior probabilities for Class membership and does not assume the new data must belong to one of the existing Classes? A new
2005 Jun 15
1
2 LDA
Hi, I am using Partek for LDA analysis. For a binary response variable, it generates 2 discriminant functions, one for each of the 2 levels of the response variable. And I can simply calculate 2 discriminant scores (say d1 and d2) for each sampples using the 2 discriminant functions, then I can use the following formula to compute the posterior probability for the sample:
2003 Apr 02
1
lda of MASS library
Hi, it seems that the lda function in MASS library doesn''t give out the constant for the linear discriminant function under the situation that we don''t use standardized variable, anyone knows how to obtain the constant in order to construct the linear discriminant function? I understand that if the priors are set to be 1/2, the threshold of the discriminant score used to
2005 Sep 29
1
Fisher's discriminant functions
Hi everyone, I'm trying to solve a problem about how to get the Fisher's discriminant functions of a "lda" (linear discriminant analysis) object, I mean, the object obtained from doing "lda(formula, data)" function of the package MASS in R-project. This object gives me the canonical linear functions (n-1 coefficients matrix of n groups at least), and only with this
2006 Nov 16
3
X-fold cross validation function for discriminant analysis
Hi all, I ran a discriminant analysis with some data and want to get a general idea of prediction error rate. Some have suggested using X-fold cross validation procedure. Anyone know if there is a function for this in R? Thanks, Wade [[alternative HTML version deleted]]
2006 Feb 20
1
linear discriminant analysis in MASS
Hello R people I now know how to run my discriminant analysis with the lda function in MASS: lda.alain=lda(Groupes ~ Ht.D0 + Lc.Dc + Ram + IDF, gr, CV = FALSE) and it works fine. But I am missing a test and cannot find any help on how to get it, if it exist. The "S" equivalent: discrim(structure(.Data = Groupes ~ Ht.D0 + Lc.Dc + Ram + IDF, class = "formula"), data = gr,
2009 Apr 26
1
help with plotting results of lda
Hi, I've performed an lda and obtained a classification table for some of my data: > efa.dfa<-lda(groups~.,efa.scores.8,CV=T) > str(efa.dfa) List of 5 $ class : Factor w/ 2 levels "1","2": 1 2 1 2 1 1 2 2 1 2 ... $ posterior: num [1:160, 1:2] 0.99083 0.00852 0.93983 0.23186 0.85931 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : chr [1:160]
2005 Jul 05
4
Discriminant Function Analysis
Dear All This is more of a statistics question than a question about help for R, so forgive me. I am using lda from the MASS package to perform linear discriminant function analysis. I have 14 cases belonging to two groups and have measured each of 37 variables. I want to find those variables that best discriminate between the two groups, and I want to visualise that and create a
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
2011 May 16
1
Linear Discriminant Analysis error: "Variables appear constant"
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 different clusters of fish abundance data (clusters were developed using Bray-Curtis and NMDS), and my predictor variables are environmental variables that
2010 Jul 18
2
loop troubles
Hi all, I appreciate the help this list has given me before. I have a question which has been perplexing me. I have been working on doing a Bayesian calculating inserting studies sequentially after using a non-informative prior to get a meta-analysis type result. I created a function using three iterations of this, my code is below. I insert prior mean and precision (I add precision manually
2007 Apr 09
1
Could not fit correct values in discriminant analysis by bruto.
Shuji, I suspect that bruto blows up because your data are linearly separable. To see this (if you didn't already know), try library(lattice) splom(~x, groups = y) and look at the first row. If you are trying to do classification, there are a few methods that would choke on this (logistic regression) and a few that won't (trees, svms etc). I would guess that bruto is in the latter
2012 Aug 05
1
Possible bug with MCMCpack metropolis sampler
Hi, I'm having issues with what I believe is a bug in the MCMCpack's MCMCmetrop1R function. I have code that basically looks like this: posterior.sampler <- function(data, prior.mu){ log.posterior <- function(theta) log.likelihood(data, theta) + log.prior(prior.mu, theta) post.samples <- MCMCmetrop1R(log.posterior, theta.init=prior.mu, burnin=100, mcmc=1000, thin=40,
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 May 24
1
Animal Morphology: Deriving Classification Equation with Linear Discriminat Analysis (lda)
Fellow R Users: I'm not extremely familiar with lda or R programming, but a recent editorial review of a manuscript submission has prompted a crash cousre. I am on this forum hoping I could solicit some much needed advice for deriving a classification equation. I have used three basic measurements in lda to predict two groups: male and female. I have a working model, low Wilk's lambda,
2007 Dec 27
1
Lda and Qda
Hi all, I'm working with some data: 54 variables and a column of classes, each observation as one of a possible seven different classes: > var.can3<-lda(x=dados[,c(1:28,30:54)],grouping=dados[,55],CV=TRUE) Warning message: In lda.default(x, grouping, ...) : variables are collinear > summary(var.can3) Length Class Mode class 30000 factor numeric ### why?? I
2010 Jul 04
2
help with predict.lda
HI, Dear community, I am using the linear discriminant analysis to build model and make new predictions: > dim(train) #training data [1] 1272 22 > dim(valid) # validation data [1] 140 22 lda.fit <- lda(out ~ ., data=train, na.action="na.omit", CV=TRUE) # model fitting of linear discriminant analysis on training data > predict(lda.fit, valid) # make prediction on
2007 Apr 03
1
Calculating DIC from MCMC output
Greetings all, I'm a newcomer to Bayesian stats, and I'm trying to calculate the Deviance Information Criterion "by hand" from some MCMC output. However, having consulted several sources, I am left confused as to the exact terms to use. The most common formula can be written as DIC = 2*Mean(Deviance over the whole sampled posterior distribution) - Deviance(Mean
2010 Jun 05
1
Prediction in discriminant analysis
Sir, I am working with multiclass discriminant analysis.(say response variable has 3classes).In R, using lda(), I get 2 sets of coefficients for the discriminant function.Now, I want to put a new x-vector(vector of independent variables) and want to check it corresponds to which class of y.Is there any formula for doing this? or how can I do this? Regards, Suman Dhara [[alternative HTML
2007 Jan 26
1
Bayesian inference: Poisson distribution with normal (!) prior
Hello, for a frequency modelling problem I want to combine expert knowledge with incoming real-life data (which is not available up to now). The frequency has to be modelled with a poisson distribution. The parameter lambda has to be normal distributed (for certain reasons we did not NOT choose gamma althoug it would make everything easier). I've started with the subsequent two functions to