[R] cph/nomogram Design/RMS package hazard ratio: interquartile vs per unit

2011-10-21 Thread renee
Hello, I am constructing a nomogram using cph and nomogram commands in Dr. Harrell's Design/RMS package. The HR that I obtain for dichotomous and categorical variables are identical to those that I obtain using STATA stcox. However, the inter-quartile HR I obtain for continuous variables is

Re: [R] Foreach (doMC)

2011-10-21 Thread Jannis
Dear list members, dear Jay, Well, I personally do not care about Revolutions Analytics selling their products as this is also included into the idea of many open source licences. Especially as Revolutions provide their packages to the community and its is everybodies personal choice to buy

Re: [R] identifying groups in xyplot

2011-10-21 Thread wisc_maier
There's a great tutorial online that helped me out a lot - Lattice and Other Graphics in R, by J H Maindonald at the Centre for Mathematics and Its Applications at Australian National University. http://maths.anu.edu.au/~johnm/r-book/2edn/xtras/rgraphics.pdf I gave my lattice object a name, and

Re: [R] Scatterplot with the 3rd dimension = color?

2011-10-21 Thread Kerry
If it would help get any assistance with my issue, here's another method I'm trying (using R sample data): ggplot(mtcars, aes(disp)) + geom_point(aes(y = mpg, colour = qsec))+ scale_colour_gradient(low=yellow, high=green)+ geom_point(aes(y = cyl, colour = qsec))+

Re: [R] Aggregating data help

2011-10-21 Thread F Mai
check this out http://www.r-bloggers.com/pivot-tables-in-r/ -- View this message in context: http://r.789695.n4.nabble.com/Aggregating-data-help-tp3923138p3923397.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] Vegan: Anova.CCA accessing original data using option by=

2011-10-21 Thread Steve Pawson
Dear Jari, Thank you for your quick reply and the time you have spent assisting with this problem. Indeed the alias tool identifies one variable that when removed from the capscale model solves the problem. Once again greatly appreciate your assistance. Regards Steve Pawson Scientist

[R] Collapse UP a dendrogram

2011-10-21 Thread jshrager
I created a dendrogram (ddg0) using hclust in the usual way. I want to collapse UP the tree in various ways, that is, from the leaves up to the root. Optimally, I would give the id of a member of a final split in ddg0, and return a new ddg1 with that split collapsed. Alt, I could give a depth to

[R] 'Apply' giving me errors

2011-10-21 Thread kickout
So i have a simple function: bmass=function(y){ weight=y$WT*y$MSTR return(bio) } And want to apply to a whole bunch of rows in my data.frame: final1=apply(final,1,yldbu) BUT...recieve the following error: Error in y$WT : $ operator is invalid for atomic vectors However when i try:

[R] plotting average effects.

2011-10-21 Thread poliscigradstudent
hi... i am a phd student using r. i am having difficulty plotting average effects. admittedly, i am not really understanding what each of the commands mean so when i get the error i am not sure where the issue is. here is my code... i will include the points at which there are errors

Re: [R] plotting average effects.

2011-10-21 Thread poliscigradstudent
let me clarify, i understand what differing x, y lengths mean. i understand the concept of average effects, etc. i just don't understand how one would fix it. thanks. -- View this message in context: http://r.789695.n4.nabble.com/plotting-average-effects-tp3923982p3924003.html Sent from the R

[R] geom_tile rendering problems

2011-10-21 Thread rayzlor
Hi, I'm trying to overlay a geographical map with a heat map by following the directions on http://pages.stern.nyu.edu/~achinco/programming_examples/Example__PlotGeographicDensity.html. However, the smaller my zoom level (the farther I zoom out), the more white horizontal lines I have

Re: [R] Ordered probit model -marginal effects and relative importance of each predictor-

2011-10-21 Thread poliscigradstudent
late to the game but maybe this will help:

[R] re coercing data frame rows to character: Am I right that this is a bug?

2011-10-21 Thread andrewH
Dear Folks-- All this seems to me to behave the way you expect, recognising that column b is a factor: AA - data.frame(a=3:4, b=c('x', 'y')) AA[1,] a b 1 3 x as.numeric(AA[1,]) [1] 3 1 AA[,2] [1] x y Levels: x y as.numeric(AA[,2]) [1] 1 2 as.character(AA[,2]) [1] x y But this seems to me

Re: [R] stop R from rounding

2011-10-21 Thread Martin Maechler
David Winsemius dwinsem...@comcast.net on Thu, 20 Oct 2011 01:51:28 -0400 writes: On Oct 19, 2011, at 11:29 PM, Alyse wrote: Hello, I have a column in a data frame that need to be 10 digits long. As such: Decimal.Year 1 1994.25997 2

[R] use of segments in PLS

2011-10-21 Thread arunkumar1111
How to use the segments in the PLS fit1 - mvr(formula=Y~X1+X2+X3+X4+x5++x27, data=Dataset, comp=5,segment =7 ) here when i use segments,the error was like this rror in mvrCv(X, Y, ncomp, method = method, scale = sdscale, ...) : argument 7 matches multiple formal arguments Please help

Re: [R] bar plot issues

2011-10-21 Thread Uwe Ligges
On 20.10.2011 22:29, Henri-Paul Indiogine wrote: Hi Uwe! 2011/10/20 Uwe Liggeslig...@statistik.tu-dortmund.de: arrange it outside by, e.g. increasing the size of margins (see argument mar in ?par) and place a separate legend (see ?legend) into the margins (see xps argument in ?par). I

[R] R square and F - stats in PLS

2011-10-21 Thread arunkumar1111
In the lm function the summary(lmobject) we have adjusted.r square and f statistics Do we have similar to the pls package and how to get it -- View this message in context: http://r.789695.n4.nabble.com/R-square-and-F-stats-in-PLS-tp3924484p3924484.html Sent from the R help mailing list archive

[R] POT package

2011-10-21 Thread Amina Shahzadi
Hi Sir It is requested to please tell the reason why the range of c(20945, 209547) is used in this function npy - length(events1[, obs])/(diff(range(ardieres[, time], + na.rm = TRUE)) - diff(ardieres[c(20945, 20947), time])) Please tell logic. Looking for quick response. Regards -- *Amina

Re: [R] stacked plot

2011-10-21 Thread Dennis Murphy
It appears that your object is currently a matrix. Here's a toy example to illustrate how to get a stacked bar chart in ggplot2: library('ggplot2') m - matrix(1:9, ncol = 3, dimnames = list(letters[1:3], LETTERS[1:3])) (d - as.data.frame(as.table(m))) Var1 Var2 Freq 1aA1 2bA

Re: [R] use of segments in PLS

2011-10-21 Thread Bjørn-Helge Mevik
arunkumar akpbond...@gmail.com writes: How to use the segments in the PLS fit1 - mvr(formula=Y~X1+X2+X3+X4+x5++x27, data=Dataset, comp=5,segment =7 ) here when i use segments,the error was like this rror in mvrCv(X, Y, ncomp, method = method, scale = sdscale, ...) : argument

Re: [R] R square and F - stats in PLS

2011-10-21 Thread Bjørn-Helge Mevik
arunkumar akpbond...@gmail.com writes: In the lm function the summary(lmobject) we have adjusted.r square and f statistics Do we have similar to the pls package and how to get it No. Both of these requires theory about the model that doesn't exist for PLSR. (I should note that there

Re: [R] 'Apply' giving me errors

2011-10-21 Thread Uwe Ligges
On 21.10.2011 02:09, kickout wrote: So i have a simple function: bmass=function(y){ weight=y$WT*y$MSTR return(bio) } And want to apply to a whole bunch of rows in my data.frame: final1=apply(final,1,yldbu) BUT...recieve the following error: Error in y$WT : $ operator is invalid for atomic

Re: [R] R code Error : Hybrid Censored Weibull Distribution

2011-10-21 Thread peter dalgaard
On Oct 20, 2011, at 21:25 , ritwi...@isical.ac.in wrote: Dear Sir/madam, I'm getting a problem with a R-code which calculate Fisher Information Matrix for Hybrid Censored Weibull Distribution. My problem is that: when I take weibull(scale=1,shape=2) { i.e shape1} I got my desired result

Re: [R] replicating SAS's proc rank procedure

2011-10-21 Thread riskcalc
Hi try this function ive written it should be self explantory but let me know if you have any problems. I've only been using R for a few eeeks so apologies if its not the most efficient! rankit2-function(rankvar,cuts,data,factor) { ranker-rankvar ranker-0 range-c(1:cuts) range2-range/cuts

Re: [R] R-help Digest, Vol 104, Issue 19

2011-10-21 Thread peter dalgaard
On Oct 21, 2011, at 09:01 , Martin Maechler wrote: ARE == Alex Ruiz Euler rruizeu...@ucsd.edu on Wed, 19 Oct 2011 14:05:16 -0700 writes: ARE Motion supported. Very. ARE On Wed, 19 Oct 2011 15:40:14 +0200 ARE peter dalgaard pda...@gmail.com wrote: Argh! Someone please

Re: [R] Foreach (doMC)

2011-10-21 Thread Jannis
Jay, sorry if my post was not precise enough. I simply wanted to point out that I personally have no problem at all with commercial R products as I have the free choice to use them or their open source alternatives. In addition Revolutions is supplying their packages for free to the R

[R] Multiple factorial comparison LSD

2011-10-21 Thread Vera Marjorie E. Velasco
Please help. I really like R and I have been looking at how to do LSD multiple comparison test with data that has more than one factor. So far, I am unsuccessful. Please help! Me __ R-help@r-project.org mailing list

[R] cullen and Frey graph in fitdistrplus

2011-10-21 Thread patraopedro
Hi, I’ve came across something that I can’t explain and I would appreciate if anyone could have a go at it. In the library “fitdistplus” there is a function “descdist” to help on the decision of choosing a distribution to fit. The same function also allows bootstrap this is to take in account the

Re: [R] 'Apply' giving me errors

2011-10-21 Thread Kenn Konstabel
On Fri, Oct 21, 2011 at 3:09 AM, kickout kyle.ko...@gmail.com wrote: So i have a simple function: bmass=function(y){ weight=y$WT*y$MSTR return(bio) } But this just returns bio and since an object with that name is not defined in the function, it will be looked up in the global environment

Re: [R] Scatterplot with the 3rd dimension = color?

2011-10-21 Thread Jim Lemon
On 10/21/2011 06:25 AM, Kerry wrote: Can someone please help me out with this? The ggplot2 suggestion works great but I've spent a few days trying to figure out how to plot 2 variables with it and I'm stuck. Here's my example code: ... Hi Kerry, This isn't ggplot2, but it may do what you want.

Re: [R] What does \Sexpr[results=rd]{} exactly mean in Rd?

2011-10-21 Thread Duncan Murdoch
On 11-10-17 9:53 AM, Yihui Xie wrote: Thanks a lot! Sorry for cross-posting, but I did it intentially because I tend to believe Barry Rowlingson (Why R-help Must Die!), and I will summarize the answers here later to StackOverflow. Another user also told me this worked for 2.13.1, but not later

Re: [R] plotting average effects.

2011-10-21 Thread gradstudent
Hi Denins, and thanks for your reply. I understand x,y are not lining up. I just don't know how to fix it in the code. There is only a small group of us at my university using R (4 people of which I am one). 2 are not even touching the average effects plot option, however myself and my study

Re: [R] Change column/row-name

2011-10-21 Thread R. Michael Weylandt
I'm not sure I follow: the matrix Iske doesn't have row or column namesthough if you perhaps mean you want to use the pasted together rows as names on the distance matrix rather than the converted characters, this will do it: Iske.rows - apply(Iske, 1, paste, collapse = ) # Perhaps subtract

Re: [R] plotting average effects.

2011-10-21 Thread gradstudent
Bart, I apologize. I posted the code I was using in my first comment, to include the error and the plot that is coming up. I was unaware that was not enough. I am not looking for anyone to give me the actual answer to my specific issue, only looking to be pointed in a direction for an online

Re: [R] POT package

2011-10-21 Thread R. Michael Weylandt
Perhaps you could tell us what function you are talking about npy is not part of the POT package in the version on my machine and those letters don't seem to show up anywhere consecutively at all on my system, according to ??npy. Similarly, this trick produces no results:

[R] windows limits

2011-10-21 Thread Ben qant
Hello, Using the rgl package, I can set the device window to any dimension (that I have tested): par3d(windowRect=c(1,1,700,700)) With windows I can't get the window to span from the top to the bottom of the monitor. In the following, no matter how large the ypinch value gets it stops, leaving

Re: [R] xyplot() or splom()?: two factors from same data frame

2011-10-21 Thread Rich Shepard
On Fri, 21 Oct 2011, Duncan Mackay wrote: Without a dataset I am not sure what you need. Duncan, Part of the problems I'm trying to resolve come from changing priorities from my client and the regulators. I end up stopping one process and starting on a different one. But, that's life in

Re: [R] windows limits

2011-10-21 Thread Duncan Murdoch
On 21/10/2011 9:36 AM, Ben qant wrote: Hello, Using the rgl package, I can set the device window to any dimension (that I have tested): par3d(windowRect=c(1,1,700,700)) With windows I can't get the window to span from the top to the bottom of the monitor. In the following, no matter how large

[R] How to create time series objects combining two vectors

2011-10-21 Thread sarelseerower
I am new to R and trying to understand time series objects. I have 2 vectors, one containing rainfall values (lets call the vector rain) and the other the time/date in seconds (lets call it time). Is there a method to create a time series object simply by giving the rain and time vectors as

[R] varying coefficients model

2011-10-21 Thread Soberon Velez, Alexandra Pilar
Dear members, I'm trying to estimate a varying coefficients model using the local polynomial estimation method in two case (univariate and bivariate) and with two smooth functions. In the univariate case I use:

Re: [R] How to remove multiple outliers

2011-10-21 Thread aajit75
Hi Michael, Thanks for the help. Yes, I have gone through the document for ?outlier. As it removes one outlier at a time, being new to R, I was woondering is there any function available for removing multiple outliers whithout calling say rm.outlier for n number of time because n is not finite

[R] stair-step plot

2011-10-21 Thread knut-o
Hello Is it possible to map a plot with horizontal lines like in the step-plot, but without the vertical lines? Thanks, knut -- View this message in context: http://r.789695.n4.nabble.com/stair-step-plot-tp3924903p3924903.html Sent from the R help mailing list archive at Nabble.com.

[R] (no subject)

2011-10-21 Thread Lisa Henault
can i be taken off of this mailing list please? is there another way that you can access this without having to get all the emails?? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] How to use gev.fit (package ismev) under box constraints?

2011-10-21 Thread NoSkill ButStyle
__ 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, reproducible code.

[R] glm-poisson fitting 400.000 records

2011-10-21 Thread D_Tomas
Hi, I am trying to fi a glm-poisson model to 400.000 records. I have tried biglm and glmulti but i have problems... can it really be the case that 400.000 are too many records??? I am thinking of using random samples of my dataset. Many thanks, -- View this message in context:

Re: [R] R-help Digest, Vol 104, Issue 19

2011-10-21 Thread Dénes TÓTH
On Oct 21, 2011, at 09:01 , Martin Maechler wrote: ARE == Alex Ruiz Euler rruizeu...@ucsd.edu on Wed, 19 Oct 2011 14:05:16 -0700 writes: ARE Motion supported. Very. ARE On Wed, 19 Oct 2011 15:40:14 +0200 ARE peter dalgaard pda...@gmail.com wrote: Argh! Someone please

[R] add=TRUE or similar in spplot?

2011-10-21 Thread infochat
Dear Helper, I have a spatial lines data frame object 'spRiverDf'. The data frame consists of numbers {0,1,...,5}. And I have a vector 'colorS' of length 6 with different colours. If I make a plot with spplot I get a plot of the lines - colours depending on there number in the data frame

Re: [R] R-help Digest, Vol 104, Issue 21

2011-10-21 Thread mihalicza . peter
Október 19-től 21-ig irodán kívül vagyok, és az emailjeimet nem érem el. Sürgős esetben kérem forduljon Kárpáti Edithez (karpati.e...@gyemszi.hu). Üdvözlettel, Mihalicza Péter I will be out of the office from 19 till 21 October with no access to my emails. In urgent cases please contact Ms.

Re: [R] 'Apply' giving me errors

2011-10-21 Thread kickout
Thanks for the tips/adviceI actually used a different solution to circumvent this, but Uwe's solutions would also work -- View this message in context: http://r.789695.n4.nabble.com/Apply-giving-me-errors-tp3923880p3925377.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] plotting average effects.

2011-10-21 Thread Bart Joosen
How about posting a reproducible sample, so that we can see what is going on? Read the posting guide!!! -- View this message in context: http://r.789695.n4.nabble.com/plotting-average-effects-tp3923982p3925324.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] POT package

2011-10-21 Thread Amina Shahzadi
npy - length(events1[, obs])/(diff(range(ardieres[, time], + na.rm = TRUE)) - diff(ardieres[c(20945, 20947), time])) This line is from the mannual A user's Guide to POT Approach. I am just trying to ask why the values 20945, 20947 are used?? Regards On Fri, Oct 21, 2011 at 4:19 PM, R. Michael

Re: [R] How to create time series objects combining two vectors

2011-10-21 Thread Gabor Grothendieck
On Fri, Oct 21, 2011 at 6:24 AM, sarelseerower sarelseero...@gmail.com wrote: I am new to R and trying to understand time series objects. I have 2 vectors, one containing rainfall values  (lets call the vector rain) and the other the time/date in seconds (lets call it time). Is there a method

Re: [R] stair-step plot

2011-10-21 Thread Duncan Murdoch
On 21/10/2011 6:39 AM, knut-o wrote: Hello Is it possible to map a plot with horizontal lines like in the step-plot, but without the vertical lines? Not in the basic plot function, but you can write your own fairly easily, using segments(). For example: x - y - 1:10 plot(x,y, type='n')

Re: [R] (no subject)

2011-10-21 Thread Uwe Ligges
On 21.10.2011 13:02, Lisa Henault wrote: can i be taken off of this mailing list please? is there another way that you can access this without having to get all the emails?? [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] glm-poisson fitting 400.000 records

2011-10-21 Thread Ben Bolker
D_Tomas tomasmeca at hotmail.com writes: Hi, I am trying to fi a glm-poisson model to 400.000 records. I have tried biglm and glmulti but i have problems... can it really be the case that 400.000 are too many records??? I am thinking of using random samples of my dataset. I

[R] question about aggregate

2011-10-21 Thread Adel ESSAFI
Hi list I am discovering R, and -- PhD candidate in Computer Science Address 3 avenue lamine, cité ezzahra, Sousse 4000 Tunisia tel: +216 97 246 706 (+33640302046 jusqu'au 15/6) fax: +216 71 391 166 [[alternative HTML version deleted]] __

[R] question about aggregate

2011-10-21 Thread Adel ESSAFI
Hello I am discovering R and I find it is really very powerful. However, I find some newbie difficulties. Here, I have a data frame with manu values that I want to calculate the frequency (the nomber of line) of the some criteria. For exemple here, I want it to print the number of occurence

Re: [R] Change column/row-name

2011-10-21 Thread David Winsemius
On Oct 21, 2011, at 1:57 AM, Jörg Reuter wrote: Hi, I am very happy. My problems are solved without one little thing: (Iske - matrix(c(1, 1, 1, 2, 2, 2, 1, 1, 1, 5, 1, 2, 2, 2, 1, 1, 1, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5,

[R] lattice::xyplot/ggplot2: plotting weighted data frames with lmline and smooth

2011-10-21 Thread Michael Friendly
In the HistData package, I have a data frame, PearsonLee, containing observations on heights of parent and child, in weighted form: library(HistData) str(PearsonLee) 'data.frame': 746 obs. of 6 variables: $ child: num 59.5 59.5 59.5 60.5 60.5 61.5 61.5 61.5 61.5 61.5 ... $ parent

[R] Specifying Greek Character in Lattice Plot Label

2011-10-21 Thread Rich Shepard
For an axis label I want to include the Greek letter mu within the string. I've not found the proper way of including that expression within the string. What I want is Conductivity (uS/cm) with the 'u' replaced by mu. When I try Conductivity ( expression(paste(mu)) S/cm) I get an error. If I

Re: [R] stair-step plot

2011-10-21 Thread David Winsemius
On Oct 21, 2011, at 6:39 AM, knut-o wrote: Hello Is it possible to map a plot with horizontal lines like in the step- plot, but without the vertical lines? There is no function named 'step-plot'. If you are talking about the plot.stepfun function then look at the verticals argument.

Re: [R] Specifying Greek Character in Lattice Plot Label

2011-10-21 Thread David Winsemius
On Oct 21, 2011, at 11:27 AM, Rich Shepard wrote: For an axis label I want to include the Greek letter mu within the string. I've not found the proper way of including that expression within the string. What I want is Conductivity (uS/cm) with the 'u' replaced by mu. When I try

Re: [R] cph/nomogram Design/RMS package hazard ratio: interquartile vs per unit

2011-10-21 Thread David Winsemius
On Oct 20, 2011, at 8:22 PM, renee wrote: Hello, I am constructing a nomogram using cph and nomogram commands in Dr. Harrell's Design/RMS package. The HR that I obtain for dichotomous and categorical variables are identical to those that I obtain using STATA stcox. When posting to r-help it

Re: [R] plotting average effects.

2011-10-21 Thread gradstudent
i will include the data to read if if you so choose. dat - read.dta(http://quantoid.net/hw1_2011.dta;) model in question: mod99 - glm(democracy ~ popc100kpc + ngrevpc, data=dat, family=binomial) -- looking for average effects code, with error on mod99. popckpc is coded in 1k

Re: [R] Multiple factorial comparison LSD

2011-10-21 Thread Richard M. Heiberger
Vera, The glht function in the multcomp package provides the capability you are looking for. The MMC functions in the HH package build on the ghlt function. There are examples in ?MMC on data with more than one factor. Rich On Fri, Oct 21, 2011 at 4:55 AM, Vera Marjorie E. Velasco

Re: [R] Specifying Greek Character in Lattice Plot Label

2011-10-21 Thread Rich Shepard
On Fri, 21 Oct 2011, David Winsemius wrote: plot(1,1, xlab=expression(Conductivity~(*mu*S/cm*)) ) Thank you, David. It did not occur to me to look for a help page. I'll read that now that I looked and found it. Rich __ R-help@r-project.org

Re: [R] replicating SAS's proc rank procedure

2011-10-21 Thread David L Carlson
You can get the same results with the cut() function in R: cut(cars$speed, breaks=quantile(cars$speed, probs=c(0:15/15)), labels=1:15, include.lowest=TRUE) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX

[R] Working With Variables Having Different Lengths

2011-10-21 Thread Rich Shepard
Because of regulatory requirement changes over several decades and weather conditions preventing site access the variables in my data set have different lengths. I'd like guidance on how to perform linear regressions and other models with these variables. For example, there are 2206 rows for

Re: [R] lattice::xyplot/ggplot2: plotting weighted data frames with lmline and smooth

2011-10-21 Thread Dennis Murphy
Hi Michael: Here's one way to get it from ggplot2. To avoid possible overplotting, I jittered the points horizontally by +/- 0.2. I also reduced the point size from the default 2 and increased the line thickness to 1.5 for both fitted curves. In ggplot2, the term faceting is synonymous with

Re: [R] (no subject)

2011-10-21 Thread Trevor Davies
Alternatively, since you are on gmail you can set up a folder and filter so all r-help emails bypass you inbox and go right to an r-help folder (or something). I find it very useful for just browsing during down time so I can offer my assistance or move to an 'r-keepers ' folder the for little

Re: [R] Specifying Greek Character in Lattice Plot Label

2011-10-21 Thread Luke Miller
The following produces something very similar to David's method: plot(1,1, xlab = expression(paste(Conductivity (, mu, S / cm but with a slightly different slash character. I think David's method is more correct, but I've used the above method in the past with some success. On Fri, Oct 21,

Re: [R] Working With Variables Having Different Lengths

2011-10-21 Thread Weidong Gu
Sounds like you are dealing with missing data problem. At default, lm or glm would only keep observations with complete records (complete case analysis). This can be problematic if you have many missing variables and missing values occur not completely at random (i.e., missing values are dependent

Re: [R] Working With Variables Having Different Lengths

2011-10-21 Thread B77S
I know in my experience Cond (conductivity??) doesn't vary much within a stream except for during high flow events, and I would imagine the same is true for TDS. If these are all low flow values, you could possibly determine a mean/median value to use for the missing data points. Obviously this

Re: [R] Specifying Greek Character in Lattice Plot Label

2011-10-21 Thread Rich Shepard
On Fri, 21 Oct 2011, Luke Miller wrote: The following produces something very similar to David's method: plot(1,1, xlab = expression(paste(Conductivity (, mu, S / cm but with a slightly different slash character. I think David's method is more correct, but I've used the above method in the

Re: [R] Working With Variables Having Different Lengths

2011-10-21 Thread Rich Shepard
On Fri, 21 Oct 2011, Weidong Gu wrote: No easy way out with missing data problems, all imputations are based on some strong and untestable assumptions. Thanks for the insights. Let me rephrase my question in a way that should work: is there a way to subset my comprehensive data frame

Re: [R] (no subject)

2011-10-21 Thread Daniel Nordlund
I believe you could also set your subscription to NOMAIL and then read the posts from the R-help archive. This would also allow you to post to R-help since you are still subscribed. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA -Original Message- From:

Re: [R] Working With Variables Having Different Lengths

2011-10-21 Thread Rich Shepard
On Fri, 21 Oct 2011, B77S wrote: I know in my experience Cond (conductivity??) doesn't vary much within a stream except for during high flow events, and I would imagine the same is true for TDS. This is generally true, but not in the streams with which we're working. TDS values, for

Re: [R] plotting average effects.

2011-10-21 Thread Dennis Murphy
Hi: Your approach to computing the means is not efficient; a better way would be to use the aggregate() function. I would start by combining the grouping variable and the three prediction variables into a data frame. To get the groupwise mean for all three prediction variables, you can use a

Re: [R] Working With Variables Having Different Lengths

2011-10-21 Thread David Winsemius
On Oct 21, 2011, at 1:04 PM, Rich Shepard wrote: On Fri, 21 Oct 2011, Weidong Gu wrote: No easy way out with missing data problems, all imputations are based on some strong and untestable assumptions. Thanks for the insights. Let me rephrase my question in a way that should work: is

[R] nls making R not responding

2011-10-21 Thread Schatzi
Here is the code I am running: library(nls2) modeltest- function(A,mu,l,b,thour){ out-vector(length=length(thour)) for (i in 1:length(thour)) { out[i]-b+A/(1+exp(4*mu/A*(l-thour[i])+2)) } return(out) } A=1.3 mu=.22 l = 15 b = .07 thour = 1:25 Yvals-modeltest(A,mu,l,b,thour)-.125+runif(25)/4 st2

Re: [R] Working With Variables Having Different Lengths

2011-10-21 Thread Rich Shepard
On Fri, 21 Oct 2011, David Winsemius wrote: The last part (in the same column) does not make sense, since I was interpreting the term parameter to mean a value in a particular column. David, That's what I meant: two values from the 'param' column. Assuming these are R NA's then logical

[R] Arima Models - Error and jump error

2011-10-21 Thread Flávio Fagundes
Hi people, I´m trying to development a simple routine to run many Arima models result from some parâmeters combination. My data test have one year and daily level. A part of routine is: for ( d in 0:1 ) { for ( p in 0:3 ) { for ( q in 0:3 ) { for ( sd in 0:1 ) {

Re: [R] Working With Variables Having Different Lengths

2011-10-21 Thread Rich Shepard
On Fri, 21 Oct 2011, David Winsemius wrote: The last part (in the same column) does not make sense, since I was interpreting the term parameter to mean a value in a particular column. Assuming these are R NA's then logical indexing: with( chemdata, chemdata[!is.na(param1) !is.na(param2) ,

Re: [R] stacked plot

2011-10-21 Thread Henri-Paul Indiogine
Hi Dennis! Fantastic, great, wonderful, beautiful. I slightly changed your code to adapt it to my situation: ggplot(DF.2, aes(x=file.name, y=value, fill=codes))+geom_histogram(position=stack, stat=identity) + labs(x=document, y=number of codings) ### file.name codes value

Re: [R] Working With Variables Having Different Lengths

2011-10-21 Thread David Winsemius
On Oct 21, 2011, at 2:09 PM, Rich Shepard wrote: On Fri, 21 Oct 2011, David Winsemius wrote: The last part (in the same column) does not make sense, since I was interpreting the term parameter to mean a value in a particular column. Assuming these are R NA's then logical indexing: with(

Re: [R] Arima Models - Error and jump error

2011-10-21 Thread Ken
Perhaps: require(forecast) ?auto.arima # Or look into package fitAR. The first performs seasonal optimization so it is likely better for your application. Ken Hutchison On Oct 21, 2554 BE, at 1:59 PM, Flávio Fagundes flavi...@gmail.com wrote: Hi people, I´m trying to development a

[R] Serialization help.

2011-10-21 Thread rkevinburton
I have the following code: c - file(c:/temp/r/SkuSalesModel.br, rb) s - unserialize(c) close(c) rm(c) And it worked as late as yesterday. Today when I came in I get the following error: Error in .Call(R_unserialize, connection, refhook, PACKAGE = base) : negative length vectors are not

Re: [R] Scatterplot with the 3rd dimension = color?

2011-10-21 Thread Kerry
Awesome, thank you so much for this! I plan to play around with this more next week with my actual data, but it provides a lot more options than I had before I posted. The link will help too. kb On Oct 20, 8:18 pm, Dennis Murphy djmu...@gmail.com wrote: AFAIK, you can't 'add' two ggplot2 graphs

[R] PCA and Regression with complex categorical variables

2011-10-21 Thread seanstclair
__ 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, reproducible code.

Re: [R] How to use gev.fit (package ismev) under box constraints?

2011-10-21 Thread NoSkill ButStyle
Hallo, it seems as if something did not work with my first email I would like to estimate parameters of a general extreme value (GEV) distribution using maximum likelihood as implemented in the gev.fit function of package ismev. If I do the follwing: y.training- c(22, 22, 18, 19, 18, 18, 22,

Re: [R] quantmod package

2011-10-21 Thread ATANU
thanks for the help. but with that code it is possible to save the current quotes in a text file(only the date-time in the first columnis not preserved). when i used read.table and tried to convert it into an xts object it shows error as it cannot take the indices as time object. same case happens

Re: [R] Scatterplot with the 3rd dimension = color?

2011-10-21 Thread Kerry
Beautiful! It works perfectly, thanks! kb On Oct 21, 7:42 am, Jim Lemon j...@bitwrit.com.au wrote: On 10/21/2011 06:25 AM, Kerry wrote: Can someone please help me out with this? The ggplot2 suggestion works great but I've spent a few days trying to figure out how to plot 2 variables with

Re: [R] PCA and Regression with complex categorical variables

2011-10-21 Thread David Winsemius
Did you perhaps send an HTML message? As detailed in the Posting Guide, those get scrubbed by the mail-server. On Oct 21, 2011, at 10:48 AM, seanstcl...@verizon.net wrote: nothing -- David Winsemius, MD West Hartford, CT __ R-help@r-project.org

Re: [R] lattice::xyplot/ggplot2: plotting weighted data frames with lmline and smooth

2011-10-21 Thread Michael Friendly
Thanks very much, Dennis. See below for something I don't understand. On 10/21/2011 12:15 PM, Dennis Murphy wrote: Hi Michael: Here's one way to get it from ggplot2. To avoid possible overplotting, I jittered the points horizontally by ± 0.2. I also reduced the point size from the default 2

Re: [R] Working With Variables Having Different Lengths

2011-10-21 Thread Rich Shepard
On Fri, 21 Oct 2011, David Winsemius wrote: First you need to clarify whether TDS is the name of a column or a possible value in a column named param. This whole painful multi-question process would be greatly accelerated if you offered str(chemdata). Yes, I did on a different thread, but

[R] rgl device on web

2011-10-21 Thread Ben qant
Hello, I'm looking for help putting an interactive rgl package 3d device on the web so that it maintains full functionality. Where should I start? Is it possible? Is there an example I can see? (Note: I'm also looking at putting other normal plots on the web.) I'd like to stay within R as much as

Re: [R] Working With Variables Having Different Lengths

2011-10-21 Thread David Winsemius
On Oct 21, 2011, at 3:02 PM, Rich Shepard wrote: On Fri, 21 Oct 2011, David Winsemius wrote: First you need to clarify whether TDS is the name of a column or a possible value in a column named param. This whole painful multi-question process would be greatly accelerated if you offered

[R] Kleinberg's burst detection algorithm

2011-10-21 Thread Stavros Macrakis
Has anyone here implemented Jon Kleinberg's burst detection algorithm (Bursty and Hierarchical Structure in Streams http://www.cs.cornell.edu/home/kleinber/bhs.pdf)? I'd rather not reimplement if there's already running code available Thanks, -s [[alternative HTML

Re: [R] glm-poisson fitting 400.000 records

2011-10-21 Thread D_Tomas
My apologies for my vague comment. My data comprises 400.000 x 21 (17 explanatory variables, plus response variable, plus two offsets). If I build the full model (only linear) I get: Error: cannot allocate vector of size 112.3 Mb I have a 4GB RAM laptop... Would i get any improvemnt on a

Re: [R] Find a particular point on a curve

2011-10-21 Thread Joanie
The most important thing is the point termed C (on the image): http://r.789695.n4.nabble.com/file/n3926631/courbe_temp%C3%A9rature.png which is the first point (time, temperature) where temperature stabilizes after the temperature drop (end of feeding). The definition of that particular point is

  1   2   >