Error in diag(nrow(V) * tausq, nrow = ncol(V), ncol = ncol(V)) : 'nrow' or 'ncol' cannot be specified when 'x' is a matrix
This is the error I get when I try to run
D <- diag(nrow(V)*tausq, nrow=ncol(V), ncol=ncol(V))
which is part of a function I wrote.
It's the first line of the function and V is a matrix which is part of the argument.
What does this error mean?
V
ortausq
, we can't run the code in your question and get the same output. Posting something like the output ofdput(V)
anddput(tausq)
would be ideal. – josliber