Displaying 20 results from an estimated 100 matches similar to: "Accessing Max/Min Value of Density Function"
2009 Jun 03
1
Would like to add this to example for plotmath. Can you help?
Greetings:
I would like comments on this example and after fixing it up, I need
help from someone who has access to insert this in R's help page for
plotmath.
I uploaded a drawing
http://pj.freefaculty.org/R/Normal-2009.pdf
that is created by the following code
http://pj.freefaculty.org/R/Normal1_2009_plotmathExample.R
This will be a good addition to the plotmath help page/example.
2008 Apr 02
1
Trouble combining plotmath, bquote, expressions
I'm using R-2.6.2 on Fedora Linux 9.
I've been experimenting with plotmath.
I wish it were easier to combine expressions in plotmath with values
from the R program itself. There are two parameters in the following
example, the mean "mymean" and standard deviation "mystd". I am able
to use bquote to write elements into the graph title like
mu = mymean
and R will
2008 Apr 08
2
plotmath "overstrikes" in output on a Linux system
I've been testing plotmath. But I'm getting some funny output one one
computer. The problem is that characters are 'jumbled' and overstrike
when symbols are introduced.
Sample code:
mu <- 440.0
sigma <- 12.5
myx <- seq( mu - 4*sigma, mu+ 4*sigma, length.out=500)
myDensity <- dnorm(myx,mean=mu,sd=sigma)
# Here's one way to retrieve the values of mu and sigma and
2003 Apr 18
3
superimposing graphs
Dear People,
I have a data set of data x from a probability distribution, and I have a
function, mydensity, of the pdf of that distribution.
I'm asking for help in superimposing the histogram of x and the plot of
mydensity.
In the function below, I call truehist and curve, but these are plotted in
different figures.
I'd like them to be plotted on the same figure, and to use common
2010 Jul 06
1
plotmath vector problem; full program enclosed
Here's another example of my plotmath whipping boy, the Normal distribution.
A colleague asks for a Normal plotted above a series of axes that
represent various other distributions (T, etc).
I want to use vectors of equations in plotmath to do this, but have
run into trouble. Now I've isolated the problem down to a relatively
small piece of working example code (below). If you would
2010 Mar 09
3
Shade area under curve
I want to shade the area under the curve of the standard normal density.
Specifically color to the left of -2 and on. How might i go about doing
this?
Thanks
--
View this message in context: http://n4.nabble.com/Shade-area-under-curve-tp1586439p1586439.html
Sent from the R help mailing list archive at Nabble.com.
2008 Dec 31
3
Plotmath with values?
I hope to use the plotmath facility to print titles that mix
math and values of R variables.
The help for "plotmath" has an example, which after repeated
reading, I find baffling. Likewise, I have read the help file
for "substitute" (wqhich seems to be needed) without ever
understanding what it does, other than being used in some magic
incantations.
I would like to do
2017 Sep 13
0
ggmap + geom_raster
Dear all,
I want to :
1. Estimate a weighted 2D kernel.
2. Paint a heatmap on a ggmap.
Here is some reproducible data / code (I got it from the internet) :
s_rit <- structure(list(score = c(45, 60, 38, 98, 98, 53, 90, 42, 96,
45, 89, 18, 66, 2, 45, 98, 6, 83, 63, 86, 63, 81, 70, 8, 78,
15, 7, 86, 15, 63, 55, 13, 83, 76, 78, 70, 64, 88, 61, 78, 4,
7, 1, 70, 88, 58, 70, 58, 11, 45, 28, 42,
2008 May 23
1
Re : How to import package into R script
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20080523/7061f532/attachment.pl>
2008 May 26
1
Joining Histograms Into a Figure
Hi,
I have two histograms created separately using
the following code. It creates two separate figures.
dat <- read.table(file="GDS1096.modelout", head = FALSE )
__BEGIN__
dat <- read.table(file="GDS1096.modelout", head = FALSE )
hist(dat$V2, main="AIC Freq", xlab = "\# Component", breaks = 36, xlim =
c(0,max(dat$V2)), col = "dark red",
2003 May 03
1
can't plot ylab in graph
Dear People,
I am sure I am missing something obvious as usual, but in the following
graph I can't plot ylab.
Ignoring unimportant details, I am plotting one instance of truehist() and
one instance of curve() on the same graph. Truehist() won't let me pass
the ylab argument. It gives me the error
Error in plot.default(xlim, c(0, ymax), type = "n", xlab = xlab, ylab =
2008 Aug 01
2
Extract Element of String with R's Regex
Hi,
I have this string, in which I want to extract some of it's element:
> x <- "Best-K Gene 11340 211952_at RANBP5 Noc= 3 - 2 LL= -963.669 -965.35"
yielding this array
[1] "211952_at" "RANBP5" "2"
In Perl we would do it this way:
__BEGIN__
my @needed =();
my $str = "Best-K Gene 11340 211952_at RANBP5 Noc= 3 - 2 LL=
-963.669
2011 Feb 28
3
re-arranging data to create an image (or heatmap)
Let me start by introducing myself as a biologist with only a little
knowledge about programming in matlab and R. In the past I have succesfully
created my figures in matlab using the hist3d command, but I have not access
to matlab right now and would like to switch to R.
I have used the plot command to create a figure of my data and it does
almost what I want it to do.
My data matrix looks like
2005 May 23
1
comparing glm models - lower AIC but insignificant coefficients
Hello,
I am a new R user and I am trying to estimate some generalized linear
models (glm). I am trying to compare a model with a gaussian
distribution and an identity link function, and a poisson model with
a log link function. My problem is that while the gaussian model has
significantly lower (i.e. "better") AIC (Akaike Information
Criterion) most of the coefficients are not
2005 Aug 05
1
question regarding logit regression using glm
I got the following warning messages when I did a
binomial logit regression using glm():
Warning messages:
1: Algorithm did not converge in: glm.fit(x = X, y =
Y, weights = weights, start = start, etastart =
etastart,
2: fitted probabilities numerically 0 or 1 occurred
in: glm.fit(x = X, y = Y, weights = weights, start =
start, etastart = etastart,
Can some one share your thoughts on how to
2010 Dec 23
1
Running sweave automatically using cygwin
Hi all,
Hope someone could help me.
I am trying to run automatically the conversion of an Rwn file to a tex
file.
I am using windows 7, and cygwin.
I tried to run automatically the Sweave.sh script, in its the most
recent version available at R webpage:
http://cran.r-project.org/contrib/extra/scripts/Sweave.sh
Unfortunately, I got this error message:
===========================
Raquel at
2004 Aug 11
1
Fwd: Enduring LME confusion… or Psychologists and Mixed-Effects
In my undertstanding of the problem, the model
lme1 <- lme(resp~fact1*fact2, random=~1|subj)
should be ok, providing that variances are homogenous both between &
within subjects. The function will sort out which factors &
interactions are to be compared within subjects, & which between
subjects. The problem with df's arises (for lme() in nlme, but not in
lme4), when
2006 Sep 14
5
Beta stochastic simulation
Hi,
I am finding that I get quite different results when I interchange the
following "equivalent" lines for sampling from a beta distribution in my
r script. The rbeta line is correct judging by the summary statistics of
the simulated values, while the qbeta line consistently leads to a
higher mean simulated value.
simulation <- rbeta(1, alpha, beta)
simulation <- qbeta(runif(1),
2004 Aug 10
4
Enduring LME confusion… or Psychologists and Mixed-Effects
Dear ExpeRts,
Suppose I have a typical psychological experiment that is a
within-subjects design with multiple crossed variables and a continuous
response variable. Subjects are considered a random effect. So I could model
> aov1 <- aov(resp~fact1*fact2+Error(subj/(fact1*fact2))
However, this only holds for orthogonal designs with equal numbers of
observation and no missing values.
2004 Aug 12
0
Re: R-help Digest, Vol 18, Issue 12
The message for aov1 was "Estimated effects <may> be unbalanced". The
effects are not unbalanced. The design is 'orthogonal'.
The problem is that there are not enough degrees of freedom to estimate
all those error terms. If you change the model to:
aov1 <-
aov(RT~fact1*fact2*fact3+Error(sub/(fact1+fact2+fact3)),data=myData)
or to
aov2 <-