# Clere-class: 'Clere' class In clere: Simultaneous Variables Clustering and Regression

## Description

This class contains all the input parameters to run CLERE.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```## S4 method for signature 'Clere' show(object) ## S4 method for signature 'Clere,ANY,ANY,ANY' x[i, j, drop] ## S4 method for signature 'sClere' show(object) ## S4 method for signature 'sClere,ANY,ANY,ANY' x[i, j, drop] ## S4 replacement method for signature 'sClere,ANY,ANY,ANY' x[i, j] <- value ```

## Details

y

[numeric]: The vector of observed responses.

x

[matrix]: The matrix of predictors.

n

[integer]: The sample size or the number of rows in matrix x.

p

[integer]: The number of variables of the number of columns in matrix x.

g

[integer]: The number or the maximum number of groups considered. Maximum number of groups stands when model selection is required.

nItMC

[numeric]: Number of Gibbs iterations to generate the partitions.

nItEM

[numeric]: Number of SEM/MCEM iterations.

nBurn

[numeric]: Number of SEM iterations discarded before calculating the MLE which is averaged over SEM draws.

dp

[numeric]: Number of iterations between sampled partitions when calculating the likelihood at the end of the run.

nsamp

[numeric]: Number of sampled partitions for calculating the likelihood at the end of the run.

sparse

[logical]: Should a `0` class be imposed to the model?

analysis

[character]: Which analysis is to be performed. Values are `"fit"`, `"bic"`, `"aic"` and `"icl"`.

algorithm

[character]: The algorithmto be chosen to fit the model. Either the SEM-Gibbs algorithm or the MCEM algorithm. The most efficient algorithm being the SEM-Gibbs approach. MCEM is not available for binary response.

initialized

[logical]: Is set to TRUE when an initial partition and an initial vector of parameters is given by the user.

maxit

[numeric]: An EM algorithm is used inside the SEM to maximize the complete log-likelihood `p(y,Z|theta)`. `maxit` stands as the maximum number of EM iterations for the internal EM.

tol

[numeric]: Maximum increased in complete log-likelihood for the internal EM (stopping criterion).

seed

[integer]: An integer given as a seed for random number generation. If set to `NULL`, then a random seed is generated between `1` and `1000`.

b

[numeric]: Vector of parameter b. Its size equals the number of group(s).

pi

[numeric]: Vector of parameter pi. Its size equals the number of group(s).

sigma2

[numeric]: Parameter sigma^2.

gamma2

[numeric]: Parameter gamma^2.

itemintercept[numeric]: Parameter beta_0 (intercept).

likelihood

[numeric]: Approximated log-likelihood.

entropy

[numeric]: Approximated entropy.

P

[matrix]: A `p x g` matrix of posterior probability of membership to the groups. `P = E[Z|theta]`.

theta

[matrix]: A `nItEM x (2g+4)` matrix containing values of the model parameters and complete data likelihood at each iteration of the SEM/MCEM algorithm

Bw

[matrix]: A `p x nsamp` matrix which columns are samples from the posterior distribution of Beta (regression coefficients) given the data and the maximum likelihood estimates.

Zw

[matrix]: A `p x nsamp` matrix which columns are samples from the posterior distribution of Z (groups membership indicators) given the data and the maximum likelihood estimates.

theta0

[numeric]: A `2g+3` length vector containing initial guess of the model parameters. See example for function `fitClere.`

Z0

[numeric]: A `p x 1` vector of integers taking values between 1 and `p` (number of variables).

## Methods

`object["slotName"]`:

Get the value of the field `slotName`.

`object["slotName"]<-value`:

Set `value` to the field `slotName`.

`plot(x, ...)`:

Graphical summary for MCEM/SEM-Gibbs estimation.

`clusters(object, threshold = NULL, ...)`:

Returns the estimated clustering of variables.

`predict(object, newx, ...)`:

Returns prediction using a fitted model and a new matrix of design.

`summary(object, ...)`:

summarizes the output of function `fitClere`.

Overview : `clere-package`
Classes : `Clere`
Methods : `plot`, `clusters`, `predict`, `summary`
Functions : `fitClere` Datasets : `numExpRealData`, `numExpSimData`, `algoComp`
{"ft_lang_label":"__label__en","ft_lang_prob":0.6452008,"math_prob":0.9767721,"size":3638,"snap":"2021-04-2021-17","text_gpt3_token_len":851,"char_repetition_ratio":0.14391854,"word_repetition_ratio":0.09269162,"special_character_ratio":0.23117097,"punctuation_ratio":0.17201166,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.998093,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-01-23T11:03:22Z\",\"WARC-Record-ID\":\"<urn:uuid:e5ba96d8-bfc3-4fc0-9d3f-d180d2091abb>\",\"Content-Length\":\"36863\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e0d4fd76-adad-4a71-87d4-68c77b85fc54>\",\"WARC-Concurrent-To\":\"<urn:uuid:08ba4f6d-7b6c-4dfc-b953-56294bc154cc>\",\"WARC-IP-Address\":\"51.81.83.12\",\"WARC-Target-URI\":\"https://rdrr.io/cran/clere/man/Clere-class.html\",\"WARC-Payload-Digest\":\"sha1:BAXNSX3672ULXQLN33FDW4Q2OBD37XP3\",\"WARC-Block-Digest\":\"sha1:EW5HG7O2UCQYIASTDOZQAPJGM36YOOPB\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-04/CC-MAIN-2021-04_segments_1610703537796.45_warc_CC-MAIN-20210123094754-20210123124754-00714.warc.gz\"}"}