Re: [R] question in using nlme and lme4 for unbalanced data

2010-10-25 Thread Ben Bolker
Bert Gunter gene.com> writes: Thanks for starting this. I don't really disagree, much. > I would say that these are not really R questions, but about > statistical procedures in general. However, there are some important > issues that you touch on, so I cannot resist commenting. Hopefully my

Re: [R] Mixed-effects model for overdispersed count data?

2010-10-25 Thread Ben Bolker
dave fournier otter-rsch.com> writes: > > According to the documentation for glmmADMB if you fit > your model with a statment like > > fit =glmm.admb(y~Base*trt+Age+Visit, ... data=epil2,family="nbinom") > > and that the parameter estimates are in > > fit$b while their estimated standar

Re: [R] problem with setRepositories

2010-10-25 Thread Carson, John
Thanks Duncan! R version 2.11.1 (2010-05-31) for Windows 32 bit. getOption("repos") CRAN "http://lib.stat.cmu.edu/R/CRAN/"; CRANextra "http://

Re: [R] Chron object in time series plot

2010-10-25 Thread Gabor Grothendieck
On Mon, Oct 25, 2010 at 4:12 PM, Manta wrote: > > I apologize for not being very precise. I meant the tick marks on the x-axis. > > As for the code, the situation is just the one describe above, just that I > would like to be able to specify the tick marks (say every 3 or 6 months). Using z and z

[R] online course: SVM in R with Lutz Hamel at statistics.com

2010-10-25 Thread Janet Dobbins
Support vector machines (SVMs) have established themselves as one of the preeminent machine learning models for classification and regression over the past decade or so, frequently outperforming artificial neural networks in task such as text mining and bioinformatics. Dr. Lutz Hamel, author of "K

[R] online course: Spatial Analysis Techniques in R with David Unwin at statistics.com

2010-10-25 Thread Janet Dobbins
statistics.com offers "Spatial Analysis Techniques in R" with David Unwin on Dec. 17 - Jan. 22 This course will teach users how to implement spatial statistical analysis procedures using R software. Topics covered include point pattern analysis, identifying clusters, measures of spatial associatio

Re: [R] Chron object in time series plot

2010-10-25 Thread Manta
Wonderful! Thanks a lot for your help, super appreciated! -- View this message in context: http://r.789695.n4.nabble.com/Chron-object-in-time-series-plot-tp3002285p3012793.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-proj

[R] Panel regression

2010-10-25 Thread vincent.deluard
Hi, I am trying to run a panel regression where I have a matrix of observations and a matrix of independant variables - examples would trying to predict countries's GDP with their data on education, FDI, tax rates, over time. For the purpose of simplicity, my data would be: dep = matrix(rnorm(

Re: [R] question in using nlme and lme4 for unbalanced data

2010-10-25 Thread Ben Bolker
On 10-10-25 04:59 PM, Bert Gunter wrote: > ...ignore the block variation entirely, " > > If the between block variability is large, this will lose precision; > with imbalance, it could also result in bias (prhaps not in this > study...). The mixed or fixed effects choice is arbitrary; this is not

[R] help with adding lines to current plot

2010-10-25 Thread Changbin Du
HI, Dear R community, I am using the following codes to plot, however, the lines code works. But the line was not drawn on the previous plot and did not shown up. How comes? # specify the data for missense simulation x <- seq(0,10, by=1) y <- c(0.952, 0.947, 0.943, 0.941, 0.933, 0.932, 0.939, 0

Re: [R] help with adding lines to current plot

2010-10-25 Thread Joshua Wiley
Dear Changbin, The lines do not show up because they are outside the region of your graph. If you add the yaxis labels back in you will see this. You can avoid it by specifying ylim argument in plot() rather than letting R decide by itself. Here is revised code: x <- seq(0,10, by=1) y <- c(0.9

Re: [R] help with adding lines to current plot

2010-10-25 Thread Changbin Du
Yes, Joshua, Thanks so much! On Mon, Oct 25, 2010 at 2:47 PM, Joshua Wiley wrote: > Dear Changbin, > > The lines do not show up because they are outside the region of your > graph. If you add the yaxis labels back in you will see this. You > can avoid it by specifying ylim argument in plot() r

Re: [R] R-Fortran question (multiple subroutines)

2010-10-25 Thread Remko Duursma
Hi Berwin and all others who replied: that did the trick, thanks for your help! remko > Actually, it turns out that this example is simplified enough. :) > > I put this snippet into a file, compiled it via "R CMD SHLIB", loaded > it into R and then was very surprised about the result of ".Fort

Re: [R] Artifacts in filled.contour+pdf

2010-10-25 Thread David Winsemius
On Oct 25, 2010, at 6:50 AM, Mario Valle wrote: Dear all, I'm using R 2.12.0 on Windows 7 (32bits) I created a filled contour from the attached data using the following code: load('bug.RData') pdf('bug.pdf', width=14, height=7) filled.contour(o4$x, o4$y, o4$z, color=rainbow, xlim=c(4,18),

Re: [R] How to simulate from an estimated density

2010-10-25 Thread wangguojie2006
Thanks. I got it. Another question, why every time I posted something, it needs approval before it shows up? Any way I can speed up posting? -- View this message in context: http://r.789695.n4.nabble.com/How-to-simulate-from-an-estimated-density-tp3009394p3012815.html Sent from the R help mail

[R] rgdal intallation mac ox x

2010-10-25 Thread L. Ignacio Vilchis
Hi all, Could anybody who has successfully installed the rgdal package on r64 on a mac help me out. I have downloaded all o the needed frameworks(gdal, proj, etc), I am just having trouble getting the correct script for install.packages(). Thanks! L. Ignacio Vilchis, Ph.D. SeaDoc Society - W

[R] calculate area between intersecting polygons

2010-10-25 Thread jonas garcia
Dear list: I am trying to calculate the intersection area between two irregular polygons (see example data below). set.seed(1234) theta <- seq(0, 2 * pi, length=(100)) poly1<- cbind(c(0 + 1 * cos(theta) + rnorm(100, sd=0.1)), c(0 + 2 * sin(theta))) poly2<- cbind(c(0 + 2 * cos(theta) ), c

Re: [R] How to simulate from an estimated density

2010-10-25 Thread Duncan Murdoch
wangguojie2006 wrote: Thanks. I got it. Another question, why every time I posted something, it needs approval before it shows up? Any way I can speed up posting? Don't post from gmail.com. Duncan Murdoch (posting from gmail.com ...) __ R-help@r-p

Re: [R] calculate area between intersecting polygons

2010-10-25 Thread Remko Duursma
Dear Jonas, if you can write the difference in y-values between your polygons as a function, you can use integrate() to get the area between the polygons. It sounds like perhaps your x-values will not match between the polygons because they come from different sources, so you probably have to do

[R] divide column in a dataframe based on a character

2010-10-25 Thread Daisy Englert Duursma
Hello, If I have a dataframe: example(data.frame) zz<-c("aa_bb","bb_cc","cc_dd","dd_ee","ee_ff","ff_gg","gg_hh","ii_jj","jj_kk","kk_ll") ddd <- cbind(dd, group = zz) and I want to divide the column named group by the "_", how would I do this? so instead of the first row being x y fac char

[R] Extract table from a webpage

2010-10-25 Thread Santosh Srinivas
Dear R-group, I've been able to use the XML package for getting relevant tables from webpages for my analysis. I'm stuck with this slightly more interactive problem involving clicking a link Fro this link . http://www.etintelligence.com/etig/et500/et500Ranking.jsp I want to get the data tabl

Re: [R] divide column in a dataframe based on a character

2010-10-25 Thread Bill.Venables
You are nearly there. example(data.frame) zz <- c("aa_bb","bb_cc","cc_dd","dd_ee","ee_ff", "ff_gg","gg_hh","ii_jj","jj_kk","kk_ll") ddd <- cbind(dd, group = zz) ddd <- within(ddd, { group <- as.character(group) tmp <- do.call(rbind, strsplit(group, "_")) gr

[R] Time series data with dropouts/gaps

2010-10-25 Thread Bob Cunningham
I have time-series data from a pair of inexpensive self-logging 3-axis accelerometers (http://www.gcdataconcepts.com/xlr8r-1.html). Since I'm not sure of the vibration/shock spectrum I'm measuring, for my initial sensor characterization run the units were mounted together with the sample rate

[R] using coxme to fit random slope cox PH model

2010-10-25 Thread Ian Vi
Hi all, I was trying to fit random slope cox proportional hazards model on counting process type of data (right censoring data), but the  coxme(Surv(time1, time2, event)~ x + (1+x | cluster)) did not seem to work. I'd appreciate it if anyone can help me with that. [[alternative HTML

Re: [R] divide column in a dataframe based on a character

2010-10-25 Thread David Winsemius
On Oct 25, 2010, at 8:56 PM, Daisy Englert Duursma wrote: Hello, If I have a dataframe: example(data.frame) zz<- c ("aa_bb ","bb_cc ","cc_dd","dd_ee","ee_ff","ff_gg","gg_hh","ii_jj","jj_kk","kk_ll") ddd <- cbind(dd, group = zz) and I want to divide the column named group by the "_", how

Re: [R] Time series data with dropouts/gaps

2010-10-25 Thread Gabor Grothendieck
On Tue, Oct 26, 2010 at 12:28 AM, Bob Cunningham wrote: > I have time-series data from a pair of inexpensive self-logging 3-axis > accelerometers (http://www.gcdataconcepts.com/xlr8r-1.html).  Since I'm not > sure of the vibration/shock spectrum I'm measuring, for my initial sensor > characterizat

Re: [R] divide column in a dataframe based on a character

2010-10-25 Thread Daisy Englert Duursma
Thanks for the help. Easy as.. On Tue, Oct 26, 2010 at 3:33 PM, David Winsemius wrote: > > On Oct 25, 2010, at 8:56 PM, Daisy Englert Duursma wrote: > >> Hello, >> >> If I have a dataframe: >> >> example(data.frame) >> >> zz<-c("aa_bb","bb_cc","cc_dd","dd_ee","ee_ff","ff_gg","gg_hh","ii_jj","jj_k

Re: [R] problem with "make distribution"

2010-10-25 Thread Erin Hodgess
Hello again. I downloaded the R_Tcl zip file and extracted it to c:\R\R-2.12.0 I re-ran the entire process and still have the same problem with Windows 7. Thanks, Erin On Mon, Oct 25, 2010 at 5:10 AM, Prof Brian Ripley wrote: > On Mon, 25 Oct 2010, Erin Hodgess wrote: > >> Dear R People: >> >

Re: [R] Artifacts in filled.contour+pdf

2010-10-25 Thread baptiste auguie
Hi, As an alternative, maybe you could use lattice::panel.levelplot.raster which I think doesn't have this problem in pdf viewers. HTH, baptiste On 26 October 2010 02:30, David Winsemius wrote: > > On Oct 25, 2010, at 6:50 AM, Mario Valle wrote: > >> Dear all, >> I'm using R 2.12.0 on Windows

Re: [R] problem with "make distribution"

2010-10-25 Thread Prof Brian Ripley
On Tue, 26 Oct 2010, Erin Hodgess wrote: Hello again. I downloaded the R_Tcl zip file and extracted it to c:\R\R-2.12.0 I re-ran the entire process and still have the same problem with Windows 7. So you will need to other way I suggested, to correct permissions/ownership. Thanks, Erin

[R] ggplot2: how to label lines?

2010-10-25 Thread Jeffrey Spies
Hi, all, Let's say I have some time series data--10 subjects measured 20 times--that I plot as follows: library(ggplot2) dat <- data.frame(subject=as.factor(rep(1:10, each=20)), time=rep(1:20, 10), measure=as.vector(replicate(10, rnorm(20, mean=runif(1, 0, 15), sd=runif(1, 1, 3) p <- qplot(ti

[R] problem with arima() function

2010-10-25 Thread benedikt . gehr
Hi I posted this problem yesterday but didn't get a reply so I try again today. I hope someone can help me with this. thank you very much for the help cheers Benedikt I would like to use arima () to find the best arima model for a time series. The default in arima appar

[R] Odp: Panel regression

2010-10-25 Thread Petr PIKAL
Hi did you look at help page of lme? r-help-boun...@r-project.org napsal dne 25.10.2010 22:59:40: > > > Hi, > > I am trying to run a panel regression where I have a matrix of observations > and a matrix of independant variables - examples would trying to predict > countries's GDP with their

Re: [R] Conditional looping over a set of variables in R

2010-10-25 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 25.10.2010 20:41:55: > Adrienne, there's one glitch when I implement your solution below. When the > loop encounters a case with no data at all (that is, all 140 item responses > are missing), it aborts and prints this error message: " ERROR: argumen

<    1   2