Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Go to file/function Do > Addins Untitled1* x Source on Save Q - Run 45 ## input para (a vector of size 2) 46 47

image text in transcribed
Go to file/function Do > Addins Untitled1* x Source on Save Q - Run 45 ## input para (a vector of size 2) 46 47 - nllik = function (para){ 48 nll = - sum(dnorm(Data, mean=para[1] , sd=para[2], log=T)) 49 return(nil) 50 - 3 51 52 ##objfun = funciton (para, date=Date){ 53 54 dnorm(Data, mean=para [1] , sd=para[2]) 55 56 - 3## 57 58 ## use optimization function to find the maximum likelihood estimates (MLE) 59 ## of mu and sigma 60 61 para. ini = c(10,2) 62 para. min = c(-2,0.1) 63 para . max =c(200, 10) 64 optim(par=para. ini, nllik, lower=para. min, upper=para. max, 65 method= 'L-BFGS-B' ) 66 47:23 nllik(para) = Environment History Connections Tutorial

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Linear Algebra With Applications

Authors: Jeffrey Holt

2nd Edition

1319057691, 9781319057695

More Books

Students also viewed these Mathematics questions

Question

How does enlightened self-interest differ from self-interest?

Answered: 1 week ago

Question

Outline the four basic components of drives according to Freud.

Answered: 1 week ago

Question

Speak clearly and distinctly with moderate energy

Answered: 1 week ago

Question

Get married, do not wait for me

Answered: 1 week ago