similar to: Getting code for functions

Displaying 20 results from an estimated 6000 matches similar to: "Getting code for functions"

2003 Sep 05
3
Dotchart question
Sorry to keep asking elementary questions......I appreciate the help. I am trying to create a dotchart with the rows sorted according to the values, rather than the labels. When I try prof <- c('Accountant', 'Administrative assistant', 'Garment worker', 'Cook', 'Dentist', 'General practictioner', 'Graduate student', 'High level
2002 Jan 30
1
mosaicplot(formula, data)--- bugged?
I have been tinkering with mosaicplot() and friends as a way of learning R. As part of this, I've written a pair.table() method for mosaic matrices, and would like to extend mosaicplot to work with loglin and logln (MASS) objects. I'm using R 1.4.0 on Win 98. I've been trying to figure out the formula interface, and think there's a bug, but not sure how to find it, yet alone fix
2002 Apr 26
4
SAS and R
Hello I am sure this is elementary, but I can't figure it out..... I am using SAS v8.2 and R 1.4.1 on a Windows platform. I have a large (6 megabyte) file in .sd2 format. I want to import it into R. If necessary, I can create a smaller file, as I don't need all the variables that are in this file I downloaded the package foreign. I then tried to use PROC CPORT in SAS to create a
2003 Aug 26
2
Simple simulation in R
Hello all I have a feeling this is very simple......but I am not sure how to do it My boss has two variables, one is an average of 4 numbers, the other is an average of 3 of those numbers i.e var1 = (X1 + X2 + X3 + X4)/4 var2 = (X1 + X2 + X3)/3 all of the X variables are supposed to be measuring similar constructs not surprisingly, these are highly correlated (r = .98), the question is how
2003 Nov 08
2
Effects of rounding on regression
Does anyone know of research on the effects of rounding on regression? e.g., when you ask people "How often have you _______?" you are more likely to get answers like 100, 200, etc. than 98, 203, etc. I'm interested in investigating this, but don't want to reinvent the wheel. thanks Peter Peter L. Flom, PhD Assistant Director, Statistics and Data Analysis Core Center for
2003 Oct 29
2
Where is rmutil package?
Pursing my earlier question, when I tried loading Lindsey's gnlm, I got a message Loading required package: rmutil Warning message: There is no package called 'rmutil' in: library(package, character.only = TRUE, logical = TRUE, warn.conflicts = warn.conflicts, According to the R documentation http://finzi.psych.upenn.edu/R/doc/html/packages.html rmutil is in the standard
2003 Oct 01
3
sas.get problem
When I try citypro <- sas.get('c:/ndri/cvar/data', member = 'citypro2') I get the following errors and warnings: 'sas' is not recognized as an internal or external command, operable program or batch file. 'less' is not recognized as an internal or external command, operable program or batch file. Error in sas.get("c:/ndri/cvar/data", member =
2006 Mar 28
2
Welch test for equality of variance
Hello Using R 2.2.1 on a Windows machine. Has anyone programmed the Welch test for equality of variances? I tried RSiteSearch, but this gave references to t test and oneway.test, which are not quite what I need.....I need the Welch test itself, for use in a meta-analysis (to determine if variances are equal). TIA Peter Peter L. Flom, PhD Assistant Director, Statistics and Data Analysis
2003 Sep 08
2
Yet another beginner question
Thanks for all the help on my earlier questions..... How do you plot a simple time series with unequal intervals? I have the following dateofpoll <- as.ts(c("6/1/02", "7/1/02", "10/1/02", "1/4/03", "1/25/03", "6/7/03", "7/16/03", "8/17/03", "9/4/03")) reelect <- c(51, 47, 49, 51, 49, 49, 46, 45, 40)
2004 Jun 09
3
Dot chart question
Running R 1.8.1 on a Windows machine In dotchart, I would like to shrink the labels on the tick marks (that is, the numbers) without shrinking anything else. I could not find this in either the Rhelp archives or in ?dotchart, which recmmends cex to avoid 'label overlap', but cex shrinks all the characters in the plot. Is there a way to do this? Thanks Peter Peter L. Flom, PhD
2005 Mar 30
1
fastbw question
Hello I am running R 2.0.1 on Windows, I am attempting to use Frank Harrell's 'fastbw' function (from the Design library), but I get an error that the fit was not created with a Design library fitting function; yet when I go to the help for fastbw (and also look in Frank's book Regression Modeling Strategies) it appears that fastbw should work with a model created with lm.....
2004 Mar 04
1
Resolution of problem re location polr and of MASS
First, my apologies for not giving all the details in my first post. Second, the problem was somewhat more complicated than simply using help.search('polr') or library(MASS). When I tried these, I got notices that polr could not be found anywhere, and that no package called MASS existed. When I went to the CRAN site, there was no package called MASS. I am not sure how I installed R
2004 Jun 28
1
RMysql installation problem.
Hi! I am trying to install the RMySQL package. The installation stops with the following error message. path to mysql is set. setenv PKG_CPPFLAGS /home/arabidopsis/software/R1.9.1/linux/mysql/include setenv PKG_LIBS /home/arabidopsis/software/R1.9.1/linux/mysql/lib R CMD INSTALL RMySQL_0.5-5.tar.gz #....cut cut. creating src/Makevars ** libs gcc
2004 Oct 08
1
polr and optim question
Hello again I am trying to fit an ordinal logistic model using the polr function from MASS. When I run model.loan.ordinal <- polr(loancat~age + sex + racgp + yrseduc + needlchg + gallery + sniffball + smokeball + sniffher + smokeher + nicocaine + inject + poly(year.of.int,3) + druginj + inj.years) I get an error Error in optim(start, fmin, gmin, method = "BFGS", hessian =
2004 Oct 19
1
Fatal error: invalid home drive
Dear R-helpers, I have just installed R2.0.0 onto my machine which already had R1.9.1 present. I then tried to add to R2.0.0 a library called GLMM written by James McBroom for R1.6.0. Unfortunately, R2.0.0 does not recognise the library, even though R1.9.1 does. This is not because I have used the wrong case in the call to the library: > library('GLMM') > "Error in
2003 Sep 04
1
scatter.smooth error
Hello When I run scatter.smooth(jitter(weight), jitter(height2), span = .25, evaluation = 50, pch = '.') I get the type of graph I thought I would get, but also a warning..... k-d tree limited by memory. ncmax= 528 I always get concerned when there are warnings I don't understand. What's a k-d tree? Is this something to be concerned about? Thanks Peter Peter L. Flom,
2003 Jul 15
1
Tree question
I was under the impression that the tree method (e.g. as implemented in rpart) was insensitive to monotonic transformations of the dependent variable. e.g. Breiman Olshen et al. Classification and Regression Trees state "In a standard data structure [a tree] is invariant under all monotone transformations of individual ordered varaibles" (p. 57) However, I get very different results
2004 Mar 03
7
Location of polr function
Hello I am running R 1.8.1 on a Windows platform I am attempting to fit an ordinal logistic regression model, using the polr function, as described in Venables and Ripley. But when I try model4 <- polr(ypsxcat~committed + as.factor(sex) + as.factor(drugusey) + anycsw + as.factor(sex)*committed + as.factor(sex)*as.factor(drugusey)+as.factor(sex)*anycsw, data = duhray) I get a message
2004 Oct 09
2
polr problem solved
I'd like to thank John Fox and Chuck Cleland for their help in resovling this issue. It turned out to be something simple, but perhaps others have had similar problems In my original data frame, I had 4 categories of race/ethnicity. One of the categories (other) was very small, and not similar to any of the other three categories, so I created a new data frame deleting those people.
2003 Oct 29
1
One inflated Poisson or Negative Binomal regression
Hello I am interested in Poisson or (ideally) Negative Binomial regression with an inflated number of 1 responses I have seen JK Lindsey's fmr function in the gnlm library, which fits zero inflated Poisson (ZIP) or zero inflated negative binomial regression, but the help file states that for ' Poisson or related distributions the mixture involves the zero category'. I had thought