bmop_fit: Estimation of bmop density or conditional density

Description Usage Arguments Value Examples

View source: R/2-estimation-functions.R

Description

Estimation of bmop density or conditional density

Usage

1
2
bmop_fit(data, conditional = FALSE, Min = NULL, Max = NULL, bmop = NULL,
  ...)

Arguments

data

data.frame, matrix, vector or object of class "histogram" or "bins"

conditional

logic, if TRUE a conditional density is learned

Min

vector of lower bounds

Max

vector of upper bounds

bmop

a bmop object

...

see bmopPar

Value

a bmop object, a density if conditional=FALSE or a conditional density if conditional=TRUE. In the latter case the first variable of the dataset is considered as the conditioned one and the rest of the variables as the conditioning ones. If the dataset has only one variable a normal density is generated discarding the value of conditional.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
plot(bmop_fit(rnorm(100)))
plot(bmop_fit(hist(rnorm(100000))))
#############################
Data<-data.frame(rnorm(100),rexp(100))
bmop<-bmop_fit(Data)
plot(bmop)
#############################
X<-rnorm(100)
Y<-rnorm(100,mean=X)
Data<-data.frame(X,Y)
bmopPar(mle=TRUE)
bmopC<-bmop_fit(Data,conditional=TRUE)
bmopPar(mle=FALSE)
plot(bmopC)

gherardovarando/Rbmop documentation built on May 17, 2019, 4:17 a.m.