Direkt zum Hauptbereich

Posts

Es werden Posts vom April, 2014 angezeigt.

Introduction to R: Ein unkommentiertes Skript

#Basic Commands x <- c(1,2,3,4,5) x x = c(5,3,9) x y = c(3,7,2) class(x) length(x) x+y z = x+y z ls() rm(z) ls() rm(list=ls()) ls() ?matrix x = matrix(data=c(1,2,3,4), nrow=2, ncol=2) x x = matrix(c(1:6), 2, 2) x matrix(c(1:6), 2, 2, byrow=TRUE) sqrt(x) x^2 x = rnorm(50) x x = rnorm(50) x set.seed(123) x = rnorm(50) x set.seed(123) x = rnorm(50) x y = x+rnorm(50, mean=50, sd=.1) cor(x,y) #Gaphics plot(x,y) plot(x,y, xlab="x-axis", ylab="y-axis", main="Plot of X vs Y") ?contour x = seq(-pi, pi, length=50) y=x f=outer(x,y, function(x,y) cos(y)/(1+x^2)) contour(x,y,f) contour(x,y,f, nlevels=45, add=T) fa = (f-t(f))/2 contour(x,y,fa,nlevels=15) image(x,y,fa) persp(x,y,fa) persp(x,y,fa, theta=30) #Indexing Data A = matrix(1:16,4,4) A A[2,3] A[c(1,3),c(2:4)] A[2,] A[,2] A[,1:2] A[-3,] dim(A) A = A[-4,] dim(A) dim(A)[1] #Loading Data and Plotting gallup = read.csv("http://www

Data Mining für SozialwissenschaftlerInnen / Übersicht

Universität Siegen  Dozent: PD Dr. Simon Hegelich http://politicaldatascience.blogspot.de/ SoSe 2014, Termin: Mo. 10:00-12:00, Raum: WS A 001 Datum Thema 28.04. Einführung/Organisatorisches 05.05. R-Basics 12.05. Know Your Data! 19.05. Linear Regression 26.05. Cross-Validation 02.06. LASSO: Penalty-Based Variable Selection 16.06. Logistic Regression 23.06. K-Means-Clustering 30.06. Text-Mining 07.07. Mining for Data 14.07. Abschlusssitzung Empfohlene Literatur: Ledolter, Johannes. 2013. Business analytics and data mining with R. Hoboken, New Jersey: Wiley. James, Gareth; Witten, Daniela; Hastie, Trevor und Robert Tibshirani. 2013. An introduction to statistical learning. New York [u.a.]: Springer. Hastie, Trevor; Tibshirani, Robert und Jerome Friedman. 2009. The Elements of Statistical L