Professional Documents
Culture Documents
Proiect Analiza Datelor: Osicianu Claudiu-Adrian GRUPA 1060
Proiect Analiza Datelor: Osicianu Claudiu-Adrian GRUPA 1060
OSICIANU CLAUDIUADRIAN
GRUPA 1060
a<-read.csv("date.csv", header=TRUE)
a
fix(a)
attach(a)
View(a)
#DESCRIEREA DATELOR
dim(a)
names(a)
a[1:5,]
summary(a)
table(a$id)
pie(table(a$floors))
pie(table(a$bedrooms))
#CALCUL VARIANTA
var(a$price)
var(a$bedrooms)
var(a$bathrooms)
var(a$sqft_living)
var(a$sqft_lot)
var(a$condition)
var(a$yr_built)
var(a$zipcode)
#CALCUL COVARIANTA
cov(a$id,a$price)
cov(a$id,a$bedrooms)
cov(a$id,a$bathrooms)
cov(a$id,a$floors)
#CALCUL CORELATIE
cor(a$id,a$price)
cor(a$id,a$bedrooms)
var(a$floors)
var(a$grade)
var(a$yr_renovated)
cor(a$id,a$bathrooms)
cor(a$id,a$floors)
#HISTOGRAMA
hist(a$price)
hist(a$bedrooms)
hist(a$bathrooms)
hist(a$sqft_living)
hist(a$sqft_lot)
hist(a$floors)
hist(a$condition)
hist(a$grade)
hist(a$yr_built)
hist(a$yr_renovated)
hist(a$zipcode)
#DENSITATEA DE PROBABILITATE
plot(density(a$price))
plot(density(a$bedrooms))
plot(density(a$bathrooms))
plot(density(a$sqft_living))
plot(density(a$sqft_lot))
plot(density(a$floors))
plot(density(a$condition))
plot(density(a$grade))
plot(density(a$yr_built))
plot(density(a$yr_renovated))
plot(density(a$zipcode))
#SCATTER PLOT
plot(a$id,a$price)
plot(a$id,a$bedrooms)
plot(a$id,a$bathrooms)
plot(a$id,a$floors)
#BOXPLOT
boxplot(a$price)
boxplot(a$bathrooms)
boxplot(a$floors)
boxplot(a$bedrooms)
boxplot(a$sqft_living)
boxplot(a$condition)
boxplot(a$grade)
boxplot(a$yr_built)
boxplot(a$yr_renovated)
boxplot(a$zipcode)
#SKEWNESS SI KURTOSIS
library(moments)
skewness(a$price)
skewness(a$bedrooms)
skewness(a$bathrooms)
skewness(a$sqft_living)
skewness(a$sqft_lot)
skewness(a$floors)
skewness(a$condition)
skewness(a$grade)
skewness(a$yr_built)
skewness(a$yr_renovated)
skewness(a$zipcode)
kurtosis(a$price)
kurtosis(a$bedrooms)
kurtosis(a$bathrooms)
kurtosis(a$sqft_living)
kurtosis(a$sqft_lot)
kurtosis(a$floors)
kurtosis(a$condition)
kurtosis(a$grade)
kurtosis(a$yr_built)
kurtosis(a$yr_renovated)
kurtosis(a$zipcode)
#jarque-bera
library(tseries)
jarque.bera.test(a$price)
jarque.bera.test(a$floors)
#curbele andrews
library(andrews)
andrews(a,clr=5,ymax=3)
View(a)
Y <- a[,2:12]
View(Y)
# CENTRAREA OBSERVATIILOR
centrare <- function(x) {(x - mean(x))}
Y.centrare <- apply(Y,2,centrare)
pairs(Y.centrare)
# STANDARDIZAREA OBSERVATIILOR
standardizare <- function(x) {(x - mean(x))/sd(x)} # centrarea observatiilor
Y.standardizare <- apply(Y,2,standardizare)
pairs(Y.standardizare)
# MATRICEA DE COVARIANTA
Y.cov <- cov(Y.standardizare)
View(Y.cov)
# MATRICEA DE CORELATIE
Y.cor <- cor(Y.standardizare)
View(Y.cor)
pairs(CP)
cor(CP)
summary(pca)
cor(scoruri)
pairs(scoruri)
# matricea factor
omega <- cor(Y.standardizare,scoruri)
omega
# analiza factoriala
factanal(pca, 3, covmat = Y.cov, n.obs = 26,
subset, na.action, start = NULL,
scores = c("none", "regression", "Bartlett"),
rotation = "none", control = "rotate")
# rotatia
varimax(omega, normalize = TRUE, eps = 1e-5)
promax(omega, m = 3)