Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • TSA - STATA-R directories

    I'm trying to run a Trial Sequential analysis as reported by https://journals.sagepub.com/doi/pdf...867X1301300106
    Everything is installed and when I input the following command I get this error.
    Command : metacumbounds ln_hr se_ln_hr N, data(loghr) effect(r) id(study) surv(0.40) loss(0.00) alpha(0.05) beta(0.20) is(APIS) graph spending(1) rrr(.15) kprsrce(StataRsource.R) rdir(C:\Program Files\R\R-4.2.1\bin) shwRRR pos(10) xtitle(Information size)

    ERROR: R executable Rterm.exe not found in C:\Program Files\R\R-4.2.1\bin, cannot access R software
    yee
    file bounds.dta not found

    I found Rterm.exe and its directory is ok, I guess
    Any help how to overcome this issue?
    Thanks in advance for any advice
    Carlo
    Attached Files

  • #2
    Has anyone solved it? I also encounter this problem.

    Comment


    • #3
      I think I can your first question, you need to enter 'C:\Program Files\R\R-4.2.1\bin\' instead of 'C:\Program Files\R\R-4.2.1\bin' , that lacks a '\' . Unfortunately, I'm on the way finding the way how to solve the second question, It cannnot be found in any of my search engine. But I guess that 'bounds.dta' has some connections with 'metacumbounds '. Wish me good luck!

      Comment


      • #4
        will, now I try to change some part of the code instead of use the menu.
        'metacumbounds a b c d, data(count) effect(f) id(study) alpha(0.05) beta(0.20) is(AIS) stat(rr) graph spending(1) rrr(.15) listRin keepR kprsrce(StataR_source.R) rdir(D:\R\R-4.2.0\bin\x64\) listRout shwRRR pos(12) xtitle(Information size)'
        see?there's something different from yours.
        and I get some process in the whole program.
        but my English is poor, so maybe you can find the answer in these statements?
        I need to emphasize that, in these statements,'bounds.dta'''exist! so we are closer to the truth!

        Isquare = 0.00%

        --------------------R Source file---------------------
        library(ldbounds)
        library(foreign)
        setwd("D:\\Stata14\\Stata14")
        t <- c(.022944550961256, .069471001625061, .1854684501886368, .3817718327045441,
        > 1)
        obf.bd <- bounds( t, iuse = 1, alpha = .025)
        obf = data.frame( t_bd = obf.bd$time, UB_bd = obf.bd$upper.bounds)
        write.dta(obf,"bounds.dta")

        ----------------End of R Source file------------------
        -------------- R output --------------------

        R version 4.2.0 (2022-04-22 ucrt) -- "Vigorous Calisthenics"
        Copyright (C) 2022 The R Foundation for Statistical Computing
        Platform: x86_64-w64-mingw32/x64 (64-bit)

        R is free software and comes with ABSOLUTELY NO WARRANTY.
        You are welcome to redistribute it under certain conditions.
        Type 'license()' or 'licence()' for distribution details.

        Natural language support but running in an English locale

        R is a collaborative project with many contributors.
        Type 'contributors()' for more information and
        'citation()' on how to cite R or R packages in publications.

        Type 'demo()' for some demos, 'help()' for on-line help, or
        'help.start()' for an HTML browser interface to help.
        Type 'q()' to quit R.

        > library(ldbounds)
        > library(foreign)
        > setwd("D:\\Stata14\\Stata14")
        > t <- c(.022944550961256, .069471001625061, .1854684501886368, .381771832704544
        > 1, 1)
        > obf.bd <- bounds( t, iuse = 1, alpha = .025)
        ----------- end of R output ----------------

        Comment

        Working...
        X