-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
59 lines (59 loc) · 2.1 KB
/
.Rhistory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
help("plot")
help("barplot")
chooseCRANmirror()
utils:::menuInstallPkgs()
local({pkg <- select.list(sort(.packages(all.available = TRUE)),graphics=TRUE)
if(nchar(pkg)) library(pkg, character.only=TRUE)})
setRepositories()
utils:::menuInstallPkgs()
setRepositories()
utils:::menuInstallPkgs()
library("sn")
q()
library("sn")
setwd("C:/Users/Fabri/Documents/Documentos/PhD/Papers/EnProceso/Metodos/RealCase/CSV/")
fit<-matrix(data = NA, nrow = 0, ncol = 8, byrow = TRUE, dimnames = NULL)
for(i in 1:length(dir("Features/",pattern="P12_Integracion_Retrieval_Features_red_trial")))
{
file<-paste("Features/P12_Integracion_Retrieval_Features_red_trial",i,".csv",sep ="")
mydata = read.csv(file,sep=",",col.names=1:513)
if(mean(mydata[,"X1"])>0.01 & mean(mydata[,"X2"])>0.01)
{
m3=selm(cbind(X1,X2)~1,family="SN",data=mydata,method="MLE")
fit<-rbind(fit,cbind(t(coef(m3,"DP")),m3@logL))
}
else
{
fit<-rbind(fit,cbind(-999999,-999999,-999999,-999999,-999999,-999999,-999999,-999999))
}
}
write.table(fit, file = "skewNromalFitedData.csv",row.names=FALSE,na="",col.names=FALSE, sep=",")
q()
setRepositories()
utils:::menuInstallPkgs()
setRepositories()
utils:::menuInstallPkgs()
local({pkg <- select.list(sort(.packages(all.available = TRUE)),graphics=TRUE)
if(nchar(pkg)) library(pkg, character.only=TRUE)})
chooseCRANmirror()
setRepositories()
utils:::menuInstallPkgs()
utils:::menuInstallLocal()
utils:::menuInstallPkgs()
q()
# version 23112016
library("sn")
setwd("C:/Users/Fabri/Documents/Documentos/PhD/Papers/EnProceso/Metodos/FSKEW/")
file_fit<-paste("CSV/FitSize.csv",sep ="")
fit_size_csv = read.csv(file_fit,sep=",",header=FALSE)
fit_size=fit_size_csv[,1]
fit<-matrix(data = NA, nrow = 0, ncol = fit_size, byrow = TRUE, dimnames = NULL)
for(i in 1:length(dir("CSV/",pattern="Complete")))
{
file<-paste("CSV/Complete.csv",sep ="")
mydata = read.csv(file,sep=",",header=FALSE)
formula<-paste("cbind(",paste(names(mydata),collapse = ","),")~1")
m3=selm(formula,family="SN",data=mydata,method="MLE")
fit<-rbind(fit,cbind(t(coef(m3,"DP")),m3@logL))
}
write.table(fit, file = "skewNromalFitedData.csv",row.names=FALSE,na="",col.names=FALSE, sep=",")