Using R to Generate Double Exponential Data and Calculate the MLEs

preview_player
Показать описание
This video illustrates a short R program on how to generate double exponential data and calculate the MLEs. The density for the double exponential.

f(x) = (1/b) exp(-|x-mu|/b) Help this channel to remain great! Donating to Patreon or Paypal can do this!
Рекомендации по теме
Комментарии
Автор


###
### Video: "Generating Double Exponential Data from
### Scratch"
###
### Video: "MLEs of a Double Exponential
### Distribution"
###


### sample size and parameters for distribution
22;b<-11
### generate random uniform(0, 1) data
p<-runif(n)
### code that generate double exponential data
x<-mu -
### rough plot of random data
plot(density(x))

### MLEs for the parameters of a double exponential
median(x)
sum(abs(x-median(x)))/n

statisticsmatt