chenvict / dipm

Depth Importance in Precision Medicine (DIPM): A Tree and Forest Based Method
0 stars 0 forks source link

How to get accuracy for simulation #1

Closed Jamiepark816 closed 2 years ago

Jamiepark816 commented 3 years ago

Hello, I'm Jamie from Severance hospital in South Korea. I'm majored in biostatistics and came across your article "Depth importance in precision medicine (DIPM): a tree- and forest-based method for right-censored survival outcomes". I've been interested in the DIPM method and I did several simulations by following examples in R documentation.

I wonder how you validated the accuracy of simulation in the article. I'd like to know how to confirm "X1" is selected at the first split in each scenarios. (As you know, "X1" is assumed as an important variable in the article.) The thing is it's only possible to check it out via tree plots whether X1 is the first node or not. Could you let me know how I calculate proportions of 500 simulation runs where the X1 is selected first using 'dipm' function in R? Should I just have to count via 500 plots? I'm looking forward to hearing from you!

Thank you. by. Jamie

chenvict commented 3 years ago

Dear Jamie,

Thank you for your question!

Another way to check the variable selected at the first split is to extract that information from the tree object.

For example, if tree2=dipm(...), then tree2$splitvar[1] should give you the first split variable.

This step could be performed for each simulation run, and if the splitvar values are saved in a vector, the proportion could be obtained by summarizing the vector.

Hope this helps!

Best, Victoria

On Tue, Sep 28, 2021 at 10:06 AM Jamiepark816 @.***> wrote:

Hello, I'm Jamie from Severance hospital in South Korea. I'm majored in biostatistics and came across your article "Depth importance in precision medicine (DIPM): a tree- and forest-based method for right-censored survival outcomes". I've been interested in the DIPM method and I did several simulations by following examples in R documentation.

I wonder how you validated the accuracy of simulation in the article. I'd like to know how to confirm "X1" is selected at the first split in each scenarios. (As you know, "X1" is assumed as an important variable in the article.) The thing is it's only possible to check it out via tree plots whether X1 is the first node or not. Could you let me know how I calculate proportions of 500 simulation runs where the X1 is selected first using 'dipm' function in R? Should I just have to count via 500 plots? I'm looking forward to hearing from you!

Thank you. by. Jamie

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/chenvict/dipm/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/APDCBOKTN5LSOWRW45UHXHDUEHDWFANCNFSM5E5QOQNQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Jamiepark816 commented 3 years ago

Dear Victoria,

I sincerely appreciate your prompt reply :)

As i attach images , they show there is a problem of not having results. I followed an example with a survival outcome variable and two treatment groups in R documentation and tried to code you mentioned forward, but it resulted in "NULL". I couldn't extract any information from the tree object :( Could you check it out again?

as1 as2

Thank you as always!

by. Jamie.

chenvict commented 3 years ago

Dear Jamie,

Perhaps try using the "capture.output()" and "scan()" functions in R?

For example:

fit a dipm classification tree

z=capture.output(tree1=dipm(Y~treatment | .,data,mtry=1,maxdepth=3)) split1=scan(text=z[2], what="")[3] split1

Best, Victoria

On Sat, Oct 2, 2021 at 9:02 AM Jamiepark816 @.***> wrote:

Dear Victoria,

I sincerely appreciate your prompt reply :)

As i attach images , they show there is a problem of not having results. I followed an example with a survival outcome variable and two treatment groups in R documentation and tried to code you mentioned forward, but it resulted in "NULL". I couldn't extract any information from the tree object :( Could you check it out again?

[image: as1] https://user-images.githubusercontent.com/91548630/135716938-6b18cfcc-6fef-4151-a63f-a6663192e13c.JPG [image: as2] https://user-images.githubusercontent.com/91548630/135716939-0848d669-d75d-4dd9-b774-db60521f95f5.JPG

Thank you as always!

by. Jamie.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/chenvict/dipm/issues/1#issuecomment-932748838, or unsubscribe https://github.com/notifications/unsubscribe-auth/APDCBONUDHOV2RHQVRBM363UE37HVANCNFSM5E5QOQNQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Jamiepark816 commented 3 years ago

Dear Victoria,

It works now! I really appreciate your reply.

Thank you 😊 by. Jamie.