[R] Question regarding k-fold cross validation

2022-04-15 Thread Paul Bernal
Dear friends, Hope you are doing great. I need to perform a k-fold cross validation analysis on the famous iris dataset, with k = 5. Now, the model I am using is a multinomial logit, because the dependent variable is species and it has three classes (setosa, versicolor and virginica). The

Re: [R] Sorted index of values in matrix

2022-04-15 Thread Eliza Botto
Thankyou very much. It worked. Eliza From: Bert Gunter Sent: Friday 15 April 2022 17:00 To: Jeff Newmiller Cc: R-help ; Eliza Botto Subject: Re: [R] Sorted index of values in matrix ... But Ivan's solution -- which I had to think about -- is better, and it

Re: [R] Need help with netmeta package

2022-04-15 Thread Bert Gunter
While you *may* get a useful reply here, there is an r-sig-meta-analysis list to which this would be better posted: https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus

[R] Need help with netmeta package

2022-04-15 Thread Roopa Subbaiah
Hi all, We are conducting network metaanalysis of 3 treatments compared to placebo using netmeta analysis. We have mean sd values for an outcome. How do we calculate z scores using netmeta package? Thank you [[alternative HTML version deleted]]

Re: [R] Sorted index of values in matrix

2022-04-15 Thread Bert Gunter
... and here is another version of Jeff's solution using the built in row() and col() functions instead of explicitly creating the indices (but his version generalizes to arbitrary arrays; this does not): qq <- matrix(12:7, nrow =3) ## start with a non-sorted matrix > qq [,1] [,2] [1,] 12

Re: [R] Sorted index of values in matrix

2022-04-15 Thread Ivan Krylov
В Fri, 15 Apr 2022 14:53:36 + Eliza Botto пишет: > sort(qq) command will execute the sorted values of this matrix as (1 > 2 3 4 5 6). Instead of values, I want the row and column names of > these sorted values as (1,1), (1,2), (1,3), (2,1), (2,2), (2,3) Combine order() to get the sorting

[R] Sorted index of values in matrix

2022-04-15 Thread Eliza Botto
deaR useRs, I have this following simple dataset > dput(qq) structure(1:6, .Dim = 3:2, .Dimnames = list(c("1", "2", "3"), c("1", "2"))) I want to extract row and column index of the sorted values of this matrix For example, sort(qq) command will execute the sorted values of this matrix