R Tutorial
Starting and Quitting R
R is available on the linux / window machine in most of the university computer llabs. First login to
this machine and to start R, type the following at the UNIX prompt.
bacon[101]% R
To quit from R, type q()
Help Comman
Statistical Inference
Stat 6545
21, 23 Jan 2014
1 / 24
Likelihood Theory
The maximum likelihood method was introduced by R. A.
Fisher in 1912. Later a principle was introduced which is
known as the Likelihood Principle which is partly a
consequence of the
Stat 6545: Computational Statistics
Programming in R
Jan 14 2014
Writing Codes
You may use a text editor for writing the codes
Windows version of R (or mac) has built in editor and les
written through this editor has an extension of .R (.r). For
unix / li
Stat 6545
Assignment # 2
Due 20 Feb 2014
Problem 1: Recall the zero truncated poisson distribution discussed in class.
Consider the following data:
(x, f ) = (1, 14), (2, 9), (3, 8), (4, 2), (5, 2)
a) Graph the likelihood function between = 0 and 5
b) Use
Stat 6545
Assignment # 3
Due 24 Nov 2009
Problem 1: The transition matrix for a random walk with state space cfw_1, 2, 3, 4, 5 is
P=
0.2 0.8 0
0
0
0.2 0.2 0.6 0
0
0 0 .4 0 .2 0 .4 0
0
0 0.6 0.2 0.2
0
0
0 0.8 0.2
(a) Suppose one starts at the location 1. S
Numerical Optimization
Stat 6545
28 Jan 2014
1 / 27
Optimization of a Function
Denition - The function f is said to be a local minimum
value at x = p , if there exist an open interval I containing p
so that f (p ) f (x ) for all x I .
Similarly, f is said
Solving Non-Linear Equations
Stat 6545
30 Jan 2014
1/1
Optimization of a Function
Let g (x ) be the function to be maximized / minimized.
Maximum of g (x ) is the solution to g (x ) = g (x )/ x = 0
The solution of g (x ) = 0 is most dicult when this set o
Solving Non-Linear Equations
Stat 6545
11 Feb, 2014
1 / 12
Newton- like Method
In Multidimensional optimization case,
(t +1) = (t ) Hg 1 (t ) )
g (t ) )
where Hg is the Hessian matrix of second derivates of g,
2 (
where Hg ()ij = gj)
i
and g = g / is the
Solving Non-Linear Equations
Stat 6545
4 Feb 2014
1 / 10
Newtons Method
An extremely fast root nding approach is Newtons method.
This is also known as Newton - Raphson iteration.
Suppose that g is continuously dierentiable and that
g (x ) = 0
The rst orde