Re: [R] error using glmmML()

2011-06-21 Thread David Winsemius
On Jun 21, 2011, at 11:13 PM, Tom Kraft wrote: Dear all, This question is basic but I am stumped. After running the below, I receive the message: "non-integer #successes in a binomial glm!" model1 <- glmmML(y~Brood.Size*Density+Date.Placed+Species+Placed.Emerging+Year +rate.of.parperpl

Re: [R] please help for mgcv package

2011-06-21 Thread Joshua Wiley
On Tue, Jun 21, 2011 at 9:20 AM, Sarah Goslee wrote: > Hi, > > On Tue, Jun 21, 2011 at 11:27 AM, pigpigmeow wrote: >> i read a book from WOOD, there's an example which is talking about the >> pollutant. Read the text carefully!!! >> >> library(gamair) >> library(mgcv) > > data(chicago) # otherw

Re: [R] error while install RCurl

2011-06-21 Thread Prof Brian Ripley
On Tue, 21 Jun 2011, Baoqiang Cao wrote: Hi, I got an error when tried to install RCurl, here is what I did: R CMD INSTALL RCurl_1.6-6.tar.gz * installing to library ‘/home/b/R/i486-pc-linux-gnu-library/2.13’ * installing *source* package ‘RCurl’ ... checking for curl-config... no Cannot find

[R] error using glmmML()

2011-06-21 Thread Tom Kraft
Dear all, This question is basic but I am stumped. After running the below, I receive the message: "non-integer #successes in a binomial glm!" model1 <- glmmML(y~Brood.Size*Density+Date.Placed+Species+Placed.Emerging+Year+rate.of.parperplot, data = data, cluster= data$Patch, family=binomial(link=

[R] Saved EPS/PDF graphics not same as JPG/BMP graphics

2011-06-21 Thread John Kruschke
When I save a particular plot as JPG or BMP, the saved image is an accurate copy of that plot. But when I save the same plot as EPS or PDF, some text elements are incorrectly altered. An example is attached. Notice in the top middle and top right panels, the x-axis labels have correct subscript 1 i

Re: [R] spatial stats - geoR - variogram - standard deviation

2011-06-21 Thread ambroz
I'm having the same question. I ran several dozen gaussian simulations, then took sample with size from 50 to 1000. Using variog the stddev's on all bins in all variograms seem way to high. I am missing something here? I like the geoR syntax and structure! please reply... -- View this message

Re: [R] please help for mgcv package

2011-06-21 Thread pigpigmeow
b<-rep(0,n-11) for(i in 0:(11-10)) b<-b+a[(i+1):(n-11+i)] i don't know what does "rep" mean and for-loop! -- View this message in context: http://r.789695.n4.nabble.com/please-help-for-mgcv-package-tp3614485p3615861.html Sent from the R help mailing list archive at Nabble.com. __

[R] error while install RCurl

2011-06-21 Thread Baoqiang Cao
Hi, I got an error when tried to install RCurl, here is what I did: R CMD INSTALL RCurl_1.6-6.tar.gz * installing to library ‘/home/b/R/i486-pc-linux-gnu-library/2.13’ * installing *source* package ‘RCurl’ ... checking for curl-config... no Cannot find curl-config ERROR: configuration failed for

[R] Package warnings

2011-06-21 Thread steven mosher
Thanks to all your help I've just finished my first package and I have a couple of questions I want to submit to CRAN but I have 1 warning " checking for code/documentation mismatches ... WARNING Data sets with usage in documentation object 'FILE.PARAMETERS' but not in code: FILE.PARAMETE

Re: [R] Italic fontfaces on specific labels.

2011-06-21 Thread Bert Gunter
Use strip = strip.custom(...) in the xyplot call to alter the parameters of the function that produces the strips. In particular, see the par.strip.text argument of ?strip.default. Cheers, Bert On Tue, Jun 21, 2011 at 6:36 PM, Kenneth Roy Cabrera Torres wrote: > Hi R users: > > I want to have a

[R] Time-series analysis with treatment effects - statistical approach

2011-06-21 Thread J.Morgenroth
Hello all R listers, I'm struggling to select an appropriate statistical method for my data set. I have collected soil moisture measurements every hour for 2 years. There are 75 sensors taking these automated measurements, spread evenly across 4 treatments and a control. I'm not interested in being

[R] Italic fontfaces on specific labels.

2011-06-21 Thread Kenneth Roy Cabrera Torres
Hi R users: I want to have a italic font on the microorganism names, but not on the other labels. How can I do that? library(lattice) t<-rep(seq(0,20,5),2) logCFU<-c(2,2.5,3,4,4.5,1.5,2,2.5,3,3.4) microorg<-factor(rep(c("E. coli","L. monocytogenes"),each=5)) xyplot(logCFU~t|microorg,fontface="it

Re: [R] Hardy Weinberg

2011-06-21 Thread Jim Silverton
Hello all, I am interested in simulating 10,000 2 x 3 tables for SNPs data with the Hardy Weinberg formulation. Is there a quick way to do this? I am assuming that the minor allelle frequency is uniform in (0.05, 0.25). -- Thanks, Jim. [[alternative HTML version deleted]] _

Re: [R] converting character to numeric

2011-06-21 Thread Don McKenzie
Bill is right on both points. My longer clumsier code is for chickens who are afraid to change any more than they have to. Don McKenzie On 21-Jun-11, at 4:36 PM, wrote: The point I would make is that for safety it's much better to use FALSE rather than F. FALSE is a reserved word in R, F

Re: [R] converting character to numeric

2011-06-21 Thread Bill.Venables
The point I would make is that for safety it's much better to use FALSE rather than F. FALSE is a reserved word in R, F is a pre-set variable, but can easily be changed at any time by the user. Secondly, doesn't this do the same as yours: readFF.csv <- function(..., stringsAsFactors = FALSE)

Re: [R] par code help

2011-06-21 Thread sbarr2
You might try: text(xvals,-50,labels=speciesnames,cex=.7,xpd=T) You can also make the plot wider. There are a number of ways to do this. For example (on a mac): quartz(width=10,height=6) or simply stretch it On Tue, Jun 21, 2011 at 4:29 PM, Adrienne Keller wrote: > I am making a barplot using b

Re: [R] R Script Help!

2011-06-21 Thread Sarah Goslee
Hi, So is your actual question about how to prompt for user input, rather than anything about the SQL extraction or graphing? I think I would write the R code as a function that takes the four values as arguments. That's not the same as prompting the user, but more flexible and more R-ish. You

Re: [R] Tricky (?) conversion from data.frame to matrix where not all pairs exist

2011-06-21 Thread Marius Hofert
Thanks a lot! Works like charm :-))) Cheers, Marius On 2011-06-22, at 24:51 , Dennis Murphy wrote: > Ahhh...you want a matrix. xtabs() doesn't easily allow coercion to a > matrix object, so try this instead: > > library(reshape) > as.matrix(cast(df, year ~ block, fill = 0)) > a b c > 2000

Re: [R] Tricky (?) conversion from data.frame to matrix where not all pairs exist

2011-06-21 Thread Dennis Murphy
Ahhh...you want a matrix. xtabs() doesn't easily allow coercion to a matrix object, so try this instead: library(reshape) as.matrix(cast(df, year ~ block, fill = 0)) a b c 2000 1 0 5 2001 2 4 6 2002 3 0 0 Hopefully this is more helpful... Dennis On Tue, Jun 21, 2011 at 3:35 PM, Dennis Murph

Re: [R] converting character to numeric

2011-06-21 Thread Don McKenzie
I have to chime in here with a slight revision to read.csv(), for those of us like me who have whined over time about "stringsAsFactors". (tested on my machine macOSX 10.6) readFF.csv <- function (file, header = TRUE, sep = ",", quote = "\"", dec = ".", fill = TRUE, comment.char = "", ...)

Re: [R] par code help

2011-06-21 Thread David Winsemius
On Jun 21, 2011, at 4:29 PM, Adrienne Keller wrote: I am making a barplot using barplot2 from gplots where each bar represents a specific tree species. I have formatted the species names on the x-axis so that the genus name is above the species name and have then rotated the labels 45 degr

Re: [R] Item analysis

2011-06-21 Thread Trying To learn again
Hi I have tried the first version, it works. BUT I have an additional problem. I expose; The first I solved, I tried to execute on xx data.frame but I used a matrix wich columns I put name you see col.names=c("Date","Time","Tip") the thing was that I didn´t erase the name on the txt so the progra

Re: [R] Pulling data from remote MySQL database

2011-06-21 Thread HARROLD, Tim
Agree - I started with RMySQL but eventually changed over to RODBC when I realised some of the additional functionality it contains and the fact that I needed to access different types of RDBMSs (e.g. acquire data from a Microsoft access database file). Cheers, Tim -Original Message- F

Re: [R] Setting up list of many equations for systemfit

2011-06-21 Thread Denis Kazakiewicz
Why don't try as.formula() function On 22.06.2011 01:22, Rita Carreira wrote: Dear List Members,I am trying to set up a large system of equations and I am trying to find a simple way to set up the list command under the package system fit. Here is the example from system fit and what I am try

Re: [R] Tricky (?) conversion from data.frame to matrix where not allpairs exist

2011-06-21 Thread William Dunlap
Using a 2-column integer matrix of subscripts, a column of row indices and a column of corresponding column indices will do the job: > res <- matrix(0, nrow=3, ncol=3, dimnames=list(year, block)) > res[cbind(match(df$year,rownames(res)), match(df$block,colnames(res)))] <- df$value > res

Re: [R] Tricky (?) conversion from data.frame to matrix where not all pairs exist

2011-06-21 Thread Dennis Murphy
Hi: xtabs(value ~ year + block, data = df) block year a b c 2000 1 0 5 2001 2 4 6 2002 3 0 0 HTH, Dennis On Tue, Jun 21, 2011 at 3:13 PM, Marius Hofert wrote: > Dear expeRts, > > In the minimal example below, I have a data.frame containing three "blocks" > of years > (the years a

Re: [R] converting character to numeric

2011-06-21 Thread Denis Kazakiewicz
IMHO: 'as.numeric(as.character' is very reasonable suggestion On 22.06.2011 01:16, bill.venab...@csiro.au wrote: ..or something like that. Without more details it is hard to know just what is going on. Firstly in R the object is a 'data frame' (or object of class "data.frame" to be formal).

[R] Setting up list of many equations for systemfit

2011-06-21 Thread Rita Carreira
Dear List Members,I am trying to set up a large system of equations and I am trying to find a simple way to set up the list command under the package system fit. Here is the example from system fit and what I am trying to do: EQ1 <- Y1 ~ X1 + X2 + X4EQ2 <- Y2 ~ X2 + X3EQ3 <- Y3 ~ X2 + X3 + X4EQ

Re: [R] Pulling data from remote MySQL database

2011-06-21 Thread David A. Johnston
Hi Joseph, I know that the RMySQL and RODBC packages allow you to pull the result of a MySQL query into a data.frame within R. I like RODBC because you can access many different flavors of RDBMS's. -David Johnston -- View this message in context: http://r.789695.n4.nabble.com/Pulling-data-f

Re: [R] converting character to numeric

2011-06-21 Thread Bill.Venables
..or something like that. Without more details it is hard to know just what is going on. Firstly in R the object is a 'data frame' (or object of class "data.frame" to be formal). There is no standard object in R called a 'database'. If you read in your data using read.csv, then mydata is g

[R] Tricky (?) conversion from data.frame to matrix where not all pairs exist

2011-06-21 Thread Marius Hofert
Dear expeRts, In the minimal example below, I have a data.frame containing three "blocks" of years (the years are subsets of 2000 to 2002). For each year and block a certain "value" is given. I would like to create a matrix that has row names given by all years ("2000", "2001", "2002"), and c

Re: [R] and now a "cut" question

2011-06-21 Thread Bill.Venables
> con <- + textConnection("13053 13068 13068 13053 14853 14853 14850 14850 13053 13053 13068 13068 + ") > x <- scan(con) Read 12 items > > cut(x, 4) [1] (1.31e+04,1.35e+04] (1.31e+04,1.35e+04] (1.31e+04,1.35e+04] [4] (1.31e+04,1.35e+04] (1.44e+04,1.49e+04] (1.44e+04,1.49e+04] [7] (1.44e+04,1.

[R] "subscript out of bounds" error when trying to make heatmap

2011-06-21 Thread Vining, Kelly
I am having trouble outputting a presence/absence heatmap using the following R script: source("http://faculty.ucr.edu/~tgirke/Documents/R_BioCond/My_R_Scripts/overLapper.R";) I can generate the heatmap graphic. I just can't sort my columns without getting an error. The instructions I'm follow

Re: [R] omitting columns from a data frame

2011-06-21 Thread Bill.Venables
Suppose names(xm1) <- c("alpha", "beta", "gamma", "delta") then xm2 <- subset(xm1, select = alpha:gamma) or xm2 <- subset(xm1, select = -delta) will do the same job as xm1[, -4] -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of

Re: [R] ddply to count frequency of combinations

2011-06-21 Thread Hadley Wickham
> Here's a non plyr approach: > >> tab.df <- as.data.frame(table(df)) >> tab.df[tab.df$Freq > 0, ] >   x y Freq > 1  1 1    2 > 4  4 1    1 > 7  2 2    2 > 13 3 3    1 > 18 3 4    1 > 19 4 4    1 > 25 5 5    1 But look at str(tab.df) - x and y are now factors (or characters). I wrote count to avo

Re: [R] dynlm

2011-06-21 Thread apjaworski
Dave, I am not sure what you try to do, but I have a couple of thoughts: 1. Your t.hh is numerically identical to t.h, except the latter one is the time series. 2. I am guessing you want the same thing for t.d and t.m. If this is the case, all you need to do is repeat what you did with t.h:

Re: [R] Regularized logistic regression

2011-06-21 Thread Frank Harrell
For quadratic penalization (generalization of ridge regression) the lrm function in the rms package supports this. See also the rms pentrace function. Frank djmuseR wrote: > > Hi: > > glmnet is a good place to start. > > HTH, > Dennis > > On Tue, Jun 21, 2011 at 12:01 AM, Markku Karhunen > <

[R] Compare AUC of uncorrelated ROC curves

2011-06-21 Thread Karl Knoblick
Hallo! I want to compare two uncorrelated ROC curves. One way seems to be the comparison of the AUCs. Although I found the package pROC with he comparison of correlated ROC curves, I did not find anything about the comparison of uncorrelated ROC curves. Does anybody know how to compare the AU

[R] par code help

2011-06-21 Thread Adrienne Keller
I am making a barplot using barplot2 from gplots where each bar represents a specific tree species. I have formatted the species names on the x-axis so that the genus name is above the species name and have then rotated the labels 45 degrees to save room. This is my code: >columncolor<-c("g

[R] dynlm

2011-06-21 Thread Dave Evens
Dear All, I'm trying to use dynlm to fit a time series. I have 3 seasonal terms. Here is an example of the problem. This is my time variable, hourly data: timeSeries <- seq(as.POSIXct("2011-01-01 00:00:00"), as.POSIXct("2011-12-31 23:00:00"), by="hour") My response is: y <- rnorm(length(

[R] Help interpreting ANCOVA results

2011-06-21 Thread Peter Milne
Please help me interpret the following results. The full model (Schwa~Dialect*Prediction*Reduction) was reduced via both update() and step(). The minimal adequate model is: ancova<-lm(Schwa~Dialect+Prediction+Reduction+Dialect:Prediction) Schwa is response variable Dialect is factor, two levels ("

[R] Pulling data from remote MySQL database

2011-06-21 Thread Joseph McPhail
Hello Fellow R Programmers, Do any of you have experience with pulling data from a remote MySQL database? My company is spreadout across the country with my analysts in one state any my data scrappers in another. Any assistance would be useful. If you are particularly qualified with this sort of t

Re: [R] converting character to numeric

2011-06-21 Thread Sarah Goslee
Hi Alina, On Tue, Jun 21, 2011 at 4:38 PM, Alina Sheyman wrote: > I'm trying to convert data from character to numeric. > >  I've imported data as a csv file, I'm assuming that the import is a > database - are all the columns in  a database considered "vectors"  and that > they can be  operated o

Re: [R] converting character to numeric

2011-06-21 Thread Steven Kennedy
You need: mydata$apples<-as.numeric(mydata$apples) On Wed, Jun 22, 2011 at 6:38 AM, Alina Sheyman wrote: > I'm trying to convert data from character to numeric. > >  I've imported data as a csv file, I'm assuming that the import is a > database - are all the columns in  a database considered "ve

Re: [R] converting character to numeric

2011-06-21 Thread Denis Kazakiewicz
Hi Sorry, can't answer your question However, I had exactly the same problem and just came back to my spreadsheet redactor and changed the format of cells Denis I'm trying to convert data from character to numeric. I've imported data as a csv file, I'm assuming that the import is a database

[R] converting character to numeric

2011-06-21 Thread Alina Sheyman
I'm trying to convert data from character to numeric. I've imported data as a csv file, I'm assuming that the import is a database - are all the columns in a database considered "vectors" and that they can be operated on individually Therefore I've tried the following mydata <- as.numeric(myda

Re: [R] ddply to count frequency of combinations

2011-06-21 Thread David Winsemius
On Jun 21, 2011, at 2:30 PM, Idris Raja wrote: I have a dataframe df with two columns x and y. I want to count the number of times a unique x, y combination occurs. For example x<- c(1,2,3,4,5,1,2,3,4) y<- c(1,2,3,4,5,1,2,4,1) df<-as.data.frame(cbind(x, y)) #what is the correct way to use

Re: [R] omitting columns from a data frame

2011-06-21 Thread Albert-Jan Roskam
But isn't this version of which() typo-proof? > x <- iris[-which(c("Sepal.Length", "SSSepal.Width") %in% names(iris))] Btw, I prefer the following, ie. simply assigning to NULL. Much easier notation. > y <- iris > y$Sepal.Width <- y$SSSepal.Width <- NULL Cheers!! Albert-Jan ~~~

Re: [R] ddply to count frequency of combinations

2011-06-21 Thread Brian Diggs
On 6/21/2011 11:30 AM, Idris Raja wrote: I have a dataframe df with two columns x and y. I want to count the number of times a unique x, y combination occurs. For example x<- c(1,2,3,4,5,1,2,3,4) y<- c(1,2,3,4,5,1,2,4,1) df<-as.data.frame(cbind(x, y)) #what is the correct way to use ddply for

Re: [R] ddply to count frequency of combinations

2011-06-21 Thread Dennis Murphy
Hi: count() is a much faster function than ddply() in this circumstance. x<- c(1,2,3,4,5,1,2,3,4) y<- c(1,2,3,4,5,1,2,4,1) d <- data.frame(x, y) library(plyr) count(d, c('x', 'y')) x y freq 1 1 12 2 2 22 3 3 31 4 3 41 5 4 11 6 4 41 7 5 51 HTH, Dennis On Tue, Jun 2

[R] RES: Doubit about ts() functions

2011-06-21 Thread Filipe Leme Botelho
Flávio, first install package 'xts'. Then with a matrix with rownames as dates like: > testing [,1] 2011-05-12 177.05 2011-05-13 182.85 2011-05-16 182.20 2011-05-17 181.90 2011-05-18 180.50 2011-05-19 184.95 2011-05-20 181.75 2011-05-23 180.85 2011-05-24 182.75 2011-05-25 186.80 2011

[R] Doubit about ts() functions

2011-06-21 Thread Flávio Fagundes
Hi everyone Please, I need one more help you I have some data that need to make a forecast. I´m using the command: Yst<-print(ts<-ts(Y,start=c(1,5),freq=7),calendar=T) to create the dayly time series by the dataframe Y. My data Y means: Y=measure dayly , start at 01/jul/2010 (thursday), for this re

Re: [R] ddply to count frequency of combinations

2011-06-21 Thread Jorge Ivan Velez
Hi Idris, I do not know what the correct use of ddply would be, but here is another option using paste() and table(); data.frame(with(df, table(paste("(", x, ",", y, ")", sep = "" HTH, Jorge On Tue, Jun 21, 2011 at 2:30 PM, Idris Raja <> wrote: > I have a dataframe df with two columns x a

[R] ddply to count frequency of combinations

2011-06-21 Thread Idris Raja
I have a dataframe df with two columns x and y. I want to count the number of times a unique x, y combination occurs. For example x<- c(1,2,3,4,5,1,2,3,4) y<- c(1,2,3,4,5,1,2,4,1) df<-as.data.frame(cbind(x, y)) #what is the correct way to use ddply for this example? ddply(df, c('x','y', summari

Re: [R] qplot/ggplot2 Questions

2011-06-21 Thread Dennis Murphy
Hi: On Tue, Jun 21, 2011 at 10:03 AM, wwreith wrote: > I took some data from an online poll about which R GUI people used most and I > am messing around with it to learn how to use qplot. Specifically I am > making a horizontal bar graph and I have two questions. > > > 1. The categories are order

Re: [R] qplot/ggplot2 Questions

2011-06-21 Thread David Winsemius
On Jun 21, 2011, at 1:03 PM, wwreith wrote: I took some data from an online poll about which R GUI people used most and I am messing around with it to learn how to use qplot. Specifically I am making a horizontal bar graph and I have two questions. 1. The categories are ordered in rather st

[R] qplot/ggplot2 Questions

2011-06-21 Thread wwreith
I took some data from an online poll about which R GUI people used most and I am messing around with it to learn how to use qplot. Specifically I am making a horizontal bar graph and I have two questions. 1. The categories are ordered in rather strange way at least to me. It is not alphabetical o

[R] How does rpart computes "improve" for split="information"?? (which seems to be different then the "gini" case)

2011-06-21 Thread Tal Galili
Hello dear R-help members, I would appreciate any help in understanding how the rpart function computes the "improve" (which is given in fit$split) when using the split='information' parameter. Thanks to Professor Atkinson help, I was able to find how this is done in the case that split='gini'.

Re: [R] working with sparse matrix

2011-06-21 Thread davefrederick
Patrick, thank you. This works. I can't believe I have wasted several hours in front of computer for something this easy! :)) 2011/6/21 Patrick Breheny [via R] < ml-node+3614530-1847060061-246...@n4.nabble.com> > On 06/21/2011 09:48 AM, davefrederick wrote: > > Hi, I have a 500x 53380 sparse mat

Re: [R] WG: R-Problem

2011-06-21 Thread Alexander Engelhardt
Am 21.06.2011 16:43, schrieb Bleicher Niels (AFS): Dear forumites As a newbie I try to figure out whether R can do a certain job quicker than other programs and it seems so, but I don't find a solution to a seemingly simple problem: I have built a matrix of distance with as.matrix(dist()) w

Re: [R] WG: R-Problem

2011-06-21 Thread Sarah Goslee
cut() and table() will do it. Here's one less-than-elegant way to put them together: test <- structure(list(X1 = c(0, 1.3, 1.6, 2.1), X2 = c(1.3, 0, 1.9, 1.7), X3 = c(1.6, 1.9, 0, 2.2), X4 = c(2.1, 1.7, 2.2, 0)), .Names = c("X1", "X2", "X3", "X4"), class = "data.frame", row.names = c("1", "2", "3"

Re: [R] please help for mgcv package

2011-06-21 Thread Sarah Goslee
Hi, On Tue, Jun 21, 2011 at 11:27 AM, pigpigmeow wrote: > i read a book from WOOD, there's an example which is talking about the > pollutant. > > library(gamair) > library(mgcv) data(chicago) # otherwise this isn't reproducible > y<-gam(death~s(time,bs="cr",k=200)+s(pm10median,bs="cr")+s(so2med

Re: [R] please help for mgcv package

2011-06-21 Thread David Winsemius
On Jun 21, 2011, at 11:27 AM, pigpigmeow wrote: i read a book from WOOD, there's an example which is talking about the pollutant. library(gamair) library(mgcv) y<-gam(death~s(time,bs="cr",k=200)+s(pm10median,bs="cr") +s(so2median,bs="cr")+s(o3median,bs="cr") +s(tmpd,bs="cr"),data=chicago,fam

[R] please help for mgcv package

2011-06-21 Thread pigpigmeow
i read a book from WOOD, there's an example which is talking about the pollutant. library(gamair) library(mgcv) y<-gam(death~s(time,bs="cr",k=200)+s(pm10median,bs="cr")+s(so2median,bs="cr")+s(o3median,bs="cr")+s(tmpd,bs="cr"),data=chicago,family=Possion) lag.sum<-function(a,10,11) {n<-length(a) b

Re: [R] please help for mgcv package

2011-06-21 Thread pigpigmeow
it is from Generalized Additive Models an introduction with R by Simon N.Wood . Page 251 -- View this message in context: http://r.789695.n4.nabble.com/please-help-for-mgcv-package-tp3614485p3614535.html Sent from the R help mailing list archive at Nabble.com. __

[R] Estimating choice models at the individual level

2011-06-21 Thread Data Analytics Corp.
Hi, I have a discrete choice model to estimate for a client that I originally planned to estimate as an aggregate model using a clogit routine. Now the client is asking for results for many segments of the respondents which would mean, if I stayed with my original plan, I would have to estim

Re: [R] working with sparse matrix

2011-06-21 Thread David Winsemius
On Jun 21, 2011, at 11:44 AM, Patrick Breheny wrote: On 06/21/2011 09:48 AM, davefrederick wrote: Hi, I have a 500x 53380 sparse matrix and I am trying to dichotomize it. Under sna package I have found event2dichot yet it doesnt recognize sparse matrix and requires adjacency matrix or array

[R] WG: R-Problem

2011-06-21 Thread Bleicher Niels (AFS)
Dear forumites As a newbie I try to figure out whether R can do a certain job quicker than other programs and it seems so, but I don't find a solution to a seemingly simple problem: I have built a matrix of distance with as.matrix(dist()) with several hundred rows and columns 1

Re: [R] Fwd: varimp_in_party_package

2011-06-21 Thread Torsten Hothorn
On Thu, 16 Jun 2011, Jinrui Xu wrote: Thanks for your feedback. I think the problem is not because of many levels. There is only 1 column with two levels as class labels in my input data. Below is my code. The commandline "data.cforest.varimp <- varimp(data.cforest, conditional = TRUE)" rep

Re: [R] working with sparse matrix

2011-06-21 Thread Patrick Breheny
On 06/21/2011 09:48 AM, davefrederick wrote: Hi, I have a 500x 53380 sparse matrix and I am trying to dichotomize it. Under sna package I have found event2dichot yet it doesnt recognize sparse matrix and requires adjacency matrix or array. I tried to run a simple loop code for (i in 1:500) for (

[R] R crash when using pan for multiple imputation

2011-06-21 Thread D. Alain
Dear R-List, I apologize for not posting a reproducible example - the reason is that I actually do not succeed in reproducing my specific problem with generated data. Let me still describe the problem: I want to impute missing data using the "pan" package. a) It works, when I use a fractio

[R] Stepwise Manova

2011-06-21 Thread Schuster, Veronika
Hello all, I have a question on manova in R: I'm using the function "manova()" from the stats package. Is there anything like a stepwise (backward or forward) manova in R (like there is for regression and anova). When I enter: step(Model1, data=Mydata) R returns the message: Error in drop1.

Re: [R] 回复: Italicize Greek symbols in axis

2011-06-21 Thread Prof Brian Ripley
On Tue, 21 Jun 2011, Duncan Murdoch wrote: On 11-06-21 8:15 AM, Bingzhang Chen wrote: Prof. Ripley, Thanks. A stupid question: how to find out the codes (e.g.,u03bc) for the Greek letters? That's a Unicode code point, so you can look it up online, e.g. here: http://inamidst.com/stuff/uni

Re: [R] omitting columns from a data frame

2011-06-21 Thread Joshua Wiley
On Tue, Jun 21, 2011 at 6:57 AM, Ista Zahn wrote: > I would cation people not to use the -which strategy because entering > a value that doesn't exist as a column name returns a zero-column > data.frame, without so much as a warning. This can be a problem if you > don't know if a column exists but

Re: [R] R Script Help!

2011-06-21 Thread Sarah Goslee
Hi George, On Tue, Jun 21, 2011 at 9:33 AM, geo...@leadbetter.cc wrote: > I have written a script in an R text file that i can run through a terminal > window. My script though contains lots of code to interpret my input > arguments, which are then put into an SQL query to get the data I want to

[R] working with sparse matrix

2011-06-21 Thread davefrederick
Hi, I have a 500x 53380 sparse matrix and I am trying to dichotomize it. Under sna package I have found event2dichot yet it doesnt recognize sparse matrix and requires adjacency matrix or array. I tried to run a simple loop code for (i in 1:500) for (j in 1:53380) if (matrix[i,j]>0) matrix[i,j]

[R] R Script Help!

2011-06-21 Thread geo...@leadbetter.cc
I have written a script in an R text file that i can run through a terminal window. My script though contains lots of code to interpret my input arguments, which are then put into an SQL query to get the data I want to plot some graphs. The script works, but there must be an easier way to do what I

Re: [R] 回复: Italicize Greek symbols in axis

2011-06-21 Thread Duncan Murdoch
On 11-06-21 8:15 AM, Bingzhang Chen wrote: Prof. Ripley, Thanks. A stupid question: how to find out the codes (e.g.,u03bc) for the Greek letters? That's a Unicode code point, so you can look it up online, e.g. here: http://inamidst.com/stuff/unidata/ The mu is in the "Greek and Coptic" sect

[R] RBloomberg data account for dividend

2011-06-21 Thread michalseneca
Hi , has somebody the experience how to use RBloomberg to account data for Dividends ? Or some working code ? I manage to retrieve the dividend however I still have issues to transform the data correctly. Regards Michal -- View this message in context: http://r.789695.n4.nabble.com/RBloomber

Re: [R] omitting columns from a data frame

2011-06-21 Thread David Winsemius
On Jun 21, 2011, at 9:57 AM, Ista Zahn wrote: I would cation people not to use the -which strategy because entering a value that doesn't exist as a column name returns a zero-column data.frame, without so much as a warning. This can be a problem if you don't know if a column exists but just wan

Re: [R] Getting SNPS from PLINK to R

2011-06-21 Thread David Duffy
snpMatrix package is quite nice (read.plink()) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained

Re: [R] omitting columns from a data frame

2011-06-21 Thread Ista Zahn
I would cation people not to use the -which strategy because entering a value that doesn't exist as a column name returns a zero-column data.frame, without so much as a warning. This can be a problem if you don't know if a column exists but just want to make sure it doesn't, or if you make a typo.

Re: [R] question about linear regression and leverage

2011-06-21 Thread Bert Gunter
You really really need to consult with a local statistician for help. You are making a valiant effort, but it is clear that you have insufficient background and experience. Get help from an expert if you can. It is no dishonor, you will learn a lot, and you will avoid incorrect conclusions. Cheers

Re: [R] Re; Getting SNPS from PLINK to R

2011-06-21 Thread Natalie Van Zuydam
Hi Jim, If you convert the ped and map files to binary plink files the .bim file will tell you the name and the position of the snps. This would be the easiest method. Alternatively packages like GenABEL and genetics have functions to read in PLINK formatted data for analysis in R. Best wi

Re: [R] Re; Getting SNPS from PLINK to R

2011-06-21 Thread Natalie Van Zuydam
Hi Jim, If you convert the ped and map files to binary plink files the .bim file will tell you the name and the position of the snps. This would be the easiest method. Alternatively packages like GenABEL and genetics have functions to read in PLINK formatted data for analysis in R. Best wi

Re: [R] Re; Getting SNPS from PLINK to R

2011-06-21 Thread Clemontina Alexander
Hi, If you go to this site: http://pngu.mgh.harvard.edu/~purcell/plink/res.shtml#teach And download the teaching.zip file, I think there was information in the word document about reading plink data into R, though I am not 100% sure. I think a read.table("filename.ped", header=T) command may be e

Re: [R] setting breaks in hist

2011-06-21 Thread Stephen Ellison
Not according to the help page. Bit kludgy,but try something like y <- rnorm(73, 17.2) nbreaks <- function(x, n) { r <- range(pretty(y)) seq(r[1], r[2], length.out=n+1) } hist(y, breaks=nbreaks(y,13)) > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-he

Re: [R] question about linear regression and leverage

2011-06-21 Thread George Markomanolis
Dear David, Thanks for your answer. Yes now that you mentioned these points are in the beginning of a variable range. From the plot of the residuals seems to have non constant variance which is solved by a transformation. I checked also for interactions by using the symbol : between two variables

Re: [R] Documentation

2011-06-21 Thread siddharth arun
Thanks for your suggestions. On Tue, Jun 21, 2011 at 4:43 PM, David Winsemius wrote: > > On Jun 21, 2011, at 5:26 AM, Frank Schwach wrote: > > funny thing is: if you actually DO google for "Guide for the unwilling R >> User" you basically only get hits to this mailing list and this very thread >

[R] 回复: Italicize Greek symbols in axis

2011-06-21 Thread Bingzhang Chen
Prof. Ripley, Thanks. A stupid question: how to find out the codes (e.g.,u03bc) for the Greek letters? I am trying to italicize the mu in a mathematical expression placed as a label for an axis of a graph (but other letters remain plain). I am working on the Windows platform. I seem to find

Re: [R] Documentation

2011-06-21 Thread Trevor Jenkins
On Tue, Jun 21, 2011 at 12:13 PM, David Winsemius wrote: > > On Jun 21, 2011, at 5:26 AM, Frank Schwach wrote: > > funny thing is: if you actually DO google for "Guide for the unwilling R >> User" you basically only get hits to this mailing list and this very thread >> :) >> > > Because it's corr

[R] ipred: possible to use svm in errorest?

2011-06-21 Thread Daniel Stahl
Dear all, is it possible to run the support vector machine command "svm" from the package e1071 within the errorest function from the library ipred? It works fine for lda and rda but I get an error message (see below) Thank you for your help. Best wsihes, Daneil # Classification data(iris) #

[R] matrix problem-replacing pieces of a matrix

2011-06-21 Thread Costis Ghionnis
#Hallo again.. Thank you for your answers. To sum up: #The problem was that we have the matrix m m<-matrix(numeric(length=5*4),nrow=5,ncol=4) m # [,1] [,2] [,3] [,4] # [1,]0000 # [2,]0000 # [3,]0000 # [4,]0000 # [5,]00

Re: [R] omitting columns from a data frame

2011-06-21 Thread David Winsemius
On Jun 21, 2011, at 12:22 AM, Joshua Wiley wrote: On Mon, Jun 20, 2011 at 8:55 PM, Erin Hodgess wrote: Too funny! how about subset? Sure, that is one option. Each of the following will also work. The ones wrapped with c() can easily omit more than one at a time. mtcars[, -which(names(m

Re: [R] Documentation

2011-06-21 Thread David Winsemius
On Jun 21, 2011, at 5:26 AM, Frank Schwach wrote: funny thing is: if you actually DO google for "Guide for the unwilling R User" you basically only get hits to this mailing list and this very thread :) Because it's correct title is: "A Guide for the Unwilling S User" http://www.burns-stat

Re: [R] question about linear regression and leverage

2011-06-21 Thread David Winsemius
On Jun 21, 2011, at 3:49 AM, George Markomanolis wrote: Dear all, I am new to this field and I have a question about a linear regression. I have a dataset of around to 31000 points and I want to apply a linear regression. The R-squared is 0.9 however when I check the diagnostic plots I ca

[R] relation between tdrocc AUC and c-statistic from rcorr.cens

2011-06-21 Thread North, Bernard V
I am using the rcorr.cens function from the Hmisc package and the time-dependent ROC curve obtained using tdrocc in the survcomp package. I understand that the C statistic from rcorr.cens has to be subtracted from 1 if high values of the risk variable lower survival. Given that I wonder what the

Re: [R] Documentation

2011-06-21 Thread Trevor Jenkins
On Tue, Jun 21, 2011 at 10:26 AM, Frank Schwach wrote: > funny thing is: if you actually DO google for "Guide for the unwilling R > User" you basically only get hits to this mailing list and this very thread > :) > I got a different set of results for the same search. While there were links to p

Re: [R] Regularized logistic regression

2011-06-21 Thread Dennis Murphy
Hi: glmnet is a good place to start. HTH, Dennis On Tue, Jun 21, 2011 at 12:01 AM, Markku Karhunen wrote: > > Hi Community, > > I would like to do regularized logistic regression, e.g. lasso, plasso or > ridge regression. Can you recommend any packages? Low memory requirement / > computational

Re: [R] Italicize Greek symbols in axis

2011-06-21 Thread Prof Brian Ripley
On Tue, 21 Jun 2011, Bingzhang Chen wrote: Hello there, Is there any way to italicize Greek symbols such as mu in axis? From the help files of mathematical anotations: "Note that bold, italic and bolditalic do not apply to symbols, and hence not to the Greek symbols such as mu which are display

  1   2   >