similar to: adding a line to a single panel of a lattice plot

Displaying 20 results from an estimated 1000 matches similar to: "adding a line to a single panel of a lattice plot"

2003 Nov 05
2
Multiple comparisons with a glm
I've never seen anything written about multiple comparisons, as in the multcomp package or with TukeyHSD, but using a glm. Do such procedures exist? Are they sensible? Are there any packages in R that implement such comparisons? Thank you. -- Ken Knoblauch Inserm U371 Cerveau et Vision 18 avenue du Doyen Lepine 69675 Bron cedex France Tel: +33 (0)4 72 91 34 77 Fax: +33 (0)4 72 91 34 61
2004 Jun 15
1
AIC in glm.nb and glm(...family=negative.binomial(.))
Can anyone explain to me why the AIC values are so different when using glm.nb and glm with a negative.binomial family, from the MASS library? I'm using R 1.8.1 with Mac 0S 10.3.4. >library(MASS) > dfr <- data.frame(c=rnbinom(100,size=2,mu=rep(c(10,20,100,1000),rep(25,4))), + f=factor(rep(seq(1,4),rep(25,4)))) > AIC(nb1 <- glm.nb(c~f, data=dfr)) [1] 1047 >
2005 Apr 04
1
help with kolmogorov smirnov test
What does 'with ties in' mean? with some identical elements (par ex., au moins une paire ex-equo) HTH ____________________ Ken Knoblauch Inserm U371, Cerveau et Vision Department of Cognitive Neurosciences 18 avenue du Doyen Lepine 69675 Bron cedex France tel: +33 (0)4 72 91 34 77 fax: +33 (0)4 72 91 34 61 portable: 06 84 10 64 10 http://www.lyon.inserm.fr/371/
2005 Mar 02
2
apply a function to a rolling subset of a vector
Try this: > ?convolve > x<-rnorm(1000) > y<-rep(1,20) > z<-convolve(x,y,type="filter") > plot(x,type="l") > str(z) num [1:981] 6.31 7.28 8.16 7.39 4.65 ... > lines(c(rep(0,10),z,rep(0,10)),col="yellow",lwd=3) > lines(c(rep(0,10),z,rep(0,10))/length(y),col="red",lwd=3) #running mean You wrote: Does anyone know an easy way
2005 Mar 09
3
problem using uniroot with integrate
Hi, I'm trying to calculate the value of the variable, dp, below, in the argument to the integral of dnorm(x-dp) * pnorm(x)^(m-1). This corresponds to the estimate of the sensitivity of an observer in an m-alternative forced choice experiment, given the probability of a correct response, Pc, a Gaussian assumption for the noise and no bias. The function that I wrote below gives me an error:
2007 Sep 03
3
plotting predicted curves with log scale in lattice
Hi, I was taken off guard by the following behavior in a lattice plot. I frequently want to add a predicted curve defined at more points than in the formula expression of xyplot. There have been numerous examples of how to do this on r-help, but I still often struggle to make this work. I just realized that specifying one of the axes on a log scale does not guarantee that the added data for a
2006 May 17
0
adding grid lines to an xyplot when there is only 1 panel
I've been struggling with this for a while and cannot get it to work. Is there a simple way to add grid lines ---- I'd like to only add the horizontal ones --- when using the groups argument in xyplot? I can get the grid lines to plot, or the points/lines, but not both. Here is a simple example of the sort of thing that I'm working with. Thanks, in advance. >all est STE
2006 May 18
1
adding grid lines to an xyplot when there is only 1 panel - corrected
Sorry, some things got garbled in that request for help that might make my request unintelligible, probably it being too late at night when I posted, here is the corrected function call for which I would like to learn how to add horizontal grid lines. Any suggestions would be appreciated. Apologies for the posting error xyplot(est ~ STE, data = all, groups = AREA, type = "b",
2007 May 29
0
new packages psyphy and MLDS
New packages psyphy and MLDS are available on CRAN: psyphy ncludes an assortment of functions useful in analyzing data from pyschophysical experiments. It includes functions for calculating d' from several different experimental designs, links for mafc to be used with the binomial family in glm (and possibly other contexts) and selfStart functions for estimating gamma values
2007 May 29
0
new packages psyphy and MLDS
New packages psyphy and MLDS are available on CRAN: psyphy ncludes an assortment of functions useful in analyzing data from pyschophysical experiments. It includes functions for calculating d' from several different experimental designs, links for mafc to be used with the binomial family in glm (and possibly other contexts) and selfStart functions for estimating gamma values
2007 Sep 01
1
Sweave rendering of simple character
Hi, When I compile the construction \begin{Scode}{eval=FALSE} ?HSP \end{Scode} with Sweave and latex, it outputs in the pdf as, > `?` (HSP) which is not incorrect but a bit more formal than I wanted for demonstrating the use of the help shortcut. I would like the output to look like, > ?HSP but I can't seem to make this work. I have also tried the results=verbatim argument.
2007 Mar 17
1
problem with mfg argument of par
I'm having a problem with the mfg option of par. Am I making an error in my usage? Here is a simple example that I thought would plot to the 4 corners of a 2x2 plot but doesn't plot to the lower right and plots twice on the upper left. par(mfrow = c(2, 2)) pos <- as.matrix(expand.grid(1:2, 1:2)) for (ix in 4:1) { par(mfg = pos[ix, ]) plot(1:5) } Thank you in advance. R version
2007 Mar 11
1
using scan to record user's input
I'm using scan in a script to record a series of responses of the user as a function of some graphs that I put up on the screen. A toy version would be, y <- rep(NA, 3) for (ix in seq( length(y) ) ) { y[ix] <- scan( n = 1 ) } However, if I include any code after this loop, for example, y <- rep(NA, 3) for (ix in seq( length(y) ) ) { y[ix] <- scan( n = 1 ) } y I get an error
2008 Oct 16
1
packages in Depends field and NAMESPACES
Must packages in the Depends field of the DESCRIPTION file have NAMESPACES? I haven't seen this explicitly indicated anywhere. I am writing a small package and find that when I add the abind package to the list of the Depends field, I get an error in R CMD check of the build. * checking package name space information ... OK * checking package dependencies ... ERROR Packages required but not
2005 Sep 08
1
FW: Re: Doubt about nested aov output
Your response nicely clarifies a question that I've had for a long time, but which I've dealt with by giving each subject a unique label. Unless I'm missing something, both techniques should work as the toy example below gives exactly the same output in all 3 cases below (forgetting about the convergence problem). Would there be a reason to prefer labeling the levels one way or
2008 Sep 09
1
puzzle about contrasts
Hi, I'm trying to redefine the contrasts for a linear model. With a 2 level factor, x, with levels A and B, a two level factor outputs A and B - A from an lm fit, say lm(y ~ x). I would like to set the contrasts so that the coefficients output are -0.5 (A + B) and B - A, but I can't get the sign correct for the first coefficient (Intercept). Here is a toy example, set.seed(12161952) y
2006 Nov 18
1
deriv when one term is indexed
Hi, I'm fitting a standard nonlinear model to the luminances measured from the red, green and blue guns of a TV display, using nls. The call is: dd.nls <- nls(Lum ~ Blev + beta[Gun] * GL^gamm, data = dd, start = st) where st was initally estimated using optim() st $Blev [1] -0.06551802 $beta [1] 1.509686e-05 4.555250e-05 7.322720e-06 $gamm [1] 2.511870 This works fine but I
2008 Jan 20
3
Logical test and look up table
Dear R users, I have a data frame with one column (4000 rows) containing name codes (factor with 63 levels). I would like to associate each name with a particular Type (coded as 1,2,3,4,H or H1) in a second column. Is it possible to do a lookup table of associations (i.e. A23 is of type 1, A13 is of type 3 ...) so as to fill up automatically the $Type column. df() $Source $Type A23 A24 A9 A32
2010 Mar 06
0
thin grid lines, again (FAQ 7.36), a proposal
Hi, I'm raising the issue, again, of those pesky thin lines that show up with a pdf graphics device, otherwise known as FAQ 7.36. I have read the FAQ and understand that I can eliminate them by adjusting the anti-aliasing option for viewing them on the screen, but this doesn't necessarily eliminate them for a print device or for transferring them into a powerpoint or similar type of
2003 May 13
1
several regression lines in panel of xyplot (trellis graphics)
Dear r-help, I need to draw xyplot() graphs with several regression lines: one line for the whole range of x (the variable on the horizontal axis) and two additional lines for subranges of x. Is it possible to make first regression line (panel.lmline(x,y,...);) to be drawn on the whole graph and regression lines of the subsets to be drawn only over their subsets? I have defined