Appendix. Appendix I. Details used in M-step of Section 4. and expect ultimately it will close to zero. αi =α (r 1) [δq(α i ; α (r 1)

Σχετικά έγγραφα
One and two particle density matrices for single determinant HF wavefunctions. (1) = φ 2. )β(1) ( ) ) + β(1)β * β. (1)ρ RHF

Πανεπιστήµιο Κρήτης - Τµήµα Επιστήµης Υπολογιστών. ΗΥ-570: Στατιστική Επεξεργασία Σήµατος. ιδάσκων : Α. Μουχτάρης. εύτερη Σειρά Ασκήσεων.

α & β spatial orbitals in

8.1 The Nature of Heteroskedasticity 8.2 Using the Least Squares Estimator 8.3 The Generalized Least Squares Estimator 8.

Multi-dimensional Central Limit Theorem

Multi-dimensional Central Limit Theorem

Other Test Constructions: Likelihood Ratio & Bayes Tests

8. ΕΠΕΞΕΡΓΑΣΊΑ ΣΗΜΆΤΩΝ. ICA: συναρτήσεις κόστους & εφαρμογές

Exam Statistics 6 th September 2017 Solution

Math221: HW# 1 solutions

ST5224: Advanced Statistical Theory II

Variance of Trait in an Inbred Population. Variance of Trait in an Inbred Population

Solution Series 9. i=1 x i and i=1 x i.

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

Finite Field Problems: Solutions

Numerical Analysis FMN011

6.3 Forecasting ARMA processes

Matrices and Determinants

EE512: Error Control Coding

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

ΠΤΥΧΙΑΚΗ/ ΙΠΛΩΜΑΤΙΚΗ ΕΡΓΑΣΙΑ

Inverse trigonometric functions & General Solution of Trigonometric Equations

Estimators when the Correlation Coefficient. is Negative

The challenges of non-stable predicates

Concrete Mathematics Exercises from 30 September 2016

ΗΥ537: Έλεγχος Πόρων και Επίδοση σε Ευρυζωνικά Δίκτυα,

The Simply Typed Lambda Calculus

Symplecticity of the Störmer-Verlet algorithm for coupling between the shallow water equations and horizontal vehicle motion

MATH423 String Theory Solutions 4. = 0 τ = f(s). (1) dτ ds = dxµ dτ f (s) (2) dτ 2 [f (s)] 2 + dxµ. dτ f (s) (3)

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

Statistical Inference I Locally most powerful tests

( )( ) ( ) ( )( ) ( )( ) β = Chapter 5 Exercise Problems EX α So 49 β 199 EX EX EX5.4 EX5.5. (a)

Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

130907_A_fasi_PE70 ΑΑ ΕΠΩΝΥΜΟ ΟΝΟΜΑ ΠΑΤΡΩΝΥΜΟ ΜΗΤΡΩΝΥΜΟ ΚΛΑΔΟΣ ΤΡΙΤΕΚΝΟ ΠΙΝΑΚΑΣ Σ ΔΙΕΥΘΥΝΣΗ ΕΚΠ/ΣΗΣ ΠΙΝΑΚΑ ΠΙΝΑΚΑ ΤΟΠΟΘΕΤΗΣΗΣ

Exercises to Statistics of Material Fatigue No. 5

Vidyamandir Classes. Solutions to Revision Test Series - 2/ ACEG / IITJEE (Mathematics) = 2 centre = r. a

Congruence Classes of Invertible Matrices of Order 3 over F 2

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 11/3/2006

Section 8.3 Trigonometric Equations

8.324 Relativistic Quantum Field Theory II

4.6 Autoregressive Moving Average Model ARMA(1,1)

LECTURE 4 : ARMA PROCESSES

Solutions to Exercise Sheet 5

Example Sheet 3 Solutions

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

F19MC2 Solutions 9 Complex Analysis

ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ

w o = R 1 p. (1) R = p =. = 1

arxiv: v1 [stat.me] 20 Jun 2015

ΑΠΟΤΕΛΕΣΜΑΤΑ ΕΞΕΤΑΣΕΩΝ ΣΕΜΙΝΑΡΙΟΥ ΠΙΣΤΟΠΟΙΗΣΗΣ ΤΥΠΟΣ ΠΙΣΤΟΠ.

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

C.S. 430 Assignment 6, Sample Solutions

Supporting information for: Functional Mixed Effects Model for Small Area Estimation

Calculating the propagation delay of coaxial cable

Every set of first-order formulas is equivalent to an independent set

1 Complete Set of Grassmann States

THE SECOND WEIGHTED MOMENT OF ζ. S. Bettin & J.B. Conrey

The ε-pseudospectrum of a Matrix

Notes on the Open Economy

Homework 8 Model Solution Section

Suppose Mr. Bump observes the selling price and sales volume of milk gallons for 10 randomly selected weeks as follows

Generalized Linear Model [GLM]

SUPPLEMENT TO SEQUENTIAL ESTIMATION OF STRUCTURAL MODELS WITH A FIXED POINT CONSTRAINT (Econometrica, Vol. 80, No. 5, September 2012, )

CHAPTER 48 APPLICATIONS OF MATRICES AND DETERMINANTS

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

Homework 3 Solutions

Supplementary materials for Statistical Estimation and Testing via the Sorted l 1 Norm

A Two Sample Test for Mean Vectors with Unequal Covariance Matrices

arxiv: v1 [math.na] 16 Apr 2017

Variational Wavefunction for the Helium Atom

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

2 Composition. Invertible Mappings

Phasor Diagram of an RC Circuit V R

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016

HW 3 Solutions 1. a) I use the auto.arima R function to search over models using AIC and decide on an ARMA(3,1)

m4.3 Chris Parrish June 16, 2016

Srednicki Chapter 55

An Inventory of Continuous Distributions

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

Αναγνώριση Προτύπων (Pattern Recognition) Μπεϋζιανή Θεωρία Αποφάσεων (Bayesian Decision Theory) Π. Τσακαλίδης

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

1η εργασία για το μάθημα «Αναγνώριση προτύπων»

ΜΕΡΟΣ ΙΙI ΜΟΡΙΑΚΟ ΒΑΡΟΣ ΠΟΛΥΜΕΡΩΝ

Statistics 104: Quantitative Methods for Economics Formula and Theorem Review

Μαθητές που εισήχθησαν στην Τριτοβάθμια Εκπαίδευση με τις Πανελλαδικές Εξετάσεις Όνομα Πατέρα. Μητέρας

Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in

ΠΡΟΓΡΑΜΜΑ ΣΠΟΥΔΩΝ: "ΤΡΑΠΕΖΙΚΗ" ( ΤΡΑ ) ΚΑΤΗΓΟΡΙΑ Α' Α/Α EΠΩΝΥΜΟ ΟΝΟΜΑ ΟΝΟΜΑ ΠΑΤΕΡΑ ΣΕΙΡΑ ΕΠΙΤΥΧΙΑΣ

Differential equations

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

Mean-Variance Analysis

SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM

ΤΜΗΜΑ ΛΟΓΙΣΤΙΚΗΣ & ΧΡΗΜΑΤΟΟΙΚΟΝΟΜΙΚΗΣ

Neutralino contributions to Dark Matter, LHC and future Linear Collider searches

Problem Set 3: Solutions

Testing for Indeterminacy: An Application to U.S. Monetary Policy. Technical Appendix

Transcript:

Appendx Appendx I. Detals used n M-step of Secton 4. Now wrte h (r) and expect ultmately t wll close to zero. and h (r) = [δq(α ; α (r) )/δα ] α =α (r 1) = [δq(α ; α (r) )/δα ] α =α (r 1) δ log L(α (r 1) )/δα [δq(α ; α (r 1) )/δα ] α =α (r 1) = [ψ(α ) ψ(α j ) + ψ(n j + α (r) j ) ψ(n + α (r) )] α =α (r 1) [ψ(α ) ψ(α j ) + ψ(n j + α (r 1) j ) ψ(n + α (r 1) )] α =α (r 1) = ψ(n j + α (r) j ) ψ(n + α (r) where B (0) matrx e (r) ) ψ(n j + α (r 1) j = α (r) v (r) c (r) α (r 1), error term = h (r) + B (r 1) e (r) ) + ψ(n + α (r 1) ) (A1) = 1/(v (r)t e (r) ) (A2) = I d, whch corresponds to ntal EM gradent step, and f the I c (α (r) ; n ) + B (r) fals to be postve defnte, then t s replaced by I c (α (r) ; n ) + ( 1 2 )m B (r), where m s the smallest postve nteger such that the above matrx s postve defnte. & B (r) = B (r 1) + c (r) v (r) v (r)t, for all = 1,, k (A3) Ideas of (A1), (A2) and (A3) are due to Davdon (1959). Appendx II. Program for smulaton of sample observatons for gven probabltes The smulaton() functon needs an argument. Value of n s the sample sze and p be the vector of probabltes. 1

smulaton<- functon(n, p) f(sum(p)!=1.0) stop( Probabltes are not properly gven ) k<- length(p) obs<- matrx(0, ncol=500, nrow= k) rowsum.obs<-c(rep(0,k)) for(j n 1:500) cumul.obs<- c(rep(0, k)) cumul.prob<- c(rep(0, k)) obs[1,j]<- rbnom(1, n, p[1]) cumul.obs[1]<- obs[1,j] cumul.prob[1]<- p[1] for( n 2:k) f((p[]/(1-cumul.prob[-1])) 1.0) obs[,j]<- rbnom(1, n-cumul.obs[-1], p[]/(1-cumul.prob[-1])) else obs<- n - cumul.obs[-1] cumul.obs[]<- cumul.obs[-1]+obs[,j] cumul.prob[]<- cumul.prob[-1]+p[] for( n 1:k) rowsum.obs[]<- sum(obs[, ])/500 return(round(rowsum.obs, dgts=0)) Program for calculaton of rsks for gven observatons and pror The rsk.est() functon needs an argument. Value of N s the sample sze and alpha be the vector of pror parameters. rsk.est<- functon(n, alpha) numer<- 0.0 denom<- 0.0 2

rsk1<- 0.0 rsk2<- 0.0 rsk<- 0.0 numer<- sum(alpha)*sum(alpha)-sum(alpha*alpha) denom1<- sum(n)*sum(alpha)*(sum(alpha)+1) denom2<- (sum(n)+sum(alpha))*sum(alpha)*(sum(alpha)+1) rsk1<- numer/denom1 cat( Bayes rsk of unbased estmate ) prnt(rsk1) rsk2<- numer/denom2 cat( Bayes rsk of Bayes estmate ) prnt(rsk2) k<- length(alpha) f(length(n)!=k) stop( Gven vectors are not of same dmenson ) fsher.nf<- matrx(0,ncol=k,nrow=k) nv.fnf<- matrx(0,ncol=k,nrow=k) B0<- dag(k) B<- matrx(0,ncol=k,nrow=k) D<- matrx(0,ncol=k,nrow=k) S<- rep(0,k) d<- rep(0,k) v<- rep(0,k) h<- rep(0,k) hd<- matrx(0, 500, k) w<- rep(1,k) z<- numerc(0) g<- 0 m<- 0 u<- rep(0,k) eps<- 0.00001 for(j n 1:k) D[j,j]<- trgamma(alpha[j])-trgamma(n[j]+alpha[j]) u[j]<- dgamma(alpha[j])-dgamma(n[j]+alpha[j]) hd[1,j]<- dgamma(n[j]+alpha[j])-dgamma(sum(n)+sum(alpha)) 3

z<- trgamma(sum(alpha))-trgamma(sum(n)+sum(alpha)) g<- dgamma(sum(alpha))-dgamma(sum(n)+sum(alpha)) fsher.nf<- D-z*(w%*%t(w)) nv.fnf<- solve(fsher.nf+b0) d<- nv.fnf%*%s alpha<- alpha + d f(any(abs(d) eps,na.rm=f)) break for(r n 2:500) f(any(alpha =0.0)) alpha=alpha-mn(alpha)+1 for(j n 1:k) D[j,j]<- trgamma(alpha[j])-trgamma(n[j]+alpha[j]) u[j]<- dgamma(alpha[j])-dgamma(n[j]+alpha[j]) hd[r,j]<- dgamma(n[j]+alpha[j])-dgamma(sum(n)+sum(alpha)) z<- trgamma(sum(alpha))-trgamma(sum(n)+sum(alpha)) g<- dgamma(sum(alpha))-dgamma(sum(n)+sum(alpha)) fsher.nf<- D-z*(w%*%t(w)) h<- hd[r, ]-hd[r-1, ] v<- h+b0%*%d m<- t(v)%*%d q<- matrx(m, ncol=k, nrow=k) P<- v%*%t(v) B<- B0+(P/q) nv.fnf<- solve(fsher.nf+b) d<- nv.fnf%*%s alpha -alpha+d f(any(abs(d) eps, na.rm=f)) break cat( Estmate of drchlet parameter ) prnt(alpha) numer<- sum(alpha)*sum(alpha)-sum(alpha*alpha) denom<-(sum(n)+sum(alpha))*sum(alpha)*(sum(alpha)+1) rsk<- numer/denom cat( Bayes rsk of emprcal Bayes estmate ) prnt(rsk) 4

Appendx III. Program for Emprcal Bayes estmator of transton probablty matrx when all states have dfferent pror (Drchlet) parameters usng EM algorthm. The embayes.est() functon needs an argument. Value of N s the sample transton matrx and alpha s the ntal value of the Drchlet parameters. embayes.est<- functon(n, alpha) f(ncol(n)!=nrow(n)) stop( Gven matrx s not a square one ) f(ncol(alpha)!=nrow(alpha)) stop( Gven parameter matrx s not asquare one ) f(ncol(n)!=ncol(alpha)) stop( Gven matrces are not of same dmenton ) k<-ncol(n) bayes.est<- matrx(0,ncol=k,nrow=k) embayes.est<- matrx(0,ncol=k,nrow=k) fsher.nf<- matrx(0,ncol=k,nrow=k) nv.fnf<- matrx(0,ncol=k,nrow=k) B0<- dag(k) B<- matrx(0,ncol=k,nrow=k) D<- matrx(0,ncol=k,nrow=k) P<- matrx(0,ncol=k,nrow=k) S<- rep(0,k) d<- rep(0,k) v<- rep(0,k) h<- rep(0,k) hd<- matrx(0,100,k) w<- rep(1,k) z<- 0 g<- 0 m<- 0 u<- rep(0,k) eps<- 0.00001 5

#Loop for Bayes estmate# for( n 1:k) for(j n 1:k) bayes.est[,j]=(n[,j]+alpha[,j])/(sum(n[,])+sum(alpha[,])) cat( Bayes estmate of transton pobablty matrx ) prnt(bayes.est) #To calculate Fsher nformaton matrx# for( n 1:k) for(j n 1:k) D[j,j]<- trgamma(alpha[,j])-trgamma(n[,j]+alpha[,j]) u[j]<- dgamma(alpha[,j])-dgamma(n[,j]+alpha[,j]) hd[1,j]<- dgamma(n[,j]+alpha[,j])-dgamma(sum(n[,])+sum(alpha[,])) z<- trgamma(sum(alpha[,]))-trgamma(sum(n[,])+sum(alpha[,])) g<- dgamma(sum(alpha[,]))-dgamma(sum(n[,])+sum(alpha[,])) fsher.nf<- D-z*(w%*%t(w)) nv.fnf<- solve(fsher.nf+b0) d<- nv.fnf%*%s alpha[,] -alpha[,]+d f(any(abs(d)<eps,na.rm=f)) break for(r n 2:100) f(any(alpha[, ]<=0.0)) alpha[, ]<- alpha[, ]-mn(alpha[,])+1 for(j n 1:k) D[j,j]<- trgamma(alpha[,j])-trgamma(n[,j]+alpha[,j]) u[j]<- dgamma(alpha[,j])-dgamma(n[,j]+alpha[,j]) hd[r,j]<- dgamma(n[,j]+alpha[,j])-dgamma(sum(n[,])+sum(alpha[,])) z<- trgamma(sum(alpha[,]))-trgamma(sum(n[,])+sum(alpha[,])) g<- dgamma(sum(alpha[,]))-dgamma(sum(n[,])+sum(alpha[,])) fsher.nf<- D-z*(w%*%t(w)) h<- hd[r, ]-hd[r-1, ] v<- h+b0%*%d 6

m<- t(v)%*%d q<- matrx(m, ncol=k, nrow=k) P<- v%*%t(v) B<- B0+P/q nv.fnf<- solve(fsher.nf+b) d<- nv.fnf%*%s alpha[,]<- alpha[,]+d f(any(abs(d)<eps, na.rm=f)) break cat( Estmate of Drchlet parameter. ) prnt(alpha) for( n 1:k) for(j n 1:k) embayes.est[, j]<- (N[, j]+alpha[, j])/(sum(n[, ])+sum(alpha[, ])) cat( Emprcal Bayes estmate of tranton probablty matrx. ) prnt(embayes.est) 7