predict: Provide predictions to the Binomial entry.

Description Usage Arguments Details Author(s) See Also Examples

Description

Takes a rlda object produced by rlda.binomial and produces a prediction from it.

Usage

1
2
  ## S3 method for class 'rlda'
predict(object, data, nclus=NA, burnin=0.1, places.round=0, ...)

Arguments

object

a rlda object as produced by rlda.binomial

data

Dataset used to make the predictions. Must have the same number of columns as the dataset used in the rlda.binomial.

nclus

Number of clusters to be used in the prediction. The default value is nclus=NA

burnin

a percentual of burn-in observations must be a number between 0 and 1. The default value is burnin=0.1

places.round

Number decimal places tob rounded. The default value is places.round=0

...

other arguments may be useful.

Details

Predicts the Gibbs Samping results and arguments.

Author(s)

See Also

rlda.binomial, rlda.bernoulli,rlda.multinomial

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
		library(Rlda)
		# Read the SP500 data
		data(sp500)
		# Create size
		spSize <- as.data.frame(matrix(100,
							  ncol = ncol(sp500),
							  nrow = nrow(sp500)))
		# Set seed
		set.seed(5874)
		# Hyperparameters for each prior distribution
		gamma  <- 0.01
		alpha0 <- 0.01
		alpha1 <- 0.01
		# Execute the LDA for the Binomial entry
		res <- rlda.binomial(data = sp500, pop = spSize, n_community = 10,
		alpha0 = alpha0, alpha1 = alpha1, gamma = gamma,
		n_gibbs = 500, ll_prior = TRUE, display_progress = TRUE)
		#Predict
		pred<- predict(res, sp500, nclus=3)
  
## End(Not run)

Rlda documentation built on May 1, 2019, 7:26 p.m.

Related to predict in Rlda...