# [R] HOW TO SOLVE THIS PROBLEM (RVALS)

Rui Barradas ru|pb@rr@d@@ @end|ng |rom @@po@pt
Sun Aug 8 17:41:22 CEST 2021

```Hello,

nobs is missing in your example.

Assuming that envelope is the function in package base boot, I cannot
reproduce the error.

set.seed(2021)
nc <- 10000
nobs <- 100
M1 <- matrix(evd::rfrechet(nc*nobs),nrow=nobs,ncol=nc)
M <- t(apply(M1,2,sort))
E <- boot::envelope(mat=M) #compute 95% confidance bands

str(E)
#List of 7
# \$ point  : num [1:2, 1:100] 0.302 0.12 0.341 0.167 0.373 ...
# \$ overall: num [1:2, 1:100] 0.3698 0.0832 0.4163 0.1287 0.4499 ...
# \$ k.pt   : num [1:2] 250 9751
# \$ err.pt : num [1:2] 0.05 0.562
# \$ k.ov   : num [1:2] 11 9990
# \$ err.ov : num [1:2] 0.0022 0.0496
# \$ err.nom: num [1:2] 0.05 0.05

Hope this helps,

Às 08:53 de 07/08/21, SITI AISYAH ZAKARIA escreveu:
> Hi,
>
> Can anyone help me how to solve this problem?
>
>   #calculation of confidence intervals
> 1. > nc <- 10000
> 2. > M1 <- matrix(rfrechet(nc*nobs),nrow=nobs,ncol=nc)
> 3. > M <- t(apply(M1,2,sort))
> 4. > E <- envelope(mat=M) #compute 95% confidance bands
> *Error in envelope.matrix(mat = M) : rvals must be supplied*
>
> My problem is after I run my coding in line 4 the error is highlighted red