Displaying 20 results from an estimated 400 matches similar to: "AHRQ - Creation of Comorbidity Variables"
2010 Mar 25
0
Counting a number of "elements" in an object
I apologize if this has been answered. I have researched this to the best of
my ability, that's not to say the answer isn't in the archives just I am a
new user and I don't know the proper terms to search under.
I have an object:
f <- mpr100 ~ time + nhb + hispanic + other +
rural + hrural +
factor(age) + factor(gender) +
2010 Mar 25
3
Returning Data Frame from Function for use Outside Function
I have a function (see below) that does some bootstrapping (I am happy to
expand offline why I could use existing functions.) I put my results into
and empty matrix and add a row of results with each iteration. My problem is
i am a new user to R and I don't understand data frames, matrices, elements,
and vectors well. What I would like is to have a data frame I can manipulate
outside of the
2012 Apr 08
0
Need help interpreting output from rcorrp.cens with Cox regression
Dear R-listers,
I am an MD and clinical epidemiologist developing a measure of comorbidity severity for patients with liver disease. Having developed my comorbidity score as the linear predictor from a Cox regression model I want to compare the discriminative ability of my comorbidity measure with the "old" comorbidity measure, Charlson's Comorbidity Index. I have nearly 10,000
2012 Aug 17
0
REPOST: Need help interpreting output from rcorrp.cens with Cox regression
I am reposting my message from April 8th because I never received a response to the original post:
Dear R-listers,
I am an MD and clinical epidemiologist developing a measure of comorbidity severity for patients with liver disease. Having developed my comorbidity score as the linear predictor from a Cox regression model I want to compare the discriminative ability of my comorbidity measure with
2005 Oct 01
1
help with loading National Comorbidity Survey
I downloaded data from
http://www.hcp.med.harvard.edu/ncs/
Which provides data in DTA (STATA), XPT (SAS), and POR (SPSS) formats all
of which I have tried to read with the foreign package but I am not able to
load any of them. I have 2 gb of RAM, but R crashes when the memory gets
just over 1 GB. I am using Windows version 2.1.1. The size of the DTA file
is 48 MB; the xpt file is 188
2006 Jun 29
0
Sortables question
Hello,
I am new to Scriptaculous, and was recently brought into a project using
it to create an email Newsletter builder. The idea is that the user
will have lists of elements that he can add to the email page by
dragging the element he wants to add from an "available sections"
container, to a "loaded sections" container. Dragging from the loaded
to available will
2013 Apr 30
0
Fastbw() function: grouping of variables
Dear R users,
For the purpose of validating a prediction model using validate() from the rms package, I am running into some trouble with using the fastbw() function breaking up natural groups of variables.
Is there any way I can specify to keep certain variable together? In particular, if interactions are included I would also like to keep the main effects in the model.
Another example is a
1998 Oct 19
1
domain_master_node_status_fail: ... Cannot sync browser lists.
This looks like a bug to me, except . . . no one else seems to have
encountered it, and it's in a pretty basic area, so there must be
something wrong at our site.
When the Unix server becomes a local master browser, Samba is unable
to sync its browse list w/that of the DMB. None of our NT machines
are having any trouble, and our tech. support guy says the DMB is in
good health. Rebooting
2004 Jul 23
2
Complex Surveys...Specifying Design
I need some guidance from someone who is familiar/has some experience with
the survey package.
The data that I am using is from the Medical Expenditure Panel Survey
(www.meps.ahrq.gov <http://www.meps.ahrq.gov/> ). The STRATA and PSU
variables are varstr01 and varpsu01 respectively. When I try to specify
them with the svydesign function I get an error message. An excerpt of my
session
2003 May 07
2
"Program" files
Is there any such thing as a program file in R? That is, is it possible to
compile and save code for performing data management and analytic tasks for
a given project into a single/multiple file(s) (i.e., like a script file
(S-Plus), a do file (STATA), or a *.sas file (SAS))?
Any words of wisdom or a point in the direction of some documentation would
be helpful. If it is not possible to work
2003 Apr 24
3
Detailed contingency tables
Is there any existing function for creating contingency tables that will
display counts, row, column, and cell percentages in the same
tables....anything similar to crosstabs in S?
Marc W. Zodet, MS
Health Statistician
Center for Cost and Financing Studies
Division of Statistical Research and Methods
2101 East Jefferson Street, Suite 500
Rockville, Maryland 20852
Phone: 301-594-7072
Fax:
2004 Apr 14
1
Variable Descriptors
Is there a way to associate text descriptions with variables in a
data.frame?
For example...
Let's say that in my data.frame I have a variable named var1. var1
represents the responses to the question "When was the last time you saw
your physician?" When I tabulate the variable var1 I'd like the output to
be a bit more descriptive and contain the more descriptive
2003 Sep 30
1
Stepwise procedures
Is there a function in R which performs stepwise estimation in ways similar
to SAS/STATA (i.e., allows the analyst to specify the significance levels
for removal/addition of terms).
I've been asked to evaluate two final models: one resulting from a
backwards selection in R (stepAIC) and one resulting from a backwards
selection using PROC LOGISTIC in SAS. The final terms are slightly
2003 Nov 25
3
weighted mean
How do I go about generating a WEIGHTED mean (and standard error) of a
variable (e.g., expenditures) for each level of a categorical variable
(e.g., geographic region)? I'm looking for something comparable to PROC
MEANS in SAS with both a class and weight statement.
Thanks.
Marc
[[alternative HTML version deleted]]
2009 Feb 26
9
Inefficiency of SAS Programming
If anyone wants to see a prime example of how inefficient it is to
program in SAS, take a look at the SAS programs provided by the US
Agency for Healthcare Research and Quality for risk adjusting and
reporting for hospital outcomes at
http://www.qualityindicators.ahrq.gov/software.htm . The PSSASP3.SAS
program is a prime example. Look at how you do a vector product in the
SAS macro
2007 Jun 26
1
Subscripting specified variables in a function
I'm trying to create a function which will allow me to subset a data set
based on values of various specified variables. I also want to then
apply some other function(s) (e.g., summary).
This is what I've tried so far....
> test.fx <- function(dta, expvar, expval) {
+ newdta <- subset(dta, eval(expvar)>expval)
+ summary(newdta$eval(expvar))
+ }
>
>
2005 Apr 14
0
predict.glm(..., type="response") dropping names (and a propsed (PR#7792)
Here's a patch that should make predict.glm(..., type="response") retain the
names. The change passes make check on our Opteron running SLES9. One
simple test is:
names(predict(glm(y ~ x, family=binomial,
data=data.frame(y=c(1, 0, 1, 0), x=c(1, 1, 0, 0))),
newdata=data.frame(x=c(0, 0.5, 1)), type="response"))
which gives
[1]
2005 Dec 20
0
pmin(), pmax() - slower than necessary for common cases
A few hours ago, I was making a small point on the R-SIG-robust
mailing list on the point that ifelse() was not too efficient
in a situation where pmax() could easily be used instead.
However, this has reminded me of some timing experiments that I
did 13 years ago with S-plus -- where I found that pmin() /
pmax() were really relatively slow for the most common case
where they are used with only
2003 Sep 11
2
Sorting
What is the best way to sort a dataframe?
For example, how would I go about sorting a dataframe (with variables V1-V5)
by ascending V1, V2 and descending V3 while retaining V4 and V5.
Also, is there a relatively easy way by which to re-order my columns?
Thank you for your time.
Marc
Marc Zodet
[[alternative HTML version deleted]]
2015 Dec 24
0
override pmin/pmax for my own matrix
Yes, functions like c, min and max are special cases, as they are
primitives. For ordinary functions, you just need to promote them with
"..." as the signature:
setGeneric("pmax", signature="...")
setMethod("pmax", "Class", function(..., na.rm=FALSE) { })
One caveat is that all arguments passed via "..." must derive from the
class