similar to: Variable Descriptors

Displaying 20 results from an estimated 700 matches similar to: "Variable Descriptors"

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 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:
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 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
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)) + } > >
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]]
2003 Sep 17
3
3D plot/surface rotation
How do I rotate 3D plots/surfaces generated by either cloud or wireframe? Thanks. Marc Marc W. Zodet, MS Health Statistician Agency for Healthcare Research and Quality [[alternative HTML version deleted]]
2006 Sep 20
1
Simulation help
I'm trying to simulate trend data over a five year period. I want different trend profiles...the simplest being a linear trend. I've been using the following code: patBdta1 <- NULL for(i in 1:100) patBdta1 <- rbind(patBdta1,c(yr1= mean(rbinom(50,1,.50)), yr2 =mean(rbinom(50,1,.51)), yr3 =mean(rbinom(50,1,.52)),
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]]
2003 Jun 18
2
Forward stepwise procedure w/ stepAIC
I'm attempting to select a model using stepAIC. I want to use a forward selection procedure. I have specified a "scope" option, but must not be understanding how this works. My results indicate that the procedure begins and ends with the "full" model (i.e., all 17 independent variables)...not what I expected. Could someone please point out what I'm not
2006 Sep 07
1
Running/submitting script files
All: Is there any way to run an R script file (i.e., *.R) from the command prompt in the console window. Ultimately, I'm looking to put such code in a script file so that it can set off other R scripts/programs as needed. Thanks. Marc [[alternative HTML version deleted]]
2003 Jun 18
1
3-way Interactions w/ stepAIC
I'm attempting to use stepAIC to select a model through a forward procedure. I want to consider up to all 3-way interactions. I've attempted to use the following code: m2.Fwd3way <- stepAIC(m1.Ionly, direction="forward", scope=list(upper=~(var1 + var2 + var3 + var4)^3, lower=~1)) When I submit this the trace indicates that only 2-way
2010 Aug 18
1
svyquantile w/ svyby is returning an error
svymean w/ svyby is working for me... > svyby(~visitcnt, ~agegrp3.f, svymean, design=svydes) agegrp3.f visitcnt se.visitcnt 18-44 18-44 8.755552 0.4953235 45-64 45-64 10.131555 0.5347806 65+ 65+ 9.588802 0.4323629 svyquantile is working for me... > svyquantile(~visitcnt, quantiles=c(.25, .5, .75), ties="rounded", design=svydes) 0.25
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 Dec 27
4
Conditionally incrementing a loop counter
Hi, I am trying a for loop from 1 to 100 by 1. However, if a condition does not get met, I want to "throw away" that iteration. So if my loop is for (i in 1:100) and i is say, 25 and the condition is not met then I don't want i to go up to 26. Is there a way to do that? I can't seem to manually adjust i because from what I understand, R creates 100 long vector and uses that to
2010 Sep 07
0
AHRQ - Creation of Comorbidity Variables
If there are any other users who use AHRQ's SAS code comoanaly2010 and comformat2010 to create comorbidity variables, I thought you might be interested in the following PRELIM code we wrote to mimic its functionality in R. It seems to yield similar results, but may contain errors. Please feel free to comment (kindly) or enhance. I'm sure there are better ways to skin this cat, but we at
2007 Nov 16
1
How to save multiple graphs into a single file
Hi, I have searched the archives and help manuals and can not find anything regarding how to save multiple plots/graphs into a single for example, pdf file. There is plenty of discussion etc. about saving a single plot to a single file, but not multiple plots to a single file. Is it possible? I can't want to use lattice, because I have hundreds of plots. So, to keep it simple, let's say
2011 Aug 19
1
Writing non-graphic (text) output to PDF
Hi, friends. I keep coming to you because I'm so new to R and can't seem to figure out some simple things. Sorry. Consider the following code. I want to load a table and write out the structure to a PDF document. I just can't seem to manage writing non-graphic output to PDF. Any help? I've tried several functions, but nothing worked. All I get is the title. #
2003 Jun 06
4
Introductory Resources
>I am interested in R as an alternative for a statistical tool >at our firm. Ditto... I have recently moved to this agency from a company where I had access to Splus. There is also a coworker here who had used Splus at a previous employer. We both would like some access to the S language. We are considering either begging loud and long to try to get the agency to purchase two copies of
2011 Aug 04
1
labelling a stacked barchart (lattice)
All: Below is my code for creating a basic horizontal, stacked barchart. I'd like to label the plot in two ways: 1) place the x values in each piece and 2) place the y values above each piece (angled). I'm currently using lattice, but I'm open to suggestions using ggplot2. Questions: 1. Can this be done?...I assume yes. So, what are the best options/functions for doing this. 2.