similar to: '...' passed to both plot() and legend()

Displaying 20 results from an estimated 10000 matches similar to: "'...' passed to both plot() and legend()"

2005 Nov 21
1
Howto? plot legend with no line behind the points
Hi R-help, We are using R 2.2 on Win XP and have a detail question on how the legend can be optimised. We use the following; -> plot(,type="b",...) The lines in the plot do not cross the points. How can we obtain the same effect in the legend? (points without a line through them..) We tried setting the pt.bg to white but this did not help. See script below. thanks, Jan
2006 May 12
3
Maximum likelihood estimate of bivariate vonmises-weibulldistribution
Thanks Dimitris!!! That's much clearer now. Still have a lot of work to do this weekend to understand every bit but your code will prove very useful. Cheers, Aziz -----Original Message----- From: Dimitrios Rizopoulos [mailto:Dimitris.Rizopoulos at med.kuleuven.be] Sent: May 12, 2006 4:35 PM To: Chaouch, Aziz Subject: RE: [R] Maximum likelihood estimate of bivariate
2006 Nov 09
4
Plotting symbols with two positions?
Thanks a lot to Demitris for a prompt answer some minutes ago on another tread (see below). To avoid excess mails on the list, I move onto next question: I have another small plotting problem that confuses me. I want to plot results from a field trial series, using the numbers of the trials as symbols in the plot. pch = as.character(trial_no) works fine, but truncates the trial number to the
2005 Jan 21
2
chi-Squared distribution in Friedman test
Dear R helpers: Thanks for the previous reply. I am using Friedman racing test. According the the book "Pratical Nonprametric Statistic" by WJ Conover, after computing the statistics, he suggested to use chi-squared or F distribution to accept or reject null hypothesis. After looking into the source code, I found that R uses chi-sqaured distribution as below: PVAL <-
2008 Apr 17
1
survreg() with frailty
Dear R-users, I have noticed small discrepencies in the reported estimate of the variance of the frailty by the print method for survreg() and the 'theta' component included in the object fit: # Examples in R-2.6.2 for Windows library(survival) # version 2.34-1 (2008-03-31) # discrepancy fit1 <- survreg(Surv(time, status) ~ rx + frailty(litter), rats) fit1 fit1$history[[1]]$theta
2007 Feb 23
1
Bootstrapping stepAIC() with glm.nb()
Dear all, I would like to Boostrap the stepAIC() procedure from package MASS for variety of model objects, i.e., fn <- function(object, data, B = 2){ n <- nrow(data) res <- vector(mode = "list", length = B) index <- sample(n, n * B, replace = TRUE) dim(index) <- c(n, B) for (i in 1:B) { up.obj <- update(object, data = data[index[, i], ])
2008 May 12
2
Collection of lm()s
Hello, I would like to create a subscriptable collection (presumably a list) of lm() models. I have a data frame DX containing 6 groups of data. The general idea is (NOT RUN) ... for (i in 1:6) { DXS = subset( DX, <whatever>); LMX[ i] = lm( <formula>, data = DXS); } Now access model results by subscript ... e.g. coefficients( LMX[ 2]). Or would it be [[ 2]]? I
2006 Apr 18
4
how to change legend size in a figure
Dear All, I am producing a figure with many curves on it. How do I make the legends for all those curves smaller so that it can fit the figure itself? The commands I used for ploting are: plot(x1,y1,col=1,lty=1) lines(x2,y2,col=2,lty=2) ... legend(0.3,0.4,c("name1","name2",...),col=1:20,lty=1:20) Any tips for making the legend fit the figure will very welcome! Thanks! Best,
2005 Apr 08
1
Can't get function to run iteratively
Trying to do something very simple... > numerical.grad function(func,x, eps=1e-12) { # very simple (crude) numerical approximation f <-func(x) df <-1:length(x) for (i in 1:length(x)) { dx <- x dx[i] <- dx[i] +eps df[i] <- (func(dx)-f)/eps } df } > test<-function(x){x^2} > y<-seq(0.1,0.5,0.1) > numerical.grad(test,y) [1] 0.1999997 0.0000000
2004 Sep 22
3
loops: pasting indexes in variables names
I cannot figure out how, using R, I can paste indexes or characters to the variable names which are used within loops. I will explain this with a simple example: Immagine I have a huge series of variables, each one taken two times, say x1 x2 y1 y2 z1 z2..... Now, immagine that I want to compute a variable from the difference of each couple, say dx=x1-x2, dy=y1-y2, dz=z1-z2... In Stata, for
2005 Sep 12
1
poisson mean hypothesis
Dear R-users, Is there a way to get p-values for a one-sided hypothesis test about a poisson mean? Thanks, Jan Wijffels University Center for Statistics W. de Croylaan 54 3001 Heverlee Belgium tel: +32 (0)16 322784 fax: +32 (0)16 322831 <http://www.kuleuven.be/ucs> http://www.kuleuven.be/ucs Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm [[alternative HTML version
2005 Aug 22
1
How to add legend of plot.Design function (method=image)? (if (!.R.) )
Hi, When running z <- plot(fit, age=NA, cholesterol=NA, perim=boundaries, method='image') Legend(z, fun=plogis, at=qlogis(c(.01,.05,.1,.2,.3,.4,.5)), zlab='Probability') And after pointing the cursor to the plot() screen in R, I obtain the following message: Using function "locator(2)" to place opposite corners of image.legend Error in
2006 Apr 18
2
get the parameter estimates from lm model
R-help, Sorry for posting the same question (almost) once again. I'm using a lm model for some data. The code is below: fitData <- glm(pm ~ age + mw , family = binomial(link = logit), maxit = 30, data = inputModel1) "age" is a factor and "mw" is a continous variable. The summary function does not provide the parameter estimates for the first level of the
2009 Sep 11
1
Constructing variables conditional on two indicators
Dear R users I have a data frame that looks like this: m j X1 X2 1 1 1 2 1 ... 1 J 2 1 2 2 2 ... 2 J . . . M 1 M 2 M ... M J The data frame essentially looks like a panel: m and j are indicators where m is 1:M and j is 1:J (and M > J); X1 and X2 are variables. I
2005 Feb 22
2
ERROR NaNs produced; when comparing two logistic regression models with the ANOVA CHI test
Dear R-list, *When comparing two logistic regression models with the anova CHi test, I obtain the following error: (there are no NA's in the time series). How can this be solved such that I can compare two models on the same dataset were different explanatory variables are used? l.KBDI <- glm(zna.arson2 ~ zna.KBDI,family = binomial) l.NDWI <- glm(zna.arson2 ~ zna.NDWI,family
2006 Jun 28
1
lme - Random Effects Struture
Thanks for the help Dimitris, However I still have a question, this time I'll be more specific, the following is my SAS code proc mixed data=Reg; class ID; model y=Time Time*x1 Time*x2 Time*x3 /S; random intercept Time /S type=UN subject=ID G GCORR V; repeated /subject = ID R RCORR; run; ** (Type =UN for random effects) The eqivalent lme statement I
2004 May 27
2
block diagonal matrix function
Hello List I have just written a little function that takes two matrices as arguments and returns a large matrix that is composed of the two input matrices in upper-left position and lower-right position with a padding value everywhere else. (function definition and toy example below). I need nonsquare matrices and rowname() and colname() inherited appropriately. Two questions: (1) Is there a
2005 Nov 04
2
Simplify iterative programming
Dear, I am looking for the simplification of a formula to improve the calculation speed of my program. Therefore I want to simplify the following formula: H = sum{i=0..n-1 , [ sum {j=0..m-1 , sqrt ( (Ai - Bj)^2 + (Ci - Dj)^2) } ] } where: A, C = two vectors (with numerical data) of length n B, D = two vectors (with numerical data) of length m sqrt = square root Ai = element of A with index
2004 Aug 09
1
Follow-up Q Re: displaying computation outputs inside "for" loops
I have a somewhat related question. A while back I was doing some simulations using for() loops, and I wanted to keep track of the iterations using a line of code quite similar to what Dimitris presented below. Instead of printing the iteration message at the end of each iteration (actually, at the end of every 100th), nothing was printed until the for() loop was complete, and *then* all
2006 May 29
2
newbie question: ROW average
Dimitris Rizopoulos wrote: > look at ?rowMeans; you can also use "apply(mat, 1, mean)" but > rowMeans() is better. By my reading of the question, this is not what Ezhil wants. He said: ``I have a 992 x 74 matrix. I would like to form a new matrix by averaging each 4 rows from the original one.'' I.e. he wants (I think) the first row of the new matrix to be the