Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Stata and R


From   "Frank Peter" <[email protected]>
To   [email protected]
Subject   Re: st: Stata and R
Date   Thu, 27 Aug 2009 01:44:32 -0400

Dear All,

This is to thank everybody for all their answers, I have really learn a lot from the answers.

I was trying to generate cost-effectiveness acceptability curve. The R codes I was referring to were:
========================================
ceac = c()
denom  = length(effectiveness)
for  (n in 1000) {
  INB = effectiveness*n - cost
  ProbCE = length(subset(INB, INB>=0))/denom
  ceac = rbind(ceac, c(n, INB))
}
========================================

Thanks

Frank
reference:
Fenwick E, Marshall DA, Levy AR, Nichol G.     Using and interpreting cost-effectiveness acceptability curves: an example using data from a trial of management strategies for atrial fibrillation. BMC Health Serv Res. 2006 Apr 19;6:52. (http://www.biomedcentral.com/1472-6963/6/52)

-------- Original Message --------
From: Neil Shephard <[email protected]>
Apparently from: [email protected]
To: [email protected]
Subject: Re: st: Stata and R
Date: Wed, 26 Aug 2009 15:53:20 +0100

> On Wed, Aug 26, 2009 at 3:44 PM, Nick Cox<[email protected]> wrote:
> > Nothing in R restricts the idea of length to time series.
> >
> 
> Indeed, from ?length...
> 
> length                 package:base                 R Documentation
> 
> Length of an Object
> 
> Description:
> 
>      Get or set the length of vectors (including lists) and factors,
>      and of any other R object for which a method has been defined.
> 
> Usage:
> 
>      length(x)
>      length(x) <- value
> 
> Arguments:
> 
>        x: an R object.  For replacement, a vector or factor.
> 
>    value: an integer.
> 
> Details:
> .....
> 
> 
> -- 
> "The combination of some data and an aching desire for an answer does
> not ensure that a reasonable answer can be extracted from a given body
> of data." ~ John Tukey (1986), "Sunset salvo". The American
> Statistician 40(1).
> 
> Email - [email protected]
> Website - http://slack.ser.man.ac.uk/
> Photos - http://www.flickr.com/photos/slackline/
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index