1 Stat 8053, Fall 2011: GLMMs

Size: px
Start display at page:

Download "1 Stat 8053, Fall 2011: GLMMs"

Transcription

1 Stat 805, Fall 0: GLMMs The data come from a 988 fertility survey in Bangladesh. Data were collected on 94 women grouped into 60 districts. The response of interest is whether or not the woman is using contraceptives at the time of the survey. Predictors include age, number of existing children, and whether the district is urban or rural. > url <- " > data <- read.csv(url) > data$nchild <- factor(data$nchild) > data$area <- factor(data$area) > data$cage <- data$age - mean(data$age) > require(car) > library(effects) > require(lme4) > print(xyplot( ~ Age Nchild *, data, type = c("g", + "r", "smooth", "p"))) 0 Yes No 0 Yes No Age The package effects must be loaded before lme4 because of a problem in lme4. The function xyplot is from the lattice package. When used with Sweave, as I have done here, you need to enclose xyplot by a print statement. This is also required on the plot method for effects, used below, because this function also uses the lattice package. GLM fit(s) > m <- glm( ~ (Nchild + poly(cage,, raw = TRUE) + )^, + data = data, family = binomial) > Anova(m) Analysis of Deviance Table (Type II tests)

2 Response: LR Chisq Df Pr(>Chisq) Nchild.0.78e-07 poly(cage,, raw = TRUE) e e- Nchild:poly(Cage,, raw = TRUE) Nchild: poly(cage,, raw = TRUE): > Anova(m <- update(m, ~Nchild * poly(cage,, raw = TRUE) + + )) Analysis of Deviance Table (Type II tests) Response: LR Chisq Df Pr(>Chisq) Nchild e-07 poly(cage,, raw = TRUE) e e- Nchild:poly(Cage,, raw = TRUE) > print(plot(effect("nchild*poly(cage,, raw=true)", m), multiline = TRUE, + type = "link")) Nchild*Cage effect plot 0 Nchild Cage > data$kids <- factor(ifelse(data$nchild == 0, "n", "y")) > m <- update(m, ~kids * poly(cage,, raw = TRUE) + ) > print(plot(effect("kids*poly(cage,, raw=true)", m), multiline = TRUE, + type = "link")) > Anova(m)

3 Analysis of Deviance Table (Type II tests) Response: LR Chisq Df Pr(>Chisq) kids e-09 poly(cage,, raw = TRUE) e e- kids:poly(cage,, raw = TRUE) kids*cage effect plot n y kids Cage GLMM fit > g <- lmer( ~ kids * poly(cage,, raw = TRUE) ( Area), data = data, family = binomial) > Anova(g) Analysis of Deviance Table (Type II tests) Response: Chisq Df Pr(>Chisq) kids e-08 poly(cage,, raw = TRUE) e e-09 kids:poly(cage,, raw = TRUE) > print(plot(effect("kids:poly(cage,, raw=true)", g), multiline = TRUE, + type = "link"))

4 kids*cage effect plot n y kids Cage Coefficients > comparecoefs(m, g) Call: :glm(formula = ~ kids + poly(cage,, raw = TRUE) + + kids:poly(cage,, raw = TRUE), family = binomial, data = data) :glmer(formula = ~ kids * poly(cage,, raw = TRUE) + + ( Area), data = data, family = binomial) Est. SE Est. SE (Intercept) kidsy poly(cage,, raw = TRUE) poly(cage,, raw = TRUE) kidsy:poly(cage,, raw = TRUE) kidsy:poly(cage,, raw = TRUE) > exp(fixef(g)) (Intercept) kidsy poly(cage,, raw = TRUE) poly(cage,, raw = TRUE) kidsy:poly(cage,, raw = TRUE) kidsy:poly(cage,, raw = TRUE)

5 Random effects > str(ranef(g)) List of $ Area:'data.frame': 60 obs. of variable:..$ (Intercept): num [:60] attr(*, "class")= chr "ranef.mer" > par(mfrow = c(, )) > plot(density(ff <- ranef(g)$area[, ]), main = "Density of Area effects", + ylim = c(0,.), lwd = ) > xx <- seq(-.5,.5, length = 00) > lines(mean(ff) + sd(ff) * xx, dnorm(xx)/sd(ff)) > qqnorm(ff, main = "QQ-plot of random effects") > qqline(ff) Density of Area effects QQ plot of random effects Density Sample Quantiles N = 60 Bandwidth = 0.49 Theoretical Quantiles > print(g <- update(g, ~. - ( Area) + ( - Area)), + corr = FALSE) Generalized linear mixed model fit by the Laplace approximation Formula: ~ kids + poly(cage,, raw = TRUE) + + ( - Data: data AIC BIC loglik deviance Random effects: Groups Name Variance Std.Dev. Corr Area Number of obs: 94, groups: Area, 60 Area) + k 5

6 Fixed effects: Estimate Std. Error z value Pr(> z ) (Intercept) e-09 kidsy e-08 poly(cage,, raw = TRUE) poly(cage,, raw = TRUE) e-07 kidsy:poly(cage,, raw = TRUE) kidsy:poly(cage,, raw = TRUE) > anova(g, g, text = "Chisq") Data: data Models: g: ~ kids * poly(cage,, raw = TRUE) + + ( Area) g: ~ kids + poly(cage,, raw = TRUE) + + ( - g: Area) + kids:poly(cage,, raw = TRUE) Df AIC BIC loglik Chisq Chi Df Pr(>Chisq) g g

Step 1: Load the appropriate R package. Step 2: Fit a separate mixed model for each independence claim in the basis set.

Step 1: Load the appropriate R package. Step 2: Fit a separate mixed model for each independence claim in the basis set. Step 1: Load the appropriate R package. You will need two libraries: nlme and lme4. Step 2: Fit a separate mixed model for each independence claim in the basis set. For instance, in Table 2 the first basis

More information

Let us assume that we are measuring the yield of a crop plant on 5 different plots at 4 different observation times.

Let us assume that we are measuring the yield of a crop plant on 5 different plots at 4 different observation times. Mixed-effects models An introduction by Christoph Scherber Up to now, we have been dealing with linear models of the form where ß0 and ß1 are parameters of fixed value. Example: Let us assume that we are

More information

Generalized Multilevel Regression Example for a Binary Outcome

Generalized Multilevel Regression Example for a Binary Outcome Psy 510/610 Multilevel Regression, Spring 2017 1 HLM Generalized Multilevel Regression Example for a Binary Outcome Specifications for this Bernoulli HLM2 run Problem Title: no title The data source for

More information

Negative Binomial Model for Count Data Log-linear Models for Contingency Tables - Introduction

Negative Binomial Model for Count Data Log-linear Models for Contingency Tables - Introduction Negative Binomial Model for Count Data Log-linear Models for Contingency Tables - Introduction Statistics 149 Spring 2006 Copyright 2006 by Mark E. Irwin Negative Binomial Family Example: Absenteeism from

More information

EXST7015: Multiple Regression from Snedecor & Cochran (1967) RAW DATA LISTING

EXST7015: Multiple Regression from Snedecor & Cochran (1967) RAW DATA LISTING Multiple (Linear) Regression Introductory example Page 1 1 options ps=256 ls=132 nocenter nodate nonumber; 3 DATA ONE; 4 TITLE1 ''; 5 INPUT X1 X2 X3 Y; 6 **** LABEL Y ='Plant available phosphorus' 7 X1='Inorganic

More information

book 2014/5/6 15:21 page 261 #285

book 2014/5/6 15:21 page 261 #285 book 2014/5/6 15:21 page 261 #285 Chapter 10 Simulation Simulations provide a powerful way to answer questions and explore properties of statistical estimators and procedures. In this chapter, we will

More information

Multiple Regression and Logistic Regression II. Dajiang 525 Apr

Multiple Regression and Logistic Regression II. Dajiang 525 Apr Multiple Regression and Logistic Regression II Dajiang Liu @PHS 525 Apr-19-2016 Materials from Last Time Multiple regression model: Include multiple predictors in the model = + + + + How to interpret the

More information

Chapter 10 Exercises 1. The final two sentences of Exercise 1 are challenging! Exercises 1 & 2 should be asterisked.

Chapter 10 Exercises 1. The final two sentences of Exercise 1 are challenging! Exercises 1 & 2 should be asterisked. Chapter 10 Exercises 1 Data Analysis & Graphics Using R, 3 rd edn Solutions to Exercises (May 1, 2010) Preliminaries > library(lme4) > library(daag) The final two sentences of Exercise 1 are challenging!

More information

Random Effects ANOVA

Random Effects ANOVA Random Effects ANOVA Grant B. Morgan Baylor University This post contains code for conducting a random effects ANOVA. Make sure the following packages are installed: foreign, lme4, lsr, lattice. library(foreign)

More information

Parameter Estimation

Parameter Estimation Parameter Estimation Bret Larget Departments of Botany and of Statistics University of Wisconsin Madison April 12, 2007 Statistics 572 (Spring 2007) Parameter Estimation April 12, 2007 1 / 14 Continue

More information

Chapter 8 Exercises 1. Data Analysis & Graphics Using R Solutions to Exercises (May 1, 2010)

Chapter 8 Exercises 1. Data Analysis & Graphics Using R Solutions to Exercises (May 1, 2010) Chapter 8 Exercises 1 Data Analysis & Graphics Using R Solutions to Exercises (May 1, 2010) Preliminaries > library(daag) Exercise 1 The following table shows numbers of occasions when inhibition (i.e.,

More information

Projects for Bayesian Computation with R

Projects for Bayesian Computation with R Projects for Bayesian Computation with R Laura Vana & Kurt Hornik Winter Semeter 2018/2019 1 S&P Rating Data On the homepage of this course you can find a time series for Standard & Poors default data

More information

Intro to GLM Day 2: GLM and Maximum Likelihood

Intro to GLM Day 2: GLM and Maximum Likelihood Intro to GLM Day 2: GLM and Maximum Likelihood Federico Vegetti Central European University ECPR Summer School in Methods and Techniques 1 / 32 Generalized Linear Modeling 3 steps of GLM 1. Specify the

More information

Logistic Regression. Logistic Regression Theory

Logistic Regression. Logistic Regression Theory Logistic Regression Dr. J. Kyle Roberts Southern Methodist University Simmons School of Education and Human Development Department of Teaching and Learning Logistic Regression The linear probability model.

More information

Ordinal Multinomial Logistic Regression. Thom M. Suhy Southern Methodist University May14th, 2013

Ordinal Multinomial Logistic Regression. Thom M. Suhy Southern Methodist University May14th, 2013 Ordinal Multinomial Logistic Thom M. Suhy Southern Methodist University May14th, 2013 GLM Generalized Linear Model (GLM) Framework for statistical analysis (Gelman and Hill, 2007, p. 135) Linear Continuous

More information

Appendix. A.1 Independent Random Effects (Baseline)

Appendix. A.1 Independent Random Effects (Baseline) A Appendix A.1 Independent Random Effects (Baseline) 36 Table 2: Detailed Monte Carlo Results Logit Fixed Effects Clustered Random Effects Random Coefficients c Coeff. SE SD Coeff. SE SD Coeff. SE SD Coeff.

More information

The SAS System 11:03 Monday, November 11,

The SAS System 11:03 Monday, November 11, The SAS System 11:3 Monday, November 11, 213 1 The CONTENTS Procedure Data Set Name BIO.AUTO_PREMIUMS Observations 5 Member Type DATA Variables 3 Engine V9 Indexes Created Monday, November 11, 213 11:4:19

More information

Case Study: Applying Generalized Linear Models

Case Study: Applying Generalized Linear Models Case Study: Applying Generalized Linear Models Dr. Kempthorne May 12, 2016 Contents 1 Generalized Linear Models of Semi-Quantal Biological Assay Data 2 1.1 Coal miners Pneumoconiosis Data.................

More information

is the bandwidth and controls the level of smoothing of the estimator, n is the sample size and

is the bandwidth and controls the level of smoothing of the estimator, n is the sample size and Paper PH100 Relationship between Total charges and Reimbursements in Outpatient Visits Using SAS GLIMMIX Chakib Battioui, University of Louisville, Louisville, KY ABSTRACT The purpose of this paper is

More information

CREDIT RISK MODELING IN R. Logistic regression: introduction

CREDIT RISK MODELING IN R. Logistic regression: introduction CREDIT RISK MODELING IN R Logistic regression: introduction Final data structure > str(training_set) 'data.frame': 19394 obs. of 8 variables: $ loan_status : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1

More information

Maximum Likelihood Estimation

Maximum Likelihood Estimation Maximum Likelihood Estimation EPSY 905: Fundamentals of Multivariate Modeling Online Lecture #6 EPSY 905: Maximum Likelihood In This Lecture The basics of maximum likelihood estimation Ø The engine that

More information

############################ ### toxo.r ### ############################

############################ ### toxo.r ### ############################ ############################ ### toxo.r ### ############################ toxo < read.table(file="n:\\courses\\stat8620\\fall 08\\toxo.dat",header=T) #toxo < read.table(file="c:\\documents and Settings\\dhall\\My

More information

Mixed models in R using the lme4 package Part 3: Inference based on profiled deviance

Mixed models in R using the lme4 package Part 3: Inference based on profiled deviance Mixed models in R using the lme4 package Part 3: Inference based on profiled deviance Douglas Bates Department of Statistics University of Wisconsin - Madison Madison January 11, 2011

More information

Ordinal and categorical variables

Ordinal and categorical variables Ordinal and categorical variables Ben Bolker October 29, 2018 Licensed under the Creative Commons attribution-noncommercial license (http: //creativecommons.org/licenses/by-nc/3.0/). Please share & remix

More information

boxcox() returns the values of α and their loglikelihoods,

boxcox() returns the values of α and their loglikelihoods, Solutions to Selected Computer Lab Problems and Exercises in Chapter 11 of Statistics and Data Analysis for Financial Engineering, 2nd ed. by David Ruppert and David S. Matteson c 2016 David Ruppert and

More information

Generalized Linear Models

Generalized Linear Models Generalized Linear Models Scott Creel Wednesday, September 10, 2014 This exercise extends the prior material on using the lm() function to fit an OLS regression and test hypotheses about effects on a parameter.

More information

Introduction to General and Generalized Linear Models

Introduction to General and Generalized Linear Models Introduction to General and Generalized Linear Models Generalized Linear Models - IIIb Henrik Madsen March 18, 2012 Henrik Madsen () Chapman & Hall March 18, 2012 1 / 32 Examples Overdispersion and Offset!

More information

Stat 328, Summer 2005

Stat 328, Summer 2005 Stat 328, Summer 2005 Exam #2, 6/18/05 Name (print) UnivID I have neither given nor received any unauthorized aid in completing this exam. Signed Answer each question completely showing your work where

More information

Addiction - Multinomial Model

Addiction - Multinomial Model Addiction - Multinomial Model February 8, 2012 First the addiction data are loaded and attached. > library(catdata) > data(addiction) > attach(addiction) For the multinomial logit model the function multinom

More information

Stat 401XV Exam 3 Spring 2017

Stat 401XV Exam 3 Spring 2017 Stat 40XV Exam Spring 07 I have neither given nor received unauthorized assistance on this exam. Name Signed Date Name Printed ATTENTION! Incorrect numerical answers unaccompanied by supporting reasoning

More information

Multiple regression - a brief introduction

Multiple regression - a brief introduction Multiple regression - a brief introduction Multiple regression is an extension to regular (simple) regression. Instead of one X, we now have several. Suppose, for example, that you are trying to predict

More information

Joseph O. Marker Marker Actuarial Services, LLC and University of Michigan CLRS 2011 Meeting. J. Marker, LSMWP, CLRS 1

Joseph O. Marker Marker Actuarial Services, LLC and University of Michigan CLRS 2011 Meeting. J. Marker, LSMWP, CLRS 1 Joseph O. Marker Marker Actuarial Services, LLC and University of Michigan CLRS 2011 Meeting J. Marker, LSMWP, CLRS 1 Expected vs Actual Distribu3on Test distribu+ons of: Number of claims (frequency) Size

More information

ARIMA ANALYSIS WITH INTERVENTIONS / OUTLIERS

ARIMA ANALYSIS WITH INTERVENTIONS / OUTLIERS TASK Run intervention analysis on the price of stock M: model a function of the price as ARIMA with outliers and interventions. SOLUTION The document below is an abridged version of the solution provided

More information

Session 178 TS, Stats for Health Actuaries. Moderator: Ian G. Duncan, FSA, FCA, FCIA, FIA, MAAA. Presenter: Joan C. Barrett, FSA, MAAA

Session 178 TS, Stats for Health Actuaries. Moderator: Ian G. Duncan, FSA, FCA, FCIA, FIA, MAAA. Presenter: Joan C. Barrett, FSA, MAAA Session 178 TS, Stats for Health Actuaries Moderator: Ian G. Duncan, FSA, FCA, FCIA, FIA, MAAA Presenter: Joan C. Barrett, FSA, MAAA Session 178 Statistics for Health Actuaries October 14, 2015 Presented

More information

STA 4504/5503 Sample questions for exam True-False questions.

STA 4504/5503 Sample questions for exam True-False questions. STA 4504/5503 Sample questions for exam 2 1. True-False questions. (a) For General Social Survey data on Y = political ideology (categories liberal, moderate, conservative), X 1 = gender (1 = female, 0

More information

ORDERED MULTINOMIAL LOGISTIC REGRESSION ANALYSIS. Pooja Shivraj Southern Methodist University

ORDERED MULTINOMIAL LOGISTIC REGRESSION ANALYSIS. Pooja Shivraj Southern Methodist University ORDERED MULTINOMIAL LOGISTIC REGRESSION ANALYSIS Pooja Shivraj Southern Methodist University KINDS OF REGRESSION ANALYSES Linear Regression Logistic Regression Dichotomous dependent variable (yes/no, died/

More information

Subject CS1 Actuarial Statistics 1 Core Principles. Syllabus. for the 2019 exams. 1 June 2018

Subject CS1 Actuarial Statistics 1 Core Principles. Syllabus. for the 2019 exams. 1 June 2018 ` Subject CS1 Actuarial Statistics 1 Core Principles Syllabus for the 2019 exams 1 June 2018 Copyright in this Core Reading is the property of the Institute and Faculty of Actuaries who are the sole distributors.

More information

Logit Models for Binary Data

Logit Models for Binary Data Chapter 3 Logit Models for Binary Data We now turn our attention to regression models for dichotomous data, including logistic regression and probit analysis These models are appropriate when the response

More information

AIC = Log likelihood = BIC =

AIC = Log likelihood = BIC = - log: /mnt/ide1/home/sschulh1/apc/apc_examplelog log type: text opened on: 21 Jul 2006, 18:08:20 *replicate table 5 and cols 7-9 of table 3 in Yang, Fu and Land (2004) *Stata can maximize GLM objective

More information

Exam 2 Spring 2015 Statistics for Applications 4/9/2015

Exam 2 Spring 2015 Statistics for Applications 4/9/2015 18.443 Exam 2 Spring 2015 Statistics for Applications 4/9/2015 1. True or False (and state why). (a). The significance level of a statistical test is not equal to the probability that the null hypothesis

More information

*9-BES2_Logistic Regression - Social Economics & Public Policies Marcelo Neri

*9-BES2_Logistic Regression - Social Economics & Public Policies Marcelo Neri Econometric Techniques and Estimated Models *9 (continues in the website) This text details the different statistical techniques used in the analysis, such as logistic regression, applied to discrete variables

More information

SAS Simple Linear Regression Example

SAS Simple Linear Regression Example SAS Simple Linear Regression Example This handout gives examples of how to use SAS to generate a simple linear regression plot, check the correlation between two variables, fit a simple linear regression

More information

Duration Models: Parametric Models

Duration Models: Parametric Models Duration Models: Parametric Models Brad 1 1 Department of Political Science University of California, Davis January 28, 2011 Parametric Models Some Motivation for Parametrics Consider the hazard rate:

More information

The University of Chicago, Booth School of Business Business 41202, Spring Quarter 2013, Mr. Ruey S. Tsay. Final Exam

The University of Chicago, Booth School of Business Business 41202, Spring Quarter 2013, Mr. Ruey S. Tsay. Final Exam The University of Chicago, Booth School of Business Business 41202, Spring Quarter 2013, Mr. Ruey S. Tsay Final Exam Booth Honor Code: I pledge my honor that I have not violated the Honor Code during this

More information

> attach(grocery) > boxplot(sales~discount, ylab="sales",xlab="discount")

> attach(grocery) > boxplot(sales~discount, ylab=sales,xlab=discount) Example of More than 2 Categories, and Analysis of Covariance Example > attach(grocery) > boxplot(sales~discount, ylab="sales",xlab="discount") Sales 160 200 240 > tapply(sales,discount,mean) 10.00% 15.00%

More information

STK Lecture 7 finalizing clam size modelling and starting on pricing

STK Lecture 7 finalizing clam size modelling and starting on pricing STK 4540 Lecture 7 finalizing clam size modelling and starting on pricing Overview Important issues Models treated Curriculum Duration (in lectures) What is driving the result of a nonlife insurance company?

More information

Logistic Regression II

Logistic Regression II Logistic Regression II Michael Friendly Psych 6136 November 9, 2017 age*sex effect plot 0 10 20 30 40 50 1.00 sex Female sex : Female sex : Male Male 0.75 0.999 Survived 0.50 0.25 survived 0.990 0.950

More information

> budworm$samplogit < log((budworm$y+0.5)/(budworm$m budworm$y+0.5))

> budworm$samplogit < log((budworm$y+0.5)/(budworm$m budworm$y+0.5)) budworm < read.table(file="n:\\courses\\stat8620\\fall 08\\budworm.dat",header=T) #budworm < read.table(file="c:\\documents and Settings\\dhall\\My Documents\\Dan's Work Stuff\\courses\\STAT8620\\Fall

More information

Package ald. February 1, 2018

Package ald. February 1, 2018 Type Package Title The Asymmetric Laplace Distribution Version 1.2 Date 2018-01-31 Package ald February 1, 2018 Author Christian E. Galarza and Victor H. Lachos

More information

σ e, which will be large when prediction errors are Linear regression model

σ e, which will be large when prediction errors are Linear regression model Linear regression model we assume that two quantitative variables, x and y, are linearly related; that is, the population of (x, y) pairs are related by an ideal population regression line y = α + βx +

More information

Lecture Note: Analysis of Financial Time Series Spring 2017, Ruey S. Tsay

Lecture Note: Analysis of Financial Time Series Spring 2017, Ruey S. Tsay Lecture Note: Analysis of Financial Time Series Spring 2017, Ruey S. Tsay Seasonal Time Series: TS with periodic patterns and useful in predicting quarterly earnings pricing weather-related derivatives

More information

Package tailloss. August 29, 2016

Package tailloss. August 29, 2016 Package tailloss August 29, 2016 Title Estimate the Probability in the Upper Tail of the Aggregate Loss Distribution Set of tools to estimate the probability in the upper tail of the aggregate loss distribution

More information

Package cbinom. June 10, 2018

Package cbinom. June 10, 2018 Package cbinom June 10, 2018 Type Package Title Continuous Analog of a Binomial Distribution Version 1.1 Date 2018-06-09 Author Dan Dalthorp Maintainer Dan Dalthorp Description Implementation

More information

Web Appendix. Are the effects of monetary policy shocks big or small? Olivier Coibion

Web Appendix. Are the effects of monetary policy shocks big or small? Olivier Coibion Web Appendix Are the effects of monetary policy shocks big or small? Olivier Coibion Appendix 1: Description of the Model-Averaging Procedure This section describes the model-averaging procedure used in

More information

Statistical Models of Stocks and Bonds. Zachary D Easterling: Department of Economics. The University of Akron

Statistical Models of Stocks and Bonds. Zachary D Easterling: Department of Economics. The University of Akron Statistical Models of Stocks and Bonds Zachary D Easterling: Department of Economics The University of Akron Abstract One of the key ideas in monetary economics is that the prices of investments tend to

More information

proc genmod; model malform/total = alcohol / dist=bin link=identity obstats; title 'Table 2.7'; title2 'Identity Link';

proc genmod; model malform/total = alcohol / dist=bin link=identity obstats; title 'Table 2.7'; title2 'Identity Link'; BIOS 6244 Analysis of Categorical Data Assignment 5 s 1. Consider Exercise 4.4, p. 98. (i) Write the SAS code, including the DATA step, to fit the linear probability model and the logit model to the data

More information

Midterm Exam. b. What are the continuously compounded returns for the two stocks?

Midterm Exam. b. What are the continuously compounded returns for the two stocks? University of Washington Fall 004 Department of Economics Eric Zivot Economics 483 Midterm Exam This is a closed book and closed note exam. However, you are allowed one page of notes (double-sided). Answer

More information

Lecture 1: Empirical Properties of Returns

Lecture 1: Empirical Properties of Returns Lecture 1: Empirical Properties of Returns Econ 589 Eric Zivot Spring 2011 Updated: March 29, 2011 Daily CC Returns on MSFT -0.3 r(t) -0.2-0.1 0.1 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996

More information

Survey Sampling, Fall, 2006, Columbia University Homework assignments (2 Sept 2006)

Survey Sampling, Fall, 2006, Columbia University Homework assignments (2 Sept 2006) Survey Sampling, Fall, 2006, Columbia University Homework assignments (2 Sept 2006) Assignment 1, due lecture 3 at the beginning of class 1. Lohr 1.1 2. Lohr 1.2 3. Lohr 1.3 4. Download data from the CBS

More information

Occupancy models with detection error Peter Solymos and Subhash Lele July 16, 2016 Madison, WI NACCB Congress

Occupancy models with detection error Peter Solymos and Subhash Lele July 16, 2016 Madison, WI NACCB Congress Occupancy models with detection error Peter Solymos and Subhash Lele July 16, 2016 Madison, WI NACCB Congress Let us continue with the simple occupancy model we used previously. Most applied ecologists

More information

9. Logit and Probit Models For Dichotomous Data

9. Logit and Probit Models For Dichotomous Data Sociology 740 John Fox Lecture Notes 9. Logit and Probit Models For Dichotomous Data Copyright 2014 by John Fox Logit and Probit Models for Dichotomous Responses 1 1. Goals: I To show how models similar

More information

Actuarial Research on the Effectiveness of Collision Avoidance Systems FCW & LDW. A translation from Hebrew to English of a research paper prepared by

Actuarial Research on the Effectiveness of Collision Avoidance Systems FCW & LDW. A translation from Hebrew to English of a research paper prepared by Actuarial Research on the Effectiveness of Collision Avoidance Systems FCW & LDW A translation from Hebrew to English of a research paper prepared by Ron Actuarial Intelligence LTD Contact Details: Shachar

More information

The FREQ Procedure. Table of Sex by Gym Sex(Sex) Gym(Gym) No Yes Total Male Female Total

The FREQ Procedure. Table of Sex by Gym Sex(Sex) Gym(Gym) No Yes Total Male Female Total Jenn Selensky gathered data from students in an introduction to psychology course. The data are weights, sex/gender, and whether or not the student worked-out in the gym. Here is the output from a 2 x

More information

Loss Simulation Model Testing and Enhancement

Loss Simulation Model Testing and Enhancement Loss Simulation Model Testing and Enhancement Casualty Loss Reserve Seminar By Kailan Shang Sept. 2011 Agenda Research Overview Model Testing Real Data Model Enhancement Further Development Enterprise

More information

Bradley-Terry Models. Stat 557 Heike Hofmann

Bradley-Terry Models. Stat 557 Heike Hofmann Bradley-Terry Models Stat 557 Heike Hofmann Outline Definition: Bradley-Terry Fitting the model Extension: Order Effects Extension: Ordinal & Nominal Response Repeated Measures Bradley-Terry Model (1952)

More information

[BINARY DEPENDENT VARIABLE ESTIMATION WITH STATA]

[BINARY DEPENDENT VARIABLE ESTIMATION WITH STATA] Tutorial #3 This example uses data in the file 16.09.2011.dta under Tutorial folder. It contains 753 observations from a sample PSID data on the labor force status of married women in the U.S in 1975.

More information

Model fit assessment via marginal model plots

Model fit assessment via marginal model plots The Stata Journal (2010) 10, Number 2, pp. 215 225 Model fit assessment via marginal model plots Charles Lindsey Texas A & M University Department of Statistics College Station, TX lindseyc@stat.tamu.edu

More information

Models of Patterns. Lecture 3, SMMD 2005 Bob Stine

Models of Patterns. Lecture 3, SMMD 2005 Bob Stine Models of Patterns Lecture 3, SMMD 2005 Bob Stine Review Speculative investing and portfolios Risk and variance Volatility adjusted return Volatility drag Dependence Covariance Review Example Stock and

More information

Sampling Distributions

Sampling Distributions Sampling Distributions This is an important chapter; it is the bridge from probability and descriptive statistics that we studied in Chapters 3 through 7 to inferential statistics which forms the latter

More information

Application of statistical methods in the determination of health loss distribution and health claims behaviour

Application of statistical methods in the determination of health loss distribution and health claims behaviour Mathematical Statistics Stockholm University Application of statistical methods in the determination of health loss distribution and health claims behaviour Vasileios Keisoglou Examensarbete 2005:8 Postal

More information

Longitudinal Modeling of Insurance Company Expenses

Longitudinal Modeling of Insurance Company Expenses Longitudinal of Insurance Company Expenses Peng Shi University of Wisconsin-Madison joint work with Edward W. (Jed) Frees - University of Wisconsin-Madison July 31, 1 / 20 I. : Motivation and Objective

More information

Modeling Panel Data: Choosing the Correct Strategy. Roberto G. Gutierrez

Modeling Panel Data: Choosing the Correct Strategy. Roberto G. Gutierrez Modeling Panel Data: Choosing the Correct Strategy Roberto G. Gutierrez 2 / 25 #analyticsx Overview Panel data are ubiquitous in not only economics, but in all fields Panel data have intrinsic modeling

More information

SUPPLEMENTARY ONLINE APPENDIX FOR: TECHNOLOGY AND COLLECTIVE ACTION: THE EFFECT OF CELL PHONE COVERAGE ON POLITICAL VIOLENCE IN AFRICA

SUPPLEMENTARY ONLINE APPENDIX FOR: TECHNOLOGY AND COLLECTIVE ACTION: THE EFFECT OF CELL PHONE COVERAGE ON POLITICAL VIOLENCE IN AFRICA SUPPLEMENTARY ONLINE APPENDIX FOR: TECHNOLOGY AND COLLECTIVE ACTION: THE EFFECT OF CELL PHONE COVERAGE ON POLITICAL VIOLENCE IN AFRICA 1. CELL PHONES AND PROTEST The Afrobarometer survey asks whether respondents

More information

Logit Analysis. Using vttown.dta. Albert Satorra, UPF

Logit Analysis. Using vttown.dta. Albert Satorra, UPF Logit Analysis Using vttown.dta Logit Regression Odds ratio The most common way of interpreting a logit is to convert it to an odds ratio using the exp() function. One can convert back using the ln()

More information

Lecture Note: Analysis of Financial Time Series Spring 2008, Ruey S. Tsay. Seasonal Time Series: TS with periodic patterns and useful in

Lecture Note: Analysis of Financial Time Series Spring 2008, Ruey S. Tsay. Seasonal Time Series: TS with periodic patterns and useful in Lecture Note: Analysis of Financial Time Series Spring 2008, Ruey S. Tsay Seasonal Time Series: TS with periodic patterns and useful in predicting quarterly earnings pricing weather-related derivatives

More information

Quantile Regression due to Skewness. and Outliers

Quantile Regression due to Skewness. and Outliers Applied Mathematical Sciences, Vol. 5, 2011, no. 39, 1947-1951 Quantile Regression due to Skewness and Outliers Neda Jalali and Manoochehr Babanezhad Department of Statistics Faculty of Sciences Golestan

More information

9. Appendixes. Page 73 of 95

9. Appendixes. Page 73 of 95 9. Appendixes Appendix A: Construction cost... 74 Appendix B: Cost of capital... 75 Appendix B.1: Beta... 75 Appendix B.2: Cost of equity... 77 Appendix C: Geometric Brownian motion... 78 Appendix D: Static

More information

4. GLIM for data with constant coefficient of variation

4. GLIM for data with constant coefficient of variation 4. GLIM for data with constant coefficient of variation 4.1. Data with constant coefficient of variation and some simple models Coefficient of variation The coefficient of variation of a random variable

More information

R is a collaborative project with many contributors. Type contributors() for more information.

R is a collaborative project with many contributors. Type contributors() for more information. R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type license() or licence() for distribution details. R is a collaborative project

More information

Introduction to Computational Finance and Financial Econometrics Descriptive Statistics

Introduction to Computational Finance and Financial Econometrics Descriptive Statistics You can t see this text! Introduction to Computational Finance and Financial Econometrics Descriptive Statistics Eric Zivot Summer 2015 Eric Zivot (Copyright 2015) Descriptive Statistics 1 / 28 Outline

More information

Graduate School of Business, University of Chicago Business 41202, Spring Quarter 2007, Mr. Ruey S. Tsay. Final Exam

Graduate School of Business, University of Chicago Business 41202, Spring Quarter 2007, Mr. Ruey S. Tsay. Final Exam Graduate School of Business, University of Chicago Business 41202, Spring Quarter 2007, Mr. Ruey S. Tsay Final Exam GSB Honor Code: I pledge my honor that I have not violated the Honor Code during this

More information

Two-stage least squares examples. Angrist: Vietnam Draft Lottery Men, Cohorts. Vietnam era service

Two-stage least squares examples. Angrist: Vietnam Draft Lottery Men, Cohorts. Vietnam era service Two-stage least squares examples Angrist: Vietnam Draft Lottery 1 2 Vietnam era service 1980 Men, 1940-1952 Cohorts Defined as 1964-1975 Estimated 8.7 million served during era 3.4 million were in SE Asia

More information

GLM III - The Matrix Reloaded

GLM III - The Matrix Reloaded GLM III - The Matrix Reloaded Duncan Anderson, Serhat Guven 12 March 2013 2012 Towers Watson. All rights reserved. Agenda "Quadrant Saddles" The Tweedie Distribution "Emergent Interactions" Dispersion

More information

An Introduction to Bayesian Inference and MCMC Methods for Capture-Recapture

An Introduction to Bayesian Inference and MCMC Methods for Capture-Recapture An Introduction to Bayesian Inference and MCMC Methods for Capture-Recapture Trinity River Restoration Program Workshop on Outmigration: Population Estimation October 6 8, 2009 An Introduction to Bayesian

More information

Multiple Regression. Review of Regression with One Predictor

Multiple Regression. Review of Regression with One Predictor Fall Semester, 2001 Statistics 621 Lecture 4 Robert Stine 1 Preliminaries Multiple Regression Grading on this and other assignments Assignment will get placed in folder of first member of Learning Team.

More information

Generalized Linear Models II: Applying GLMs in Practice Duncan Anderson MA FIA Watson Wyatt LLP W W W. W A T S O N W Y A T T.

Generalized Linear Models II: Applying GLMs in Practice Duncan Anderson MA FIA Watson Wyatt LLP W W W. W A T S O N W Y A T T. Generalized Linear Models II: Applying GLMs in Practice Duncan Anderson MA FIA Watson Wyatt LLP W W W. W A T S O N W Y A T T. C O M Agenda Introduction / recap Model forms and model validation Aliasing

More information

Study 2: data analysis. Example analysis using R

Study 2: data analysis. Example analysis using R Study 2: data analysis Example analysis using R Steps for data analysis Install software on your computer or locate computer with software (e.g., R, systat, SPSS) Prepare data for analysis Subjects (rows)

More information

2.1 Random variable, density function, enumerative density function and distribution function

2.1 Random variable, density function, enumerative density function and distribution function Risk Theory I Prof. Dr. Christian Hipp Chair for Science of Insurance, University of Karlsruhe (TH Karlsruhe) Contents 1 Introduction 1.1 Overview on the insurance industry 1.1.1 Insurance in Benin 1.1.2

More information

Credit Risk Modelling

Credit Risk Modelling Credit Risk Modelling Tiziano Bellini Università di Bologna December 13, 2013 Tiziano Bellini (Università di Bologna) Credit Risk Modelling December 13, 2013 1 / 55 Outline Framework Credit Risk Modelling

More information

Contents Part I Descriptive Statistics 1 Introduction and Framework Population, Sample, and Observations Variables Quali

Contents Part I Descriptive Statistics 1 Introduction and Framework Population, Sample, and Observations Variables Quali Part I Descriptive Statistics 1 Introduction and Framework... 3 1.1 Population, Sample, and Observations... 3 1.2 Variables.... 4 1.2.1 Qualitative and Quantitative Variables.... 5 1.2.2 Discrete and Continuous

More information

11/28/2018. Overview. Multiple Linear Regression Analysis. Multiple regression. Multiple regression. Multiple regression. Multiple regression

11/28/2018. Overview. Multiple Linear Regression Analysis. Multiple regression. Multiple regression. Multiple regression. Multiple regression Multiple Linear Regression Analysis BSAD 30 Dave Novak Fall 208 Source: Ragsdale, 208 Spreadsheet Modeling and Decision Analysis 8 th edition 207 Cengage Learning 2 Overview Last class we considered the

More information

Statistics 175 Applied Statistics Generalized Linear Models Jianqing Fan

Statistics 175 Applied Statistics Generalized Linear Models Jianqing Fan Statistics 175 Applied Statistics Generalized Linear Models Jianqing Fan Example 1 (Kyhposis data): (The data set kyphosis consists of measurements on 81 children following corrective spinal surgery. Variable

More information

4. Basic distributions with R

4. Basic distributions with R 4. Basic distributions with R CA200 (based on the book by Prof. Jane M. Horgan) 1 Discrete distributions: Binomial distribution Def: Conditions: 1. An experiment consists of n repeated trials 2. Each trial

More information

Package SMFI5. February 19, 2015

Package SMFI5. February 19, 2015 Type Package Package SMFI5 February 19, 2015 Title R functions and data from Chapter 5 of 'Statistical Methods for Financial Engineering' Version 1.0 Date 2013-05-16 Author Maintainer

More information

Chapter 3 - Lecture 5 The Binomial Probability Distribution

Chapter 3 - Lecture 5 The Binomial Probability Distribution Chapter 3 - Lecture 5 The Binomial Probability October 12th, 2009 Experiment Examples Moments and moment generating function of a Binomial Random Variable Outline Experiment Examples A binomial experiment

More information

Duration Models: Modeling Strategies

Duration Models: Modeling Strategies Bradford S., UC-Davis, Dept. of Political Science Duration Models: Modeling Strategies Brad 1 1 Department of Political Science University of California, Davis February 28, 2007 Bradford S., UC-Davis,

More information

West Coast Stata Users Group Meeting, October 25, 2007

West Coast Stata Users Group Meeting, October 25, 2007 Estimating Heterogeneous Choice Models with Stata Richard Williams, Notre Dame Sociology, rwilliam@nd.edu oglm support page: http://www.nd.edu/~rwilliam/oglm/index.html West Coast Stata Users Group Meeting,

More information

Logistic Regression with R: Example One

Logistic Regression with R: Example One Logistic Regression with R: Example One math = read.table("http://www.utstat.toronto.edu/~brunner/appliedf12/data/mathcat.data") math[1:5,] hsgpa hsengl hscalc course passed outcome 1 78.0 80 Yes Mainstrm

More information

Sociology 704: Topics in Multivariate Statistics Instructor: Natasha Sarkisian. Binary Logit

Sociology 704: Topics in Multivariate Statistics Instructor: Natasha Sarkisian. Binary Logit Sociology 704: Topics in Multivariate Statistics Instructor: Natasha Sarkisian Binary Logit Binary models deal with binary (0/1, yes/no) dependent variables. OLS is inappropriate for this kind of dependent

More information

Regression and Simulation

Regression and Simulation Regression and Simulation This is an introductory R session, so it may go slowly if you have never used R before. Do not be discouraged. A great way to learn a new language like this is to plunge right

More information