Re: [R] Sensitivity and Specificity

2022-10-25 Thread greg holly
Hi Micheal, Rui, Jin and Matthias, I appreciate your time and help. The problem has been solved with your guides. Kind regards, Greg. On Tue, Oct 25, 2022 at 12:11 AM Prof. Dr. Matthias Kohl < matthias.k...@stamats.de> wrote: > MKclass::perfMeasures(predict_testing, truth = testing$case, namePos

Re: [R] Sensitivity and Specificity

2022-10-24 Thread Prof. Dr. Matthias Kohl
MKclass::perfMeasures(predict_testing, truth = testing$case, namePos = 1) should also work and computes 80 performance measures. Best Matthias Am 25.10.22 um 06:42 schrieb Jin Li: Hi Greg, This can be done by: spm::pred.acc(testing$case, predict_testing) It will return both sensitivity and

Re: [R] Sensitivity and Specificity

2022-10-24 Thread Jin Li
Hi Greg, This can be done by: spm::pred.acc(testing$case, predict_testing) It will return both sensitivity and specificity, along with a few other commonly used measures. Hope this helps, Jin On Tue, Oct 25, 2022 at 6:01 AM Rui Barradas wrote: > Às 16:50 de 24/10/2022, greg holly escreveu:

Re: [R] Sensitivity and Specificity

2022-10-24 Thread Rui Barradas
Às 16:50 de 24/10/2022, greg holly escreveu: Hi Michael, I appreciate your writing. Here are what I have after; predict_testing <- ifelse(predict > 0.5,1,0) head(predict) 1 2 3 5 7 8 0.29006984 0.28370507 0.10761993 0.02204224

Re: [R] Sensitivity and Specificity

2022-10-24 Thread greg holly
THanks Michael for this.This is much appreciated. So, how can I estimate the sensitivity and specificity after having the prediction on testing data. Any thoughts? Kind regards, Greg On Mon, Oct 24, 2022 at 12:10 PM Michael Dewey wrote: > So predict is a one-dimensional vector of

Re: [R] Sensitivity and Specificity

2022-10-24 Thread Michael Dewey
So predict is a one-dimensional vector of predictions but you are treating it as a two-dimensional matrix (presumably you think those are the totals). Michael On 24/10/2022 16:50, greg holly wrote: Hi Michael, I appreciate your writing. Here are what I have after; > predict_testing <-

Re: [R] Sensitivity and Specificity

2022-10-24 Thread Michael Dewey
Rather hard to know without seeing what output you expected and what error message you got if any but did you mean to summarise your variable predict before doing anything with it? Michael On 24/10/2022 16:17, greg holly wrote: Hi all R-Help , After partitioning my data to testing and

Re: [R] Sensitivity and Specificity

2022-10-24 Thread greg holly
Hi Michael, I appreciate your writing. Here are what I have after; > predict_testing <- ifelse(predict > 0.5,1,0) > > head(predict) 1 2 3 5 7 8 0.29006984 0.28370507 0.10761993 0.02204224 0.12873872 0.08127920 > > # Sensitivity and

[R] Sensitivity and Specificity

2022-10-24 Thread greg holly
Hi all R-Help , After partitioning my data to testing and training (please see below), I need to estimate the Sensitivity and Specificity. I failed. It would be appropriate to get your help. Best regards, Greg inTrain <- createDataPartition(y=data$case, p=0.7,

[R] sensitivity and specificity

2014-04-25 Thread Si Qi L.
Hi guys, I will be very grateful if you guys can do me a little favor on R. I am calculating the sensitivity and specificity for a 2*2 matrix, such as t 01 0 1427 110 1 271 166 My codes are: sens - function(ct) { ct[2,2] / sum(ct[,2]) } spec -

Re: [R] sensitivity and specificity

2014-04-25 Thread David Winsemius
On Apr 25, 2014, at 10:58 AM, Si Qi L. wrote: Hi guys, I will be very grateful if you guys can do me a little favor on R. I am calculating the sensitivity and specificity for a 2*2 matrix, such as t 01 0 1427 110 1 271 166 My codes are: sens - function(ct) {

Re: [R] sensitivity and specificity

2014-04-25 Thread MacQueen, Don
Try this: sens - function(ct) { ct[2,2] / sum(ct[,2]) } spec - function(ct) { ct[1,1] / sum(ct[,1]) } myt - matrix( c(1427,271,110,166), ncol=2) sens(myt) [1] 0.6014493 spec(myt) [1] 0.8404005 -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627

Re: [R] sensitivity and specificity in svyglm??

2012-08-16 Thread Frank Harrell
Sensitivity and specificity are improper scoring rules so beware. They are optimized by a bogus model. Frank Diana Marcela Martinez Ruiz wrote Hello, As obtained from a table svyglm clasificaion, sensitivity and specificity. The funtion ConfusionMatrix () of the library (caret) gives

Re: [R] sensitivity and specificity in svyglm??

2012-08-16 Thread Thomas Lumley
On Thu, Aug 16, 2012 at 9:01 AM, Diana Marcela Martinez Ruiz dianamm...@hotmail.com wrote: Hello, As obtained from a table svyglm clasificaion, sensitivity and specificity. The funtion ConfusionMatrix () of the library (caret) gives these results but not how to apply it to svyglm. predict()

[R] sensitivity and specificity in svyglm??

2012-08-15 Thread Diana Marcela Martinez Ruiz
Hello, As obtained from a table svyglm clasificaion, sensitivity and specificity. The funtion ConfusionMatrix () of the library (caret) gives these results but not how to apply it to svyglm. thanks [[alternative HTML version deleted]]

Re: [R] Sensitivity and Specificity Forest Plots

2011-11-22 Thread Viechtbauer Wolfgang (STAT)
-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jonathan Minton Sent: Monday, November 21, 2011 17:34 To: r-help@r-project.org Subject: [R] Sensitivity and Specificity Forest Plots Dear R Users, Do you know of an existing function that allows the production of sensitivity

[R] Sensitivity and Specificity Forest Plots

2011-11-21 Thread Jonathan Minton
Dear R Users, Do you know of an existing function that allows the production of sensitivity and specificity forest plots? See the following for an example: