Annotation of OpenXM/src/R/r-packages/hgm/man/hgm.mleFBByOptim.Rd, Revision 1.3
1.3 ! takayama 1: % $OpenXM: OpenXM/src/R/r-packages/hgm/man/hgm.mleFBByOptim.Rd,v 1.2 2014/03/31 07:23:09 takayama Exp $
! 2: \name{hgm.z.mleFBByOptim}
! 3: %%Todo, write documents for hgm.z.mleDemo, hgm.ssFB
1.1 takayama 4: %\alias{hgm.ncso3}
5: %- Also NEED an '\alias' for EACH other topic documented here.
6: \title{
7: MLE of Fisher-Bingham distribution by optim and HGM.
8: }
9: \description{
10: It makes the maximal likelihood estimate (MLE) for the Fisher-Bingham
11: distribution on S^d.
12: }
13: \usage{
1.3 ! takayama 14: hgm.z.mleFBByOptim(d=0,ss=NULL,data=NULL,start=NULL,lb=NULL,up=NULL,bigValue=10000)
1.1 takayama 15: }
16: %- maybe also 'usage' for other objects documented here.
17: \arguments{
18: \item{d}{The dimension of the sphere}
19: \item{ss}{Sufficient statistics}
20: \item{data}{
21: The argument data is a set of data on the d-dimensional sphere.
1.2 takayama 22: Its format is an n by (d+1) matrix where n is the number of data.
23: When data is given, ss must be NULL
1.1 takayama 24: and ss is calculated from data by hgm.ssFB(data).
25: }
26: \item{start}{
27: Starting point for the function optim. The default value is a random
28: vector.
29: }
30: \item{lb}{
31: An array of length sslen = (d+1)*(d+2)/2 + (d+1), each of which
32: is the lower bound of the parameter. The default value is -100.
33: }
34: \item{ub}{
35: An array of length sslen = (d+1)*(d+2)/2 + (d+1), each of which
36: is the upper bound of the parameter. The default value is 100.
37: }
38: \item{bigValue}{
39: It is used as a value wall to avoid that the evaluation point is out of
40: the search domain defined by lb and ub.
41: }
42: }
43: \details{
44: It solves the MLE for the Fisher-Bingham distribution.
45: The normalizing constant is evaluated by hgm_ko_ncfb (external program,
46: which should in the path).
47: The function
48: % \code{\link[RCurl]{postForm}}
49: \code{\link{optim}}
50: is used for the optimization.
51: The output is used as a starting point for the holonomic gradient method.
52: See nk_fb_gen_c.rr of \url{http://www.math.kobe-u.ac.jp/Asir}.
1.2 takayama 53: This function generates temporary work files whose names start with tmp.
54: \code{data <- read.table(fileName,sep=",")} can be used to read CSV data
55: from a file.
1.1 takayama 56: }
57: \value{
58: The output format is that of the function optim().
59: }
60: \references{
61: T. Koyama, H. Nakayama, K. Nishiyama, N. Takayama,
62: Holonomic Gradient Descent for the Fisher-Bingham Distribution on the d-dimensional Sphere,
63: Computational Statistics (2013)
64: \url{http://dx.doi.org/10.1007/s00180-013-0456-z}
65: }
66: \author{
67: T.Koyama, H.Nakayama, K.Nishiyama, N.Takayama.
68: }
69: \note{
70: %% ~~further notes~~
71: }
72:
73: %% ~Make other sections like Warning with \section{Warning }{....} ~
74:
75: \seealso{
1.2 takayama 76: \code{\link{optim}}
1.1 takayama 77: }
78: \examples{
79: ## =====================================================
80: ## Example 1. Asteroid data in [N3OST2]
81: ## =====================================================
82: \dontrun{
83: d <- 2
84: ss <- c(0.3119,0.0292,0.0707,
85: 0.3605,0.0462,
86: 0.3276,
87: 0.0063,0.0054,0.0762)
88: start <- c(0.1,0.1,1,1,1,-1,-1,-1,-1)
1.3 ! takayama 89: hgm.z.mleFBByOptim(d=d,ss=ss,start=start)
1.1 takayama 90: }
91: }
92: % Add one or more standard keywords, see file 'KEYWORDS' in the
93: % R documentation directory.
94: \keyword{ Holonomic gradient method }
95: \keyword{ HGM }
96: \keyword{ Fisher-Bingham distribution on S^d}
97: \keyword{ MLE }
98:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>