This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################### | |
# | |
# MLE example with categorical data | |
# | |
############################################################### | |
# make up some 'data'; c(0.1,0.2,0.3,0.4) are the 'real' parameters | |
data = rmultinom(n = 40,size = 4,prob = c(0.1,0.2,0.3,0.4)) | |
# the log-likelihood of the first sample |