similar to: problem with substitute

Displaying 20 results from an estimated 1000 matches similar to: "problem with substitute"

2006 Mar 26
1
Newbie clustering/classification question
My laboratory is measuring the abundance of various proteins in the blood from either healthy individuals or from individuals with various diseases. I would like to determine which proteins, if any, have significantly different abundances between the healthy and diseased individuals. Currently, one of my colleagues is performing an ANOVA on each protein with MS Excel. I would like to analyze
2001 Jul 28
2
Re: [S] Labels wrong with lrm
Dear Jan, Thank you very much for your excellent description of the problem and the self-contained test code. This is a problem that I've been meaning to either document better or solve for some time. The root of the problem is with the builtin S-Plus terms.inner function: > attr(terms.inner(asthma ~ pol(age,kx) + smok),'variables') expression(age, kx, smok) You can see that
2003 Apr 24
4
problems with max.col()
Hello, I think the following qualify as a bug given: x<-c(1,2,3,4,2,4,2,2,4,2,2,2,4,3,2,1) z<-embed(x,4) z [,1] [,2] [,3] [,4] [1,] 4 3 2 1 [2,] 2 4 3 2 [3,] 4 2 4 3 [4,] 2 4 2 4 [5,] 2 2 4 2 [6,] 4 2 2 4 [7,] 2 4 2 2 [8,] 2 2 4 2 [9,] 2 2 2 4 [10,] 4 2 2 2
2003 Apr 24
4
problems with max.col()
Hello, I think the following qualify as a bug given: x<-c(1,2,3,4,2,4,2,2,4,2,2,2,4,3,2,1) z<-embed(x,4) z [,1] [,2] [,3] [,4] [1,] 4 3 2 1 [2,] 2 4 3 2 [3,] 4 2 4 3 [4,] 2 4 2 4 [5,] 2 2 4 2 [6,] 4 2 2 4 [7,] 2 4 2 2 [8,] 2 2 4 2 [9,] 2 2 2 4 [10,] 4 2 2 2
2001 Dec 12
1
again evaluations
Hello, I wrote the following function to compute multiple comparisons in a one way anova and randomized blocks anova. aov1 <- function(y,g,s=NULL,comp="mca",meth="Sidak") { # fun <- function(x) c(mean(x,na.rm=T),sd(x,na.rm=T),length(x[!is.na(x)])) # li <- length(unique(g)) cat(" Analysis of Variance with Multiple comparisons\n\n") cat("
2010 Mar 12
2
unknown compression
Hello, I am trying to modify some functions in an existing package. I can get a function by just typing the name in the console, but how can I get all the functions in a package? the ./R/ subdirectory has files xx.rdb and xx.rdx which I can not decompress with 7-zip or with unzip, unrar etc. The help files are compressed with gzip in the ./man/ folder and can be unzipped easily. Thanks for your
2012 Jul 31
2
help with a regression
Hello, I have a data frame with the following variables: ID, X1,X2,X3,X4,X5,Y1,Y2,Y3,Y4,Y5 and some other that do not matter, some of the X and Y can be missing (NA). I want to compute the slope of the linear regression Y ~ X for each subject, so using apply(DF,1,FUN,ra.rm=TRUE) now How do I define FUN? The X are different for each subject. Thanks for any help R.Heberto Ghezzo Ph.D. Montreal -
2012 Aug 01
3
help with a regression problem
Hello, I have a big data frame where consecutive time dates and corresponding observed values for each subject (ID) are on a line. I want to compute the linear slope for each subject. I would like to use apply but I do not know how to express the corresponding function. An example using a loop follows # # create dummy data set There are missing values a <- c(1,2,3,4, 1,1,1,1, 2,2,3,3,
2003 Jan 29
3
na.rm in sd()
Hello, I think this qualify as a bug > x<-c(1,2,3,4,NA,6,7) > mean(x) [1] NA > mean(x,na.rm=T) [1] 3.833333 > sd(x) Error in var(as.vector(x)) : missing observations in cov/cor > sd(x,na.rm=T) Error in sd(x, na.rm = T) : unused argument(s) (na.rm ...) > var(x) Error in var(x) : missing observations in cov/cor > var(x,na.rm=T) [1] 5.366667 > why sd() does not
2009 May 27
3
R in Ubunto
Hello , I do not know anything abount Ubunto, but I found a Portable Ubunto for Windows and since so many people prefer Linux to Windows I decided to give it a try. It runs very nicely, so I tried to load R, following Instructions in CRAN I added the line deb http://probability.ca/cran/bin/linux/ubuntu hardy/ to /etc/apt/sources.list and then from a console I did sudo apt-get update sudo apt-get
2011 Mar 01
2
problems with playwith
hello, i tried to run playwith but : > library(playwith) Loading required package: lattice Loading required package: cairoDevice Loading required package: gWidgetsRGtk2 Loading required package: gWidgets Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'H:/R/cran/RGtk2/libs/i386/RGtk2.dll': LoadLibrary failure: The specified procedure could
2010 May 24
2
How to set parameters constraints in a function?
Dear R list, I have a function specifying my log-likelihood, and now I need to set the constraint that *alpha > kappa*, could anyone help me with setting this in my function? the function is defined as follows: mll <- function(param){ n <- length(x) psi <- numeric(n) psi[1] <- 1.0 a0 <- exp(param[1]); a1 <-exp(param[2]); b1 <- exp(param[3]); *alpha *<-
2009 Aug 12
1
MCMC sampling question
Hello, Consider MCMC sampling with metropolis / metropolis hastings proposals and a density function with a given valid parameter space. How are MCMC proposals performed if the parameter could be located at the very extreme of the parameter space, or even 'beyond that' ? Example to express it and my very nontechnical 'beyond that': The von Mises distribution is a circular
2011 Jun 22
1
caret's Kappa for categorical resampling
Hello, When evaluating different learning methods for a categorization problem with the (really useful!) caret package, I'm getting confusing results from the Kappa computation. The data is about 20,000 rows and a few dozen columns, and the categories are quite asymmetrical, 4.1% in one category and 95.9% in the other. When I train a ctree model as: model <- train(dat.dts,
2000 Sep 13
2
minimization
Hi, I got a code from S that uses 'nlminb' to minimize a function with constraints. Is there a similar function in R? Thanks. R. Heberto Ghezzo Ph.D. Meakins-Christie Labs McGill University Montreal - Canada heberto at meakins.lan.mcgill.ca -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2007 Mar 22
3
Cohen's Kappa
Hi, im little bit confused about Cohen's Kappa and i should be look into the Kappa function code. Is the easy formula really wrong? kappa=agreement-chance/(1-chance) many thanks christian ############################################################################### true-negativ:7445 false-positive:3410 false-negativ:347 true-positiv:772 classification-aggrement:68,6%
2004 Feb 09
10
PhD student reading list, suggestions wanted
I've got a PhD student starting this year. She'll be working on data mining. She has asked for a reading list while she's still in her home country, which is a really good sign. Her cosupervisor and I don't (think we) have any problem with choosing things that are specifically about data mining, but there are some statistical ideas (sampling, exploratory-vs-confirmatory,
2006 Dec 11
1
cohen kappa for two-way table
Greetings, I am a bit confused by the results returned by the functions: cohen.kappa {concord} classAgreement {e1071} when using a two-way table. for example, if I have an matrix A, and a similar matrix B (same dimensions), then: matrix A and B can be found: http://casoilresource.lawr.ucdavis.edu/drupal/files/a_40.txt http://casoilresource.lawr.ucdavis.edu/drupal/files/b_40.txt A <-
2012 Oct 16
4
how to extract from list
Hi all, I have a list of 20000 data, and the list look like below. I wonder what is the simplest way to extract 'kappa' value (or 'xi' or 'alpha' for the matter) from each of the data. How can I simply code it without having to change the list to a dataframe first? Many thanks! $X19997 xi alpha kappa 784.7718640 165.4065141 -0.2709599 $X19998
2003 Jul 18
3
question about formulating a nls optimization
Dear list, I'm migrating a project from Matlab to R, and I'm facing a relatively complicated problem for nls. My objective function is below: >> objFun <- function(yEx,xEx,tEx,gamma,theta,kappa){ yTh <- pdfDY(xEx,tEx,gamma,theta,kappa) sum(log(yEx/yTh)^2) } The equation is yTh=P(xEx,tEx) + noise. I collect my data in: >> data <-