SlideShare a Scribd company logo
Discriminant functionanalysis(DFA) in R
Presented by
Priya dharshan
What is discriminant function analysis?
 DAis a statistical method
 Used by researches to help them understand the relationship between a
“dependent variable” & one/ more “independent variables”.
 DAis similar to regression analysis (RA) & analysis of variance (ANOVA)
 DFA is useful in determining whether a set of variables is effective in
predicting category membership.
What are discriminant functions?
Discriminant analysis works by creating one or more linear combinations
of predictors, creating a new latent variable for each function. These
functions are called as “discriminant functions”.
Why do we use DA?
 DA has various benefits as a statistical tool and is quite similar to
regression analysis.
 It can be used to determine which predictor variables are related to the
dependant variable and to predict the value of the dependant variable given
certain values of the predictor Variables.
When to use DA
 Data must be from different groups. Membership of group should be
already known before the starting analysis.
 It is used for the analysis of differences in groups.
 It is used for classification of new objects.
Purposeof DA
The objective of DA is to develop discriminant functions that are nothing
but the linear combination of independent variables that will discriminate
between the categories of the dependent variable in a perfect manner.
Basics of DFA
Discriminating variables (predictors):
independent variables which construct a discriminant function
Dependent variable (criterion variable):
 Object of classification on the basis of independent variables
 Needs to be categorical
 Known as grouping variables in SPSS.
Steps in analysis
Step 1
The
independent
variables
which have
the
discriminati
ng power
are being
chosen
Step 2
A
discriminant
function
model is
developed by
using the
coefficients of
independent
variables.
Step 3
Wilk’s
lambda is
computed for
testing the
significance
of
discriminant
function
Step 4
The
independent
variables
which possess
importance in
discriminatin
g the groups
are being
found
Step 5
Classificatio
n of subjects
to their
respective
group is
being made
DA in R programming
DFA (2 groups)
library(dplyr)
library(haven)
library(ggplot2)
mydat <- read_sav("C:/Users/cpflower/Dropbox (UNC
Charlotte)/RSCH8140/R/DFA/pope.sav")
View(mydat)
scatterplotMatrix(mydat[2:4])
install.packages("DFA.data")
library(DFA.data)
DFA(data=mydat, groups="gp", variables=c('wi', 'wc', 'pc'),
predictive=TRUE, prior='SIZES', verbose=TRUE)
Discriminant Analysis model
The DAM involves linear combinations of the following form;
D= b₀ + b₁x₁ + b₂x₂ + b₃x₃ +….+ bĸXĸ
Where ,
D = discriminant score
b’s = discriminant coefficient / weight
x’s = predictor/ independent variable
• The coefficient / weights, are estimated so that the groups differ as much as
possible on the values of the discriminant function.
• DA– creates an equation which will minimize the possibility of misclassifying
cases into their respective groups / categories.
Hypothesis
• DAtests the following hypotheses;
• H₀: the group means of a set of independent variables for two /more groups
are equal.
• H₁: the group means for two/ more groups are not equal.
• Here, this group means is referred to as a centroid.
1) Linear Discriminant Analysis
• Alinear combination of features
• Ronald Fishers in 1936
• This methods group images of the same classes & separates images of the
different classes.
• To identify an input test image, the projected test image is compared to each
projected training image, & the test image is identified as the closest training
image.
• This classification involving 2 target categories & 2 predictor variables.
• Images are projected from 2D spaces to C dimensional space, where C is the
no. of classes of the images.
How does LDA work?
Step 1:
• To calculate the seperability between
different classes also called as
between – class variance.
Step 2:
• To calculate the distance between the
mean & sample of each class, is
called the within class variance.
step 3:
• To construct the lower dimensional
space which maximizes the between
class variance & minimizes the within
class variance.
LDA
2) Multiple Discriminant analysis
• To discriminate among more than 2 groups
• It requires g-1 no. of discriminant functions, where g is the no. of groups
• The best discriminant will be judged as per the comparison between
functions.
• Similar to multiple regression
• assumptions remain same.
Assumptions in DA
Assumptions:
• Apredictors are normally distributed
• The variance covariance matrices for the predictors within each of the
groups are equal.
 Sample size
 Normal distribution
 Homogenecity of variance/covariances
 Outliers
 Non- multicollinearity
 Mutually exclusive
 Classification
 Variability
Advantages
 Discrimination of different groups
 Accuracy of classification groups can be determined
 Helps for categorical regression analysis
 Visual graphics makes clear & understanding 2/ more categories.
Limitations
 LD can’t be used when subgroups are stronger.
 Predictor variables don’t strong.
 It can’t be used when there is insufficient data
 It was not usable to less no. of observation
 Small distribution gives good discriminant functions between groups.
 Large distribution gives poor discriminant functions between groups.
Applications
 Prediction & description DA
 Agriculture, fisheries, crop & yield studies, geoinformatics, bioinformatics, social
sciences, researches.
 Socio economics
 Hydrological & physico-chemical studies in water sources
 Face recognition
 Marketing
 Financial research
 Human resources
Thank you….,

More Related Content

Similar to R studio.pptx

Discriminant Analysis in Sports
Discriminant Analysis in SportsDiscriminant Analysis in Sports
Discriminant Analysis in Sports
J P Verma
 
discriminant analysis
discriminant analysisdiscriminant analysis
discriminant analysis
krishnadk
 
Discriminant analysis
Discriminant analysisDiscriminant analysis
Discriminant analysis
Discriminant analysisDiscriminant analysis
simple discriminant
simple discriminantsimple discriminant
simple discriminant
neha singh
 
diiscriminant analysis1.pptx
diiscriminant analysis1.pptxdiiscriminant analysis1.pptx
diiscriminant analysis1.pptx
SharumathiR1
 
Machine learning Mind Map
Machine learning Mind MapMachine learning Mind Map
Machine learning Mind Map
Ashish Patel
 
Discriminant analysis.pptx
Discriminant analysis.pptxDiscriminant analysis.pptx
Discriminant analysis.pptx
DevendraRavindraPati
 
Discriminant analysis
Discriminant analysisDiscriminant analysis
Discriminant analysis
Sandeep Soni Kanpur
 
Chapter 11 KNN Naive Bayes and LDA.pptx
Chapter 11 KNN  Naive Bayes and LDA.pptxChapter 11 KNN  Naive Bayes and LDA.pptx
Chapter 11 KNN Naive Bayes and LDA.pptx
kiitlabsbsc
 
Discriminant analysis
Discriminant analysisDiscriminant analysis
Discriminant analysis
Amritashish Bagchi
 
Discriminant Analysis
Discriminant AnalysisDiscriminant Analysis
Discriminant Analysis
UshaRaniPattnayak
 
EDA by Sastry.pptx
EDA by Sastry.pptxEDA by Sastry.pptx
EDA by Sastry.pptx
AmitDas125851
 
Singular Value Decomposition (SVD).pptx
Singular Value Decomposition (SVD).pptxSingular Value Decomposition (SVD).pptx
Singular Value Decomposition (SVD).pptx
rajalakshmi5921
 
EDAB Module 5 Singular Value Decomposition (SVD).pptx
EDAB Module 5 Singular Value Decomposition (SVD).pptxEDAB Module 5 Singular Value Decomposition (SVD).pptx
EDAB Module 5 Singular Value Decomposition (SVD).pptx
rajalakshmi5921
 
Discriminant analysis using spss
Discriminant analysis using spssDiscriminant analysis using spss
Discriminant analysis using spss
Dr Nisha Arora
 
PythonML.pptx
PythonML.pptxPythonML.pptx
PythonML.pptx
Hussain395748
 
Discriminant analysis-Business Intelligence tool
Discriminant analysis-Business Intelligence toolDiscriminant analysis-Business Intelligence tool
Discriminant analysis-Business Intelligence tool
RenuLamba8
 

Similar to R studio.pptx (20)

Discriminant Analysis in Sports
Discriminant Analysis in SportsDiscriminant Analysis in Sports
Discriminant Analysis in Sports
 
discriminant analysis
discriminant analysisdiscriminant analysis
discriminant analysis
 
Discriminant analysis
Discriminant analysisDiscriminant analysis
Discriminant analysis
 
Discriminant analysis
Discriminant analysisDiscriminant analysis
Discriminant analysis
 
simple discriminant
simple discriminantsimple discriminant
simple discriminant
 
diiscriminant analysis1.pptx
diiscriminant analysis1.pptxdiiscriminant analysis1.pptx
diiscriminant analysis1.pptx
 
Machine learning Mind Map
Machine learning Mind MapMachine learning Mind Map
Machine learning Mind Map
 
Discriminant analysis.pptx
Discriminant analysis.pptxDiscriminant analysis.pptx
Discriminant analysis.pptx
 
Discriminant analysis
Discriminant analysisDiscriminant analysis
Discriminant analysis
 
Chapter 11 KNN Naive Bayes and LDA.pptx
Chapter 11 KNN  Naive Bayes and LDA.pptxChapter 11 KNN  Naive Bayes and LDA.pptx
Chapter 11 KNN Naive Bayes and LDA.pptx
 
Discriminant analysis
Discriminant analysisDiscriminant analysis
Discriminant analysis
 
Discriminant Analysis
Discriminant AnalysisDiscriminant Analysis
Discriminant Analysis
 
EDA by Sastry.pptx
EDA by Sastry.pptxEDA by Sastry.pptx
EDA by Sastry.pptx
 
Singular Value Decomposition (SVD).pptx
Singular Value Decomposition (SVD).pptxSingular Value Decomposition (SVD).pptx
Singular Value Decomposition (SVD).pptx
 
EDAB Module 5 Singular Value Decomposition (SVD).pptx
EDAB Module 5 Singular Value Decomposition (SVD).pptxEDAB Module 5 Singular Value Decomposition (SVD).pptx
EDAB Module 5 Singular Value Decomposition (SVD).pptx
 
Discriminant analysis using spss
Discriminant analysis using spssDiscriminant analysis using spss
Discriminant analysis using spss
 
Kinds Of Variable
Kinds Of VariableKinds Of Variable
Kinds Of Variable
 
Cluster analysis
Cluster analysisCluster analysis
Cluster analysis
 
PythonML.pptx
PythonML.pptxPythonML.pptx
PythonML.pptx
 
Discriminant analysis-Business Intelligence tool
Discriminant analysis-Business Intelligence toolDiscriminant analysis-Business Intelligence tool
Discriminant analysis-Business Intelligence tool
 

More from PriyadharshanBobby

autocorrelation.pptx
autocorrelation.pptxautocorrelation.pptx
autocorrelation.pptx
PriyadharshanBobby
 
com.pptx
com.pptxcom.pptx
BUDJET 23.pptx
BUDJET 23.pptxBUDJET 23.pptx
BUDJET 23.pptx
PriyadharshanBobby
 
AEC502-1.
AEC502-1.AEC502-1.
ENGLISH.pptx
ENGLISH.pptxENGLISH.pptx
ENGLISH.pptx
PriyadharshanBobby
 
Ethics.pptx
Ethics.pptxEthics.pptx
Ethics.pptx
PriyadharshanBobby
 
Presentation-WPS Office-1.pptx
Presentation-WPS Office-1.pptxPresentation-WPS Office-1.pptx
Presentation-WPS Office-1.pptx
PriyadharshanBobby
 
arrowsimpossibilitytheorem-220603081823-4733ec7f (1).pptx
arrowsimpossibilitytheorem-220603081823-4733ec7f (1).pptxarrowsimpossibilitytheorem-220603081823-4733ec7f (1).pptx
arrowsimpossibilitytheorem-220603081823-4733ec7f (1).pptx
PriyadharshanBobby
 
IPR-Patent.pptx
IPR-Patent.pptxIPR-Patent.pptx
IPR-Patent.pptx
PriyadharshanBobby
 
NR forestry.pptx
NR forestry.pptxNR forestry.pptx
NR forestry.pptx
PriyadharshanBobby
 
NR kurznets curve.pptx
NR kurznets curve.pptxNR kurznets curve.pptx
NR kurznets curve.pptx
PriyadharshanBobby
 
MARKETING value chain.pptx
MARKETING value chain.pptxMARKETING value chain.pptx
MARKETING value chain.pptx
PriyadharshanBobby
 

More from PriyadharshanBobby (13)

autocorrelation.pptx
autocorrelation.pptxautocorrelation.pptx
autocorrelation.pptx
 
com.pptx
com.pptxcom.pptx
com.pptx
 
BUDJET 23.pptx
BUDJET 23.pptxBUDJET 23.pptx
BUDJET 23.pptx
 
AEC502-1.
AEC502-1.AEC502-1.
AEC502-1.
 
ENGLISH.pptx
ENGLISH.pptxENGLISH.pptx
ENGLISH.pptx
 
Ethics.pptx
Ethics.pptxEthics.pptx
Ethics.pptx
 
Ethics.pptx
Ethics.pptxEthics.pptx
Ethics.pptx
 
Presentation-WPS Office-1.pptx
Presentation-WPS Office-1.pptxPresentation-WPS Office-1.pptx
Presentation-WPS Office-1.pptx
 
arrowsimpossibilitytheorem-220603081823-4733ec7f (1).pptx
arrowsimpossibilitytheorem-220603081823-4733ec7f (1).pptxarrowsimpossibilitytheorem-220603081823-4733ec7f (1).pptx
arrowsimpossibilitytheorem-220603081823-4733ec7f (1).pptx
 
IPR-Patent.pptx
IPR-Patent.pptxIPR-Patent.pptx
IPR-Patent.pptx
 
NR forestry.pptx
NR forestry.pptxNR forestry.pptx
NR forestry.pptx
 
NR kurznets curve.pptx
NR kurznets curve.pptxNR kurznets curve.pptx
NR kurznets curve.pptx
 
MARKETING value chain.pptx
MARKETING value chain.pptxMARKETING value chain.pptx
MARKETING value chain.pptx
 

Recently uploaded

Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
AnirbanRoy608946
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
enxupq
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
jerlynmaetalle
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
dwreak4tg
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
74nqk8xf
 
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
2023240532
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
g4dpvqap0
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
balafet
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 

Recently uploaded (20)

Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
 
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 

R studio.pptx

  • 1. Discriminant functionanalysis(DFA) in R Presented by Priya dharshan
  • 2.
  • 3. What is discriminant function analysis?  DAis a statistical method  Used by researches to help them understand the relationship between a “dependent variable” & one/ more “independent variables”.  DAis similar to regression analysis (RA) & analysis of variance (ANOVA)  DFA is useful in determining whether a set of variables is effective in predicting category membership.
  • 4. What are discriminant functions? Discriminant analysis works by creating one or more linear combinations of predictors, creating a new latent variable for each function. These functions are called as “discriminant functions”.
  • 5. Why do we use DA?  DA has various benefits as a statistical tool and is quite similar to regression analysis.  It can be used to determine which predictor variables are related to the dependant variable and to predict the value of the dependant variable given certain values of the predictor Variables.
  • 6. When to use DA  Data must be from different groups. Membership of group should be already known before the starting analysis.  It is used for the analysis of differences in groups.  It is used for classification of new objects.
  • 7. Purposeof DA The objective of DA is to develop discriminant functions that are nothing but the linear combination of independent variables that will discriminate between the categories of the dependent variable in a perfect manner.
  • 8. Basics of DFA Discriminating variables (predictors): independent variables which construct a discriminant function Dependent variable (criterion variable):  Object of classification on the basis of independent variables  Needs to be categorical  Known as grouping variables in SPSS.
  • 9. Steps in analysis Step 1 The independent variables which have the discriminati ng power are being chosen Step 2 A discriminant function model is developed by using the coefficients of independent variables. Step 3 Wilk’s lambda is computed for testing the significance of discriminant function Step 4 The independent variables which possess importance in discriminatin g the groups are being found Step 5 Classificatio n of subjects to their respective group is being made
  • 10. DA in R programming DFA (2 groups) library(dplyr) library(haven) library(ggplot2) mydat <- read_sav("C:/Users/cpflower/Dropbox (UNC Charlotte)/RSCH8140/R/DFA/pope.sav") View(mydat) scatterplotMatrix(mydat[2:4]) install.packages("DFA.data") library(DFA.data) DFA(data=mydat, groups="gp", variables=c('wi', 'wc', 'pc'), predictive=TRUE, prior='SIZES', verbose=TRUE)
  • 11. Discriminant Analysis model The DAM involves linear combinations of the following form; D= b₀ + b₁x₁ + b₂x₂ + b₃x₃ +….+ bĸXĸ Where , D = discriminant score b’s = discriminant coefficient / weight x’s = predictor/ independent variable • The coefficient / weights, are estimated so that the groups differ as much as possible on the values of the discriminant function. • DA– creates an equation which will minimize the possibility of misclassifying cases into their respective groups / categories.
  • 12. Hypothesis • DAtests the following hypotheses; • H₀: the group means of a set of independent variables for two /more groups are equal. • H₁: the group means for two/ more groups are not equal. • Here, this group means is referred to as a centroid.
  • 13.
  • 14. 1) Linear Discriminant Analysis • Alinear combination of features • Ronald Fishers in 1936 • This methods group images of the same classes & separates images of the different classes. • To identify an input test image, the projected test image is compared to each projected training image, & the test image is identified as the closest training image. • This classification involving 2 target categories & 2 predictor variables. • Images are projected from 2D spaces to C dimensional space, where C is the no. of classes of the images.
  • 15. How does LDA work? Step 1: • To calculate the seperability between different classes also called as between – class variance. Step 2: • To calculate the distance between the mean & sample of each class, is called the within class variance. step 3: • To construct the lower dimensional space which maximizes the between class variance & minimizes the within class variance.
  • 16. LDA
  • 17. 2) Multiple Discriminant analysis • To discriminate among more than 2 groups • It requires g-1 no. of discriminant functions, where g is the no. of groups • The best discriminant will be judged as per the comparison between functions. • Similar to multiple regression • assumptions remain same.
  • 18. Assumptions in DA Assumptions: • Apredictors are normally distributed • The variance covariance matrices for the predictors within each of the groups are equal.  Sample size  Normal distribution  Homogenecity of variance/covariances  Outliers  Non- multicollinearity  Mutually exclusive  Classification  Variability
  • 19. Advantages  Discrimination of different groups  Accuracy of classification groups can be determined  Helps for categorical regression analysis  Visual graphics makes clear & understanding 2/ more categories.
  • 20. Limitations  LD can’t be used when subgroups are stronger.  Predictor variables don’t strong.  It can’t be used when there is insufficient data  It was not usable to less no. of observation  Small distribution gives good discriminant functions between groups.  Large distribution gives poor discriminant functions between groups.
  • 21. Applications  Prediction & description DA  Agriculture, fisheries, crop & yield studies, geoinformatics, bioinformatics, social sciences, researches.  Socio economics  Hydrological & physico-chemical studies in water sources  Face recognition  Marketing  Financial research  Human resources