Statistics - PowerPoint PPT Presentation

About This Presentation
Title:

Statistics

Description:

In this example, correlation drops off with the number ofd steps between sites.c ... Samples within a group (block, site) are equally correlated with each other. ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 25
Provided by: mariau
Learn more at: http://www.sortie-nd.org
Category:

less

Transcript and Presenter's Notes

Title: Statistics


1
Statisticsrevisited
2
Standard statistics revisited
Bolker
3
Standard statistics revisitedSimple Variance
Structures
4
Standard statistics revisited
5
General linear models
  • Predictions are a linear function of a set of
    parameters.
  • Includes
  • Linear models
  • ANOVA
  • ANCOVA
  • Assumptions
  • Normally distributed, independent errors
  • Constant variance
  • Not to be confused with generalized linear
    models!
  • Distinction between factors and covariates.

6
Linear regression
Standard R code gtlm.reglt-lm(YX) gtsummary(lm) gta
nova(lm.reg)
Likelihood R code gtlmfunlt-function(a, b,
sigma) Y.predlt-abx -sum(dnorm(Y,
meanY.pred, sdsigma, logTRUE))
7
Analysis of variance (ANOVA)
Standard R code gtlm.onewayaovlt-lm(Yf1) gtsummary
(lm.aov) gtanova(lm.aov) will give you an ANOVA
table
Likelihood R code gtaovfunlt-function(a11, a12,
sigma) Y.predlt-c(a11,a12) -sum(dnorm(DBH,
meanY.pred, sdsigma, logTRUE))
8
Analysis of covariance (ANCOVA)
Standard R code gtlm.anclt-lm(YfX) gtsummary(lm.a
nc) gtstr(summary(lm.anc))
Likelihood R code gtancfunlt-function(a11, a12,
slope1, slope2, sigma) Y.predlt-c(a11,a12)f
c(slope1, slope2)fX -sum(dnorm(Y,
meanY.pred, sdsigma, logTRUE))
9
Standard statistics revisited
10
Nonlinearlity Non-linear least squares
Uses numerical methods similar to those use in
likelihood
Standard R code gtnls(yaxb,
startlist(a1,b1) gtsummary(nls) gtstr(summary(lns
))
Likelihood R code gtnlsfunlt-function(a, b,
sigma) Y.predlt-axb -sum(dnorm(Y,
meanY.pred, sdsigma, logTRUE))
11
Standard statistics revisited
12
Generalized linear models
  • Assumptions
  • Non-normal distributed errors ( but still
    independent and only certain kinds of
    non-normality)
  • Non-linear relationships are allowed but only if
    they have a linearizing transformation (the link
    function).
  • Linearizing transformations
  • Non-normal distributed errors ( but still
    independent and only certain kinds of
    non-normality). These include the exponential
    family and are typically used with a specific
    linearizing function.
  • Poisson loglink
  • Binomial logit transfomation
  • Gamma inverse Gaussian
  • Fit by iteratively reweighed least square
    methods estimate variance associated with each
    point for each estimate of parameter(s).
  • Not to be confused with general linear models!

13
GML Poisson regression
Standard R code gtglm.poislt-glm(YX,
familypoisson) gtsummary(gml.pois)
Likelihood R code gtpoisregfunfunction(a,b) Y.
predlt-exp(abX) -sum(dpois(Y, lambdaY.pred,
logTRUE))
14
GML Logistic regression
Standard R code gtglm2lt-glm(yx,
familybinomial) gtsummary(gml2)
Likelihood R code gtlogregfunfunction(a,b,N) p
.predlt-exp(a bX))/(1exp(a
bX)) -sum(dbinom(Y, sizeN, probp.pred,
logTRUE))
15
Standard statistics revisited
16
Generalized (non)linear least-squares
modelsVariance changes with a covariate or
among groups
Standard R code gtglslt-gls(y1,weightsvarIdent(f
orm1f) gtsummary(gls)
Likelihood R code gtvardifffunfunction(a,
sd1,sd2) sdvallt-c(sd1,sd2)f -sum(dbinom(Y,
meana, sdsdval, logTRUE)
17
Standard statistics revisited Complex Variance
Structures
18
Complex error structures
  • Error structures are not independent
  • Complex likelihood functions
  • Includes
  • Time series analysis
  • Spatial correlation
  • Repeated measures analysis

Variance-covariance matrix
x
x
Vector of means (pred)
Vector of data
19
Complex error structures
(x
x
Increasing variance
General case
Independent
20
Complex error structures
  • Variance/covariance matrix is symmetric so we
    need to specify at most n(n-1)/2 parameters.
  • V/C matrix must also be positive definite
    (logical), this translates to having a positive
    eigenvalue or positive diagonal values.
  • Select elements of matrix that define the error
    structure and ensure positive definite.
  • In this example, correlation drops off with the
    number ofd steps between sites.c

21
Complex error structures An exampleSpatially-cor
related errors
R code gtrho0.5 gtmmatrix(nrow5,
ncol5) gtmlt-rho(abs(row(m)-col(m))
OR gtmabs(row(m)-col(m))1rho mvliklt-functi
on(a,b, rho) pred.radabdbh nlength(radius
) mdiag(n) generates diag matrix of n rows, n
columns mabs(row(m)-col(m))1rho
-dmvnorm(radius, pred.rad, Sigmam, logTRUE)
mle(mvlik, startlist(a0.5, b3,rho0.5),
method"L-BFGS-B", lower0.001)
22
Mixed models Generalized linear mixed models
(GLMM)
  • Samples within a group (block, site) are equally
    correlated with each other.
  • Fixed effects effects of covariates
  • Random effects block, site etc.
  • GLMMs are generalized linear models with random
    effects

23
Complex variance structures
  • So how do you incorporate all potential sources
    of variance?
  • Block effects
  • Individual effects (repeated measures includes
    both individual and temporal correlation)
  • Measurement vs. process error
  • ..

24
Bolker
Write a Comment
User Comments (0)
About PowerShow.com