S-PLUS Lecture 3 Jaeyong Lee.

Slides:



Advertisements
Similar presentations
S-PLUS Lecture 4 Jaeyong Lee Pennsylvania State University.
Advertisements

= the matrix for T relative to the standard basis is a basis for R 2. B is the matrix for T relative to To find B, complete:
Luminosity measurements at Hadron Colliders
From Word Embeddings To Document Distances
HF NOISE FILTERS PERFORMANCE
CS284 Paper Presentation Arpad Kovacs
داده کاوی سئوالات نمونه
FLUORECENCE MICROSCOPY SUPERRESOLUTION BLINK MICROSCOPY ON THE BASIS OF ENGINEERED DARK STATES* *Christian Steinhauer, Carsten Forthmann, Jan Vogelsang,
On Robust Neighbor Discovery in Mobile Wireless Networks
Chapter 6 并发:死锁和饥饿 Operating Systems: Internals and Design Principles
Ch48 Statistics by Chtan FYHSKulai
NV centers in diamond: from quantum coherence to nanoscale MRI
Topic 1 Applications of Physics
Small-Sample Methods for Cluster-Robust Inference in School-Based Experiments James E. Pustejovsky UT Austin Educational Psychology Department Quantitative.
Multidimensional Poverty Measurement
Hodgkin-Huxley David Wallace Croft, M.Sc. Atzori Lab, U.T. Dallas
Emmanuel Mouche, Marie Alice Harel (LSCE)
Wednesday 9/6 Welcome back!
Conformational Sampling to Interpret SAXS Profiles
Hold and Sign: A Novel Behavioral Biometrics for Smartphone User Authentication Presented by: Dhruva Kumar Srinivasa Team-mate: Nagadeesh Nagaraja.
Disease Diagnostics Data Analysis
Rural Investment and Policy Analysis (RIAPA) Modeling Toolkit
APPLIED FLUID MECHANICS
DISTRIBUTIONAL SEMANTICS
Varun Kelkar Mentors: Eric Quintero and Rana Adhikari
Financing the SDGs in the Pacific
Intro to Electricity and circuits pg. 47
IPM Simulations at Fermilab
How Much Should a Corporation Borrow?
Physics 7E Prof. D. Casper.
Biomechanics of Vertical Jump
Black Holes Black Holes Black Holes Black Holes Black Holes
ME 475/675 Introduction to Combustion
Digital Filtering Convolution of time series
Radar Sources Researched by Islam Ayman
Naval Center for Cost Analysis (NCCA) Jake Mender and Ann Hawpe
Undulator based e+ source
Warm-Up: March 4, 2016 Find the exact value of cos sin −1 − 4 5.
Information Management course
CMS Electromagnetic Calorimeter and V-V fusion processes detection (general aspects of my research activity and status of my thesis) I.N.F.N. Turin.
Creative Integration of Inter-Professional Experiences Into Medical Student Community Projects: The Wisconsin Academy for Rural Medicine (WARM) Experience.
Voltage-mode/Current-mode vs D-CAP2™/D-CAP3™ Masashi Nogawa
Ethernet transport protocols for FPGA
CPIXTEG3b: An SOI pixel sensor with in-pixel binary counter
Properties of Materials Electrical Properties
TEACHING STATISTICS Using the EL-W535HT.
Superconducting Microwave Dirac Billiards: From Graphene to Fullerene
Renee Anderson and Nicole Ross
Math 3 Calculus Tommy Khoo Department of Mathematics Dartmouth College
Important Terms computers interconnected by communication network
Modeling of mismatch losses due to partial shading in PV plants with custom modules Gianluca Corbellini
Radioactivity in everyday life
Measurement of formation cross-sections and decay properties for short-lived isomers produced in photonuclear interactions Justin Delaney | CSIRO & University.
Probability and Statistics
Georgina Hall Princeton, ORFE Joint work with Amir Ali Ahmadi
Outline Overview Shiny Tools & Statistical Methods Q/A.
Improving WASH for urban settings under stress of migrants
A New Test Rig for Simulation of Piston Ring Friction
Active Learning Lecture Slides
Linear Algebra review (optional)
Naomi Altman Department of Statistics (Based on notes by J. Lee)
Introduction to Matrices
CSCI N207 Data Analysis Using Spreadsheet
Multidimensional Arrays
Chapter2 Creating Arrays
Multidimensional array
Dr Tripty Singh Arrays.
Linear Algebra review (optional)
General Computer Science for Engineers CISC 106 Lecture 11
Announcements.
Presentation transcript:

S-PLUS Lecture 3 Jaeyong Lee

Factors A factor and a category are special types of vector, normally used to hold a categorical variable in many statistical functions. Category is deprecated. Factor has a class attribute, hence it is adapted to generic function mechanism.

Session: Factors citizen <- c(“uk”, “us”, “no”,”au”,”uk”,”us”, “us”,”no”,”au”) citizenf <- factor(citizen) attributes(citizenf) unclass(citizenf) # This is the same as category(citizen) table(citizenf) citizeno <- ordered(citizen, levels=“us”,”au”,”no”,”uk”) ordered(cut(geyser$duration, breaks=0:6),levels=1:6) income <- c(10, 20, 15, 12, 17, 13, 22, 9,14) tapply(income, citizenf, mean)

Arrays A matrix is a two dimensional collection of data and an array is a generalization of matrix. A dimension vector of an array is an attribute of the array representing the dimension. S arrays use column-major order: the first index moves fastest, and the last slowest.

Session: Arrays 1 z <- 1:150 a <- array(z,dim=c(3,5,10)) dim(z) <- c(3,5,10) z[1,1,1] z[2,1,1] matrix(1:6,nrow=2,ncol=3) z <- matrix(1:6,nrow=2, ncol=3, byrow=T) z[1,] z[,2]

Session: Arrays 2 x <- matrix(0,nc=5,nr=5); x i <- matrix(1:5,5,2); i x[i] <- 1; x matrix(1:6, 3, 2)*matrix(1:6*2, 3, 2) X <- matrix(1:6,3,2) y <- 1:3 t(X) %*% y

Session: Array 3 A <- matrix(c(1,1,2,3),2,2) b <- c(2,5) solve(A,b) diag(rep(1,2)) solve(A,diag(rep(1,2))) A[2, ] <- c(2,7) chol(A) t(chol(A)) %*% chol(A)

Session: Array 4 eg <- eigen(A) eg$values eg$vectors t(eg$vectors) %*% diag(eg$values) %*% eg$vectors X <- matrix(1:6,3,2) s <- svd(X) s s$u %*% diag(s$d) %*% t(s$v)