Data Screening Assessment Answer
|
lab3$Gender[lab3$Gender == "male"] "Male" lab3$Gender[lab3$Gender == "female"] "Female" lab3$Information[lab3$Information == "info poor"] "Poor Information" lab3$Information[lab3$Information == "info rich"] "Rich Information" lab3$Gender as.factor(lab3$Gender) lab3$Information as.factor(lab3$Information) summary(lab3) |
Gender Information likeability externalatt Female:18 PoorInformation:18 Min. : 0.00 Min. :5.000 Male :17 RichInformation:20 1stQu.:76.00 1st Qu.:7.000 NA's :3 Median:83.00 Median:7.000
Mean : 80.21 Mean :7.289 3rd Qu.: 91.50 3rd Qu.:8.000 Max. :100.00 Max. :9.000
interalatt ovcompt selfesteem negmood Min. :3.000 Min. :11.00 Min. :0.3894 Min. : 2.000 1stQu.:6.000 1stQu.:13.00 1stQu.:1.8349 1st Qu.:2.000
Median:7.000 Median:14.00 Median:3.2733 Median :3.000
Mean :6.763 Mean :14.11 Mean :3.7119 Mean : 4.297 3rd Qu.:8.000 3rd Qu.:16.00 3rd Qu.:4.8068 3rd Qu.: 6.000 Max. :9.000 Max. :18.00 Max. :9.3132 Max. :12.000
NA's :1 NA's :1
given a few pieces of information about a person (short resume), while information rich participants were given more information about a person (long resume). The dataset assign category to all the 38 subjects
talking to them (scale is in percentages). This column/feature/attribute is not out of range as it is between 0%-100%.
felt about the person on a 9 point Likert scale. This column/feature/attribute is not out of range as it is between 0-9.
test on a 9 point Likert scale. This column/feature/attribute is not out of range as it is between 0-9.
umn/feature/attribute is not out of range as it is between 0-10 with a max of 9.3132.
|
correct.indexes $negmood <= 10 correct.indexes[is.na(correct.indexes)] TRUE lab3 summary(lab3) |
Gender Information likeability externalatt Female:17 Poor Information:16 Min. : 0.00 Min. :5.00 Male :16 Rich Information:20 1st Qu.: 75.50 1st Qu.:7.00 NA's :3 Median : 85.00 Median:7.00
Mean : 80.33 Mean :7.25 3rd Qu.: 92.00 3rd Qu.:8.00 Max. :100.00 Max. :9.00
interalatt ovcompt selfesteem negmood Min. :3.000 Min. :11.0 Min. :0.3894 Min. :2.000 1stQu.:6.000 1stQu.:12.5 1stQu.:2.0669 1stQu.:2.000
Median:7.000 Median:14.0 Median:3.7072 Median:3.000
Mean :6.694 Mean :14.0 Mean :3.8183 Mean :3.886 3rd Qu.:8.000 3rd Qu.:16.0 3rd Qu.:5.0288 3rd Qu.:6.000 Max. :9.000 Max. :18.0 Max. :9.3132 Max. :9.000
NA's :1 NA's :1
table(lab3$Gender)
Female Male
17 16
table(lab3$Information)
Poor Information Rich Information
16 20
Everyone is not skipping the same question, it appears to be random in nature.
(percentage.missing<-apply(is.na(lab3),2,sum)/nrow(lab3)*100)
Gender Information likeability externalatt interalatt ovcompt 8.333333 0.000000 0.000000 0.000000 0.000000 2.777778
selfesteem negmood 0.000000 2.777778
|
lab3<-lab3[!apply(is.na(lab3),1,sum)>1,] (percentage.missing<-apply(is.na(lab3),2,sum)/nrow(lab3)*100) |
Gender Information likeability externalatt interalatt ovcompt 8.333333 0.000000 0.000000 0.000000 0.000000 2.777778
selfesteem negmood 0.000000 2.777778
md.pattern(lab3)
|
31 |
0 |
||||||||
|
3 |
1 |
||||||||
|
1 |
1 |
||||||||
|
1 |
1 |
||||||||
|
0 |
0 |
0 |
0 |
0 |
1 |
1 |
3 |
5 |
|
Information |
likeability |
externalatt |
interalatt |
selfesteem |
ovcompt |
||
|
31 |
1 |
1 |
1 |
1 |
1 |
1 |
|
|
3 |
1 |
1 |
1 |
1 |
1 |
1 |
|
|
1 |
1 |
1 |
1 |
1 |
1 |
1 |
|
|
1 |
1 |
1 |
1 |
1 |
1 |
0 |
|
|
0 |
0 |
0 |
0 |
0 |
1 |
||
|
negmood Gender |
|||||||
|
31 |
1 |
1 |
0 |
||||
|
3 |
1 |
0 |
1 |
||||
|
1 |
0 |
1 |
1 |
||||
|
1 |
1 |
1 |
1 |
||||
|
1 |
3 |
5 |
|||||
Let’sunderstandthistable. Thereare33observationswithnomissingvalues. Thereare3observationswith missingvaluesinGenderSimilarly,thereare1missingvalueswithnegmoodandsoon.
|
lab3 complete.cases(lab3), ] nums unlist(lapply(lab3, is.numeric)) numeric.lab3 (mahalanobis.dist maha_dist(numeric.lab3)) |
[1] 2.3394832 2.4654131 4.7297569 6.8506185 2.0964151 6.1884968
[7] 2.6946912 1.3369857 1.208658419.3674108 2.8973412 1.3472412
|
0 |
|
5 |
[13] 1.4970120 3.6756000 4.3838732 6.911943611.0801184 1.3391054
[19] 7.4482359 6.8308977 0.9715782 5.3983499 4.0121421 7.5310089
[25] 4.3361726 4.5433479 5.2215257 7.0104954 5.5647990 5.8809187
[31] 2.8403632
hist(mahalanobis.dist, main="Mahalanobis distance", xlab="distance")
|
Frequency |
|
10 |
|
15 |
Mahalanobis distance
distance
The above function returned a vector, with the same length as the number of rows of the provided data frame, corresponding to the average mahalanobis distances of each row from the whole data set.
|
numeric.lab3 <= quantile(mahalanobis.dist, 0.95), ] lab3 <= quantile(mahalanobis.dist, 0.95), ] |
symnum(cor(numeric.lab3),abbr.colnames=FALSE)
likeability externalatt interalatt ovcompt selfesteem negmood likeability 1
externalatt 1
interalatt . 1
ovcompt + * 1
selfesteem 1
negmood 1
attr(,"legend")
[1]0''0.3'.'0.6','0.8'+'0.9'*'0.95'B'1
As indicated in the legend, the correlation coefficients between 0 and 0.3 are replaced by a space (" “); correlation coefficients between 0.3 and 0.6 are replace by”.“; etc .
The variable ovcompt is highly correlated to externalatt and interalatt.
|
result<-mvn(data=numeric.lab3, mvnTest = "royston", univariatePlot = "histogram") |
|
Density |
|
0.000 |
|
0.015 |
|
0.030 |
|
Density |
|
0.0 |
|
0.4 |
|
0.8 |
|
Density |
|
0.0 |
|
0.1 0.2 0.3 |
50 60 70 80 90 100
5 6 7 8 9
4 5 6 7 8 9
|
0.15 |
|
0.6 |
likeability
externalatt
interalatt
|
Density |
|
0.00 |
|
0.10 0.20 |
|
Density |
|
0.00 |
|
0.05 0.10 |
|
Density |
|
0.0 |
|
0.2 0.4 |
11 13 15 17
0 2 4 6 8 10
2 3 4 5 6 7 8 9
ovcompt
selfesteem
negmood
As seen from Figure above, negmood has a right-skewed distribution and likeability and interalatt has a left-skewed distribution whereas other variables have approximately normal distributions. Thus, we can concludethatproblemswithmultivariatenormalityarisefromtheskeweddistributionsmentionedabove.
|
result<-mvn(data=numeric.lab3, mvnTest = "royston", univariatePlot = "qqplot", |
|
8 |
multivariatePlot="qq")
|
10 12 14 |
Chi−Square Q−Q Plot
|
Chi−Square Quantile |
|
2 |
|
4 |
|
6 |
2 4 6 8 10
Squared Mahalanobis Distance
|
80 |
|
100 |
|
8 |
|
9 |
Normal Q−Q Plot (likeability)
Normal Q−Q Plot (externalatt)
Normal Q−Q Plot (interalatt)
|
Sample Quantiles |
|
60 |
|
Sample Quantiles |
|
5 |
|
6 |
|
7 |
|
Sample Quantiles |
|
4 5 6 7 8 9 |
−2 −1 0 1 2
−2 −1 0 1 2
−2 −1 0 1 2
Theoretical Quantiles
Theoretical Quantiles
Theoretical Quantiles
Normal Q−Q Plot (selfesteem
|
6 |
|
8 |
Normal Q−Q Plot (negmood)
|
Sample Quantiles |
|
11 13 15 17 |
|
Sample Quantiles |
|
2 4 6 8 |
|
Sample Quantiles |
|
2 |
|
4 |
−2 −1 0 1 2
−2 −1 0 1 2
−2 −1 0 1 2
Theoretical Quantiles
Theoretical Quantiles
Theoretical Quantiles
Except for the likeabililty and self esteem, the other variables do not show multivariate normality.
Inadditiontotheunivariateplots,onecanalsoperformunivariatenormalitytestsusingtheunivariateTest argumentinthemvnfunction.Itprovidesseveralwidelyusedunivariatenormalitytests,including“SW”(do notapplyShapiro-Wilk’stest,ifdatasetincludesmorethan5000casesorlessthan3cases.) forShapiro-Wilk test, “CVM” for Cramer-von Mises test, texttt“Lillie” for Lilliefors test, “SF” for Shapiro-Francia test and “AD” Anderson-Darlingtest.
|
par(mfrow=c(3,2)) plot(lm(likeability~.,data=numeric.lab3)$residuals, type = "l", main="residuals", ylab="likeability") plot(lm(externalatt~.,data=numeric.lab3)$residuals, type = "l", main="residuals", ylab="externalatt") plot(lm(interalatt~.,data=numeric.lab3)$residuals, type = "l", main="residuals", ylab="interalatt") plot(lm(ovcompt~.,data=numeric.lab3)$residuals, type = "l", main="residuals", |
|
ylab="ovcompt") plot(lm(selfesteem~.,data=numeric.lab3)$residuals, type = "l", main="residuals", ylab="selfesteem") plot(lm(negmood~.,data=numeric.lab3)$residuals, type = "l", main="residuals", ylab="negmood") |
|
likeability |

|
20 |

|
externalatt |
residuals residuals
|
−30 |

|
−1e−14 |
0 5 10 15 20 25 30 0 5 10 15 20 25 30
Index Index
|
interalatt |
|
ovcompt |
|
0e+00 |
residuals residuals
0 5 10 15 20 25 30 0 5 10 15 20 25 30
|
−1e−14 |
Index Index
|
4 |
|
negmood |
residuals residuals
|
selfesteem |

|
−2 |

|
−2 4 |
0 5 10 15 20 25 30 0 5 10 15 20 25 30
Index Index
All the graph indicates homogeneity.
None of the graph indicates homoscedasticity.
The study is all about an imaginary situation of interviewing a person for a job by the selected participants of the study. Participants were given a resume of the job candidate and allowed to talk to that candidate. Finally they were given a questionnaire with few variables stated below. Gender is a participants gender. The variable Information states the category each subject was assigned with two categories of poor and rich. Information poor participants were only given a few pieces of information about a person, while information rich participants were given more information about a person.
The variable Likability defines participants rating of likeability of a person given some information and a short time talking to them (scale is in percentages). The variable Externalatt defines explicit rating of a participants attitude assessed by asking the participant how they felt about the person on a 9 point Likert scale. The Internalatt defines implicit rating of a participants attitude about a person assessed by the implicit attitudes test on a 9 point Likert scale. Ovcompt defines rating scale about how much a participant thought the participant was overcompensating for a flaw on their résumé on a 0-20 scale. Selfesteem defines an average rating of each participants self esteemon a 0-10 scale. Negmood defines a rating of how negative/positive a participant was during the fake interview where lower numbers are more positive on a 0-10 scale.
Gender has 3 missing observations. Selfesteem and negmood each have one observation missing. Missing observations are excluded from the study. Information, likeability, externalatt, internalatt, ovcompt have no missing observations. The data set has 17 female and 16 male participants. We have 16 poor information and 20 rich information. Likebility has a median of 85 with a minimum and maximum of 0 and 100 respectively. Externalatt has a median of 7 with a minimum and maximum of 5 and 9 respectively. In a similar way interalatt has a median of 7 with a minimum and maximum of 3 and 9 respectively. Ovcompt has a median of 14 with a range of 7. Selfesteem has a median of 3.7 with a range of almost 9. Negmood has a median of 3 with range of 7.
There are 33 observations with no missing values. There are 3 observations with missing values in Gender Similarly, there are 1 missing values with negmood and so on.
I have used mahalanobis to solve for the outliers and clearly mentioned that while doing it.Looking at the histogram of Mahalanobis distance reveals no presence of outliers (regardless of cutoff) in the data set. The variable ovcompt is highly correlated to externalatt and interalatt. The histograms of the variables reveal that likebility and interalatt have left-skewed distributions whereas negmood has a right-skewed distribution. All other variables approximately follow the normal distribution.
No I didnt had any issue. I simply use the MVN package of R
The assumption of multivariate normality has not been satisfied. Only likeabililty and self esteem show multivariate normality whereas other variables do not show multivariate normality. The residuals show no specific patterns. Therefore, the assumption of homoscedasticity is satisfied and all the graph shows homogeneity
1,212,718Orders
4.9/5Rating
5,063Experts
Turnitin Report
$10.00Proofreading and Editing
$9.00Per PageConsultation with Expert
$35.00Per HourLive Session 1-on-1
$40.00Per 30 min.Quality Check
$25.00Total
FreeGet
500 Words Free
on your assignment today
Get
500 Words Free
on your assignment today
Request Callback
Doing your Assignment with our resources is simple, take Expert assistance to ensure HD Grades. Here you Go....