Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The dataset below Universities.csv contains information on 1302 American colleges and universities offering an undergraduate program. For each university, there are 17 measurements that include

The dataset below Universities.csv contains information on 1302 American colleges and universities offering an undergraduate program. For each university, there are 17 measurements that include continuous measurements (such as tuition and graduation rate) and categorical measurements (such as location by state and whether it is a private or a public school). You will use it to practice data mining in R

Remove all categorical variables. Then remove all records with missing numerical measurements from the dataset.

Conduct a principal components analysis on the cleaned data and comment on the results. Should the data be normalized? Discuss what characterizes the components you consider key.

Here are the codes

read.csv(file.choose(Universities))

Univ<-data.frame(Universities)

summary(Univ)

# (1) Remove all categorical variables.

# Then remove all records with missing numerical measurements from the data set.

# Remove all categorical variables

Univ <- Universities[-c(1:2)]

View(Univ)

# Remove all records with missing numerical measurements from the data set

sum(is.na(Univ))

complete.cases(Univ)

cleanUniversities<- Univ[complete.cases(Univ), ]

str(cleanUniversities)

View(cleanUniversities)

# (2) Conduct a principal components analysis on the cleaned data and comment on the results.

# Should the data be normalized? Discuss what characterizes the components you consider key

# Conduct a PCA

pcs <- prcomp(cleanUniversities)

Nothing showed under view.

pcs <- prcomp(cleanUniversities)

Error in svd(x, nu = 0, nv = k) : a dimension is zero

>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Discrete Structures, Logic, And Computability

Authors: James L Hein

3rd Edition

1449615279, 9781449615277

More Books

Students also viewed these Mathematics questions

Question

x-3+1, x23 Let f(x) = -*+3, * Answered: 1 week ago

Answered: 1 week ago

Question

Get married, do not wait for me

Answered: 1 week ago

Question

Do not pay him, wait until I come

Answered: 1 week ago

Question

Do not get married, wait until I come, etc.

Answered: 1 week ago