vv_print: Functions for Printing Objects According to Classes

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

A Class mixnormerr is declared in cubfits, and this is the function to print and summary objects.

Usage

1
2
## S3 method for class 'mixnormerr'
print(x, digits = max(4, getOption("digits") - 3), ...)

Arguments

x

an object with the class attributes.

digits

for printing out numbers.

...

other possible options.

Details

This is an useful function for summarizing and debugging.

Value

The results will cat or print on the STDOUT by default.

Author(s)

Wei-Chen Chen wccsnow@gmail.com.

References

https://github.com/snoweye/cubfits/

See Also

mixnormerr.optim().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
suppressMessages(library(cubfits, quietly = TRUE))

### Get individual of phi.Obs.
GM <- apply(yassour[, -1], 1, function(x) exp(mean(log(x[x != 0]))))
phi.Obs.all <- yassour[, -1] / sum(GM) * 15000
phi.Obs.all[phi.Obs.all == 0] <- NA

### Run optimization.
X <- log(as.matrix(phi.Obs.all))
param.init <- list(K = 2, prop = c(0.95, 0.05), mu = c(-0.59, 3.11),
                   sigma2 = c(1.40, 0.59), sigma2.e = 0.03)
ret <- mixnormerr.optim(X, K = 2, param = param.init)
print(ret)

## End(Not run)

cubfits documentation built on Nov. 8, 2021, 1:07 a.m.