Minimum degrees of freedom for OMEGA simulation is length()
kylebaron opened this issue · 0 comments
kylebaron commented
Degrees of freedom for OMEGA and SIGMA simulation are required to be greater than or equal to the length()
of the matrix. Why is it length()
and not nrow()
?
library(metrumrg)
#> Loading required package: reshape
#> Loading required package: lattice
#> Loading required package: XML
#> Loading required package: MASS
#> Loading required package: grid
#> metrumrg 5.57
#> enter "?metrumrg" for help
theta <- c(1,2,3)
omega <- diag(c(0.1, 0.1, 0.1, 0.1, 0.1))
sigma <- c(1)
x <- simpar(10,
theta,
covar = diag(rep(0.1,3)),
omega,
odf = 20,
sigma)
#> Error in simpar(10, theta, covar = diag(rep(0.1, 3)), omega, odf = 20, :
odf[n] is less than number of elements in corresponding matrix
Created on 2018-10-15 by the reprex package (v0.2.0).
https://github.com/metrumresearchgroup/metrumrg/blob/master/R/simpar.R#L69-L77