Displaying 20 results from an estimated 10000 matches similar to: "histogram colors in lattice"
2005 Feb 16
2
problem with se.contrast()
I am having trouble getting standard errors for contrasts using se.contrast() in
what appears to be a simple case to me. The following test example illustrates
my problem:
Lab <- factor(rep(c("1","2","3"),each=12))
Material <- factor(rep(c("A","B","C","D"),each=3,times=3))
Measurement <-
2004 Feb 01
1
error in building R-1.9.0 sources under Win32
I am trying to compile the R-dev sources on WinXP using mingw 3.1.0-1
and fpTeX 0.7. In the past I
have been able to build the sources fine but now I receive an error in
the process that I havent seen reported on the list before. Everything
works fine until I get to 'make docs'. I now get the message below while
building the R-admin manual (refman.pdf builds fine) and the make
process
2001 Nov 12
3
histogram question
hist(rbinom(1000,10,0.5),col=2,xlim=c(0,10),ylim=c(0,300))
gives a histogram with "touching bars"
hist(rbinom(100000,10,0.5),col=2,xlim=c(0,10),ylim=c(0,30000))
gives a histogram with space between the bars.
is there a way to control the space betweent he bars easily?
--
Erich Neuwirth, Computer Supported Didactics Working Group
Visit our SunSITE at http://sunsite.univie.ac.at
2009 Dec 02
1
Generate missing data patterns
Dear R-users,
i try to generate missing values in a matrix X according to a given
missingnes pattern R with the probabilities p per row.
X<-matrix(rnorm(3*100),ncol=3)
## indicator matrix for missingnes (1 observed, 0 missing)
R<-matrix(c(1,1,1,
0,0,1,
1,1,0,
0,1,1),ncol=3,byrow=TRUE)
## probabilities for row 1, row 2, row 3 and row 4
2005 Mar 16
1
Code to replace nested for loops
Dear list members,
How can I replace the nested for loops at then end of the script
below with more efficient code?
# Begin script__________________________________________________
# Dichotomous scores for 100 respondents on 3 items with
# probabilities of a correct response = .6, .4, and .7,
# respectively
x1 <- rbinom(100,1,.6)
x2 <- rbinom(100,1,.4)
x3 <- rbinom(100,1,.7)
#
2010 Sep 24
1
Standard Error for difference in predicted probabilities
Is there a way to estimate the standard error for the difference in
predicted probabilities obtained from a logistic regression model?
For example, this code gives the difference for the predicted
probability of when x2==1 vs. when x2==0, holding x1 constant at its
mean:
y=rbinom(100,1,.4)
x1=rnorm(100, 3, 2)
x2=rbinom(100, 1, .7)
mod=glm(y ~ x1 + x2, family=binomial)
pred=predict(mod,
2011 Jun 08
3
Histogram
Hello ,
I am trying to create a histogram in order to compare between two groups and
would like it to be similar to the figure attached. How can I generate this
using R ?
Thank you,
Nandini http://r.789695.n4.nabble.com/file/n3582448/5634-15977-1-PB.gif
--
View this message in context: http://r.789695.n4.nabble.com/Histogram-tp3582448p3582448.html
Sent from the R help mailing list archive at
2010 Aug 13
1
Lattice: Superimposing histograms with different colors and transparency effects
Dear users,
I would like to plot several histograms superimposed on the same panel
with different colors, with superimposed polygons appearing with
transparency effects. I also want estimated densities to appear on the
same plot. For several reasons, including that I like it, I want to use
the lattice package.
I have several questions regarding the use of the 'histogram' function
with a
Barchart in lattice - wrong order of groups, data labels on top of each other, and a legend question
2009 May 18
1
Barchart in lattice - wrong order of groups, data labels on top of each other, and a legend question
Hello!
I have a question about my lattice barchart that I am trying to build
in Section 3 below. I can't figure out a couple of things:
1. When I look at the dataframe "test" that I am trying to plot, it
looks right to me (the group "Total" is always the first out of 5).
However, in the chart it is the last. Why?
2. How can I make sure the value labels (on y) are not
2010 May 07
2
smooth line overlap with histogram
Hi r-users,
I would like to overlap a smooth line on the histogram. I tried using spline but it does not work.
sq <- seq(0,900,by=50)
sq.50 <- as.character(sq)
datobs <- sum_pos
## first, plot histogram
histo <- hist(datobs,breaks=sq,freq=F)
## extract counts from histogram and calculate the probability in
## each specified interval. Also check the length of the interval is
2008 Feb 26
4
"Raw" histogram plots
Hello
I need to plot a histogram, but insted of using bars, I'd like to plot
the data points. I've been doing it like this so far:
h <- hist(x, plot = F)
plot(y = x$counts / sum(x$counts),
x = x$breaks[2:length(x$breaks)],
type = "p", log = "xy")
Sometimes I want to have a look at the "raw" data (avoiding any kind of
binning). When x
2008 Jun 21
1
Coloring Stripchart Points, or Better, Lattice Equivalent
Hi All.
I have the commands below to create a stripchart/plot. I was hoping to
color the points in the plot by yr, and use a symbol that varied with resp.
However, the outcome makes it appear as though the point by point col and
pch data is not being passed properly. Any suggestions?
And truthfully, I?d rather be doing this with Lattice, but I?ve tried
several variations of stripplot and can?t
2008 Jul 17
3
Histogram with two colors depending on condition
Dear List,
Say, we generate data like this-
dat<-rnorm(1000,1,2)
hist(dat)
How do i make the histogram, say, red (col = 2) before X = dat = 0, and rest say, green (col = 3) beyond X = dat = 0 in R?
The resulting histogram could be like this http://ehsan.karim.googlepages.com/histogram.JPG (edited)
Thanks in advance.
Ehsan
http://ehsan.karim.googlepages.com/diaryofastatistician
2007 Sep 17
3
Histogram with colors
Is there a simple way to plot a histogram with colors?
For example, suppose I generate random points in the
N(2,1) distribution:
x <- rnorm(100000, mean = 2, sd = 1)
Now I would like to plot the histogram:
hist(x)
but I would like to show the bars with x < 0 in red, and the
bars with x >= 0 in lightgreen. Is there any simple way to
do it?
I think I can do it in two steps:
2012 Aug 31
3
fitting lognormal censored data
Hi ,
I am trying to get some estimator based on lognormal distribution when we have left,interval, and right censored data. Since, there is now avalible pakage in R can help me in this, I had to write my own code using Newton Raphson method which requires first and second derivative of log likelihood but my problem after runing the code is the estimators were too high. with this email ,I provide
2000 Feb 17
2
bug in rbinom? (PR#448)
# Your mailer is set to "none" (default on Windows),
# hence we cannot send the bug report directly from R.
# Please copy the bug report (after finishing it) to
# your favorite email program and send it to
#
# r-bugs@biostat.ku.dk
#
######################################################
In version 0.99.0 for Windows NT I get the following:
> .Random.seed
[1] 0 21012
2005 Oct 11
1
summary of Surv object crashes R 2.2.0 (PR#8203)
Full_Name: Victor Moreno
Version: 2.2.0
OS: windows
Submission from: (NULL) (213.151.99.160)
summary of an object class Surv (package survival) hangs and closes R 2.2.0
I would like to have Surv objects in a data frame to build models easier:
t<-rexp(100)
s<-rbinom(100,1,.3)
surv<-Surv(t,s)
x1<-rnorm(100,10,2)
x2<-rnorm(100,10,2)
dat<-data.frame(surv,x1,x2)
2007 Dec 30
1
Histogram with different colors for different portions
Dear Rusers,
I would like to color different sections of a histogram different colors.
I have an example that was done by "brute force" given below. Has anyone
implemented something like this in general? If not, any suggestions/pointers
on how to write a general function to do so would be most appreciated.
Alan-
2008 Oct 08
2
Histogram colours in lattice.
I am trying to do a histogram lattice plot and I would like the
histogram to be filled with a different colour in each panel.
Note: I want every bar in each histogram to be the same colour,
but that there should be different colours *between* histograms.
Can't seem to get this to work. I thought that something like
the following would be a goer:
set.seed(42)
X <- rnorm(200)
A <-
2010 Jun 23
1
Generation of binomial numbers using a loop
Dea'R' helpers
I have following data -
prob = c(0.1, 0.2, 0.3, 0.4, 0.5)
frequency = c(100, 75, 45, 30, 25)
no_trials = c(10, 8, 6, 4, 2)
freq1 = rbinom(frequency[1], no_trials[1], prob[1])
freq2 = rbinom(frequency[2], no_trials[2], prob[2])
freq3 = rbinom(frequency[3], no_trials[3], prob[3])
freq4 = rbinom(frequency[4], no_trials[4], prob[4])
freq5 = rbinom(frequency[5],