Displaying 20 results from an estimated 900 matches similar to: ""Program" files"
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 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 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 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
2013 Jul 24
2
[LLVMdev] Program compiled with Clang -pg and -O crashes with SEGFAULT
Hi,
I am trying to compile a simple program with Clang 3.3 on Linux and used -pg and -O2 option. The program would crash with segfault. Interestingly if I compile it with -pg option only it works. Do you have any idea why it crashes? And any workaround?
$ cat myprog.c
int main() {
return 0;
}
$ clang -v -pg -O2 myprog.c
clang version 3.3 (tags/RELEASE_33/final)
Target:
2020 Nov 11
4
crontab query
I need to schedule a process/program every hour on the hour between 9am
and 4pm on the 2nd through the 9th of each month except on Saturday and
Sunday.? So, I tried this entry:
0 9-16 2-9 * 1-5 ./myprog.sh
Unfortunately it runs outside of the 2nd through the 9th and still runs
on Sat. through Sun.
Is there a way to do this (outside the program itself)?
-Frank
2010 Aug 12
2
Is oprofile still working?
Hi all,
Is anyone using oprofile?
I'm getting segfaults from opreport at the moment, and I'm not sure if
it is opreport, or just me.
In case it is something just plain daft I am doing, here is how it goes:
opcontrol --reset
opcontrol --setup --no-vmlinux
opcontrol --start
... now I run my program, /tmp/myprog ...
opcontrol --dump
opcontrol --shutdown
then I run,
opreport -l
2013 Jul 24
0
[LLVMdev] Program compiled with Clang -pg and -O crashes with SEGFAULT
Hi Qiao,
On 24/07/13 08:23, Qiao Yang wrote:
> Hi,
>
> I am trying to compile a simple program with Clang 3.3 on Linux and used -pg and -O2 option. The program would crash with segfault. Interestingly if I compile it with -pg option only it works. Do you have any idea why it crashes? And any workaround?
>
> $ cat myprog.c
> int main() {
> return 0;
> }
>
> $
2004 Mar 31
2
functions & paths
Hi,
I have a couple of quick questions regarding R.
1) I have a ".First" function that automatically loads the quadprog package into the workspace. The .First function resides in R and is only saved if I save the workspace. The exact function is as follows:
.First<-function()
{
library(quadprog)
}
Is there any way that this function can be saved outside of R? That is, is there
2018 Jul 13
3
Super-verbose failure mode for FileCheck
Hi All,
FileCheck is a great tool for writing tests.
However, it can be also a great tool for hiding the error cause from you, especially if a very common idiom
RUN: ./myprog | FileCheck %s
is used.
If you need to know the output of “myprog” to figure out why your test is failing — then well, good luck,
you would need to manually copy’n paste that line, run it, and then note the output.