R

Saturday, October 27, 2007

Descriptive Statistics

min(x)
max(x)
median(x)
quantile(x)
summary(x)

mean(x)
var(x)
sd(x)

quantile(x, probs=c(0,0.1,0.9), na.rm=T)
range(x, na.rm=T)
IQR(x)

pmax(x,y,z), pmin(x,y,z) # returns minimum for each i
mean(x, trim=0.2, na.rm=T) # trim 20% from each end

# "hills" is a data.frame
summary(trees)pairs(trees)
options(digits=3)cor(trees)cor(log(trees))
Posted by cahn at 5:08 PM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2010 (2)
    • ►  December (1)
    • ►  May (1)
  • ►  2009 (10)
    • ►  October (2)
    • ►  August (1)
    • ►  July (1)
    • ►  April (3)
    • ►  March (3)
  • ►  2008 (2)
    • ►  December (2)
  • ▼  2007 (25)
    • ▼  October (25)
      • Mixed Models - longitudinal data
      • Mixed Models - random coefficient models
      • Mixed Models - RCBD
      • Structural Equation Model
      • Collapse table and calculate p-value by Monte Caro...
      • Mortgage
      • apply, sapply, tapply
      • Generalized Linear Mixed Models
      • Survival Data Analysis
      • Nonparametric Regression
      • sample()
      • Read and Manupulate Data
      • Vector
      • Linear Models
      • Matrix, Array and List
      • Categorical Data Analysis
      • Logistic Regression
      • Nonlinear Models
      • Comparing endpoints
      • Graphics
      • Making Functions
      • Iteration
      • Descriptive Statistics
      • Statistical & Mathematical functions
      • Introduction

About Me

My photo
cahn
View my complete profile