[R] use different symbols for frequency in a plot

2005-08-08 Thread Kerry Bush
suppose I have the following data x-c(rep(.1,5),rep(.2,6),rep(.4,10),rep(.5,20)) y-c(rep(.5,3),rep(.6,8),rep(1.2,8),rep(2.5,18),rep(3,4)) If I plot(x,y) in R, I will only get seven distinct points. What I want to do is to use different symbols to show the frequency at each point. e.g. if the

Re: [R] use different symbols for frequency in a plot

2005-08-08 Thread Kerry Bush
still the following library(hexbin) plot( hexbin(x, y) ) Regards, Adai On Mon, 2005-08-08 at 11:57 -0700, Kerry Bush wrote: suppose I have the following data x-c(rep(.1,5),rep(.2,6),rep(.4,10),rep(.5,20)) y-c(rep(.5,3),rep(.6,8),rep(1.2,8),rep(2.5,18),rep(3,4)) If I

Re: [R] AIC model selection

2005-08-08 Thread Kerry Bush
The last time I used it, the function step() was using AIC as model selection criteria as the default. It is in the base package so you don't have to refer to other fancy functions. --- Adaikalavan Ramasamy [EMAIL PROTECTED] wrote: Are you looking for possibly stepAIC from the package MASS ?

[R] choose between dates and times

2005-07-26 Thread Kerry Bush
Dear R-helpers, I have the following data: yhappenat x 5185 (07/22/05 00:05:14) 14 5186 (07/22/05 00:15:14) 14 5187 (07/22/05 00:25:14) 14 5188 (07/22/05 00:35:14) 14 .. I want to choose between 07/25/05 15:30:00 and 07/26/05 12:30:00. Anybody

[R] How to set the background of xyplot() to be white?

2005-07-17 Thread Kerry Bush
The usual background of xyplot is grey. Is there any advantage of using this color instead of white? I don't know how to change this specification into other colors. Anybody knows? __ R-help@stat.math.ethz.ch mailing list

[R] Where to learn how to deal with time class variable?

2005-07-17 Thread Kerry Bush
Dear R-helpers, In my data set, I have a time variable 'RecordTime' whose class property is 'times'. When I list my data set, I see the values of RecordTime is like 10:20:30 in a 'h:m:s' format. Suppose I want to choose all the data after 10 o'clock, then use subset(data,RecordTime10:20:30)

Re: [R] plot the number of replicates at the same point

2005-07-14 Thread Kerry Bush
On Wed, 13 Jul 2005, Kerry Bush wrote: Dear R-helper, I want to plot the following-like data: x y 1 1 1 1 1 2 1 3 1 3 1 4 .. In the plot that produced, I don't want to show the usual circles or points. Instead, I want to show the number of replicates at that point

[R] plot the number of replicates at the same point

2005-07-13 Thread Kerry Bush
Dear R-helper, I want to plot the following-like data: x y 1 1 1 1 1 2 1 3 1 3 1 4 .. In the plot that produced, I don't want to show the usual circles or points. Instead, I want to show the number of replicates at that point. e.g. at the position of (1,1), there are 2 obsevations, so a

[R] Is it possible to use glm() with 30 observations?

2005-07-01 Thread Kerry Bush
I have a very simple problem. When using glm to fit binary logistic regression model, sometimes I receive the following warning: Warning messages: 1: fitted probabilities numerically 0 or 1 occurred in: glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart, 2: fitted

[R] need help on computing double summation

2005-06-15 Thread Kerry Bush
Dear helpers in this forum, This is a clarified version of my previous questions in this forum. I really need your generous help on this issue. Suppose I have the following data set: id x y 023 1 2 023 2 5 023 4 6 023 5 7 412 2 5 412 3 4 412 4 6 412 7 9 220 5 7 220 4 8 220 9

[R] within and between subject calculation

2005-06-14 Thread Kerry Bush
Dear helpers in this forum, I have the following question: Suppose I have the following data set: id x y 023 1 2 023 2 5 023 4 6 023 5 7 412 2 5 412 3 4 412 4 6 412 7 9 220 5 7 220 4 8 220 9 8 .. and i want to calculate sum_{i=1}^k sum_{j=1}^{n_i}x_{ij}*y_{ij} is there a simple way to do

[R] use of gam

2005-06-13 Thread Kerry Bush
Suppose I fit the following model: library(gam) fit - gam(y~x1+x2+s(x3),family=binomial) and then I use fitf$coef x1x2 s(x3) 4.1947460 2.7967200 0.0788252 are the coefficients for x1 and x2 the estimated coefficients? what is the meaning of s(x3)? since this is a

Fwd: Re: [R] Prediction using GAM

2005-03-25 Thread Kerry Bush
', prediction difficulties of this sort for the S version are discussed in the White Book, MASS and elsewhere (but I recall reading that they did not apply to the R version). On Wed, 23 Mar 2005, Kerry Bush wrote: Recently I was using GAM and couldn't help noticing the following

[R] gam in library(gam)

2005-03-25 Thread Kerry Bush
I know there are two versions of gam in R. One is in library(mgcv) and one is in library(gam). The one in mgcv can automatically calculate the smoothing parameter. However, the one in gam can't although it can incorporate a larger variety of smoothers (besides spline). Can anybody educate me if

[R] Prediction using GAM

2005-03-23 Thread Kerry Bush
Recently I was using GAM and couldn't help noticing the following incoherence in prediction: data(gam.data) data(gam.newdata) gam.object - gam(y ~ s(x,6) + z, data=gam.data) predict(gam.object)[1] 1 0.8017407 predict(gam.object,data.frame(x=gam.data$x[1],z=gam.data$z[1]))