Hi all,
Is there a function in R to calculate the probability, or quantile, or
generate random numbers, and so on for
bivariate uniform distribution, like for the bivariate normal distribution?
Thanks!
Hannah
[[alternative HTML version deleted]]
___
Hi all,
I have a function like the following:
f <- function(r,
y){r/(2*pi)*exp(1)^(-y)*(1+r*(y/2)+r^(2)*(y-1)^(2)/6)}
For fixed r, I want to find the inverse funtion in terms y.
In other words, for fixed r, if the value of the function is given, I want
to
find the corrsponding y value th
;
>
> Bert Gunter
> Genentech Nonclinical Biostatistics
>
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On
> Behalf Of li li
> Sent: Wednesday, February 24, 2010 12:46 PM
> To: r-help
> Subject: [R] Inverse
Hi all,
I have some problem regarding the integration function. Can any one
take a look at the following and give me some help? Thank you in advance!
Hannah
## f0 is a function of r,x, and y
f0 <- function(r, x, y){
pnorm((x-sqrt(r)*y)/sqrt(1-r), mean=0,sd=1, lower.tail=
Hi all,
I am trying to minimize the quardratic form w'Aw, with certain
constraints.
In particular,
(1) A=(a_{ij}) is n by n matrix and it is symmetric positive definite,
a_{ii}=1 for all i;
and 0=0
Analytically, for n=2, it is easy to come up with a result. For larger n, it
Hi, thanks for the reply.
A will be a given matrix satisfying condition 1. I want to find the
vector w that minimizes the
quadratic form. w satisfies condition 2.
2010/4/10 Paul Smith
> On Sat, Apr 10, 2010 at 5:13 PM, Paul Smith wrote:
> >>I am trying to minimize the quardratic form w'
agrangian
[1] 4.5 0.0 0.0 0.6
$iact
[1] 1 4
2010/4/10 Gabor Grothendieck
> Check out the quadprog package.
>
> On Sat, Apr 10, 2010 at 5:36 PM, li li wrote:
> > Hi, thanks for the reply.
> > A will be a given matrix satisfying condition 1. I want to find
> Add meq=1 to the arguments.
>
> On Sun, Apr 11, 2010 at 9:50 AM, li li wrote:
> > Hi, thank you very much for the reply!
> >
> > Consider minimize quadratic form w'Aw with A be the following matrix.
> >> Dmat/2
> > [,1] [,2] [,3]
> >
Hi all,
I know the operator %*% can do matrix multiplication. Is there a function
in R that can raise a matrix to a power?
Hannah
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://sta
Thanks a lot! I found the funciton.
Hannah
2010/4/13 Gustaf Rydevik
> On Tue, Apr 13, 2010 at 4:58 PM, li li wrote:
> > Hi all,
> > I know the operator %*% can do matrix multiplication. Is there a
> function
> > in R that can r
Hello,
I have some trouble in terms of using integrate function in R.
f1 is a function of p and x where x is supposed to be a vector. (See the
code).
Then I want to write function f2 which is a function of the vector
x after I integrate out p.
Can some one give me some help? Many thanks!
object length
2: In (1 - p) * x^{ :
longer object length is not a multiple of shorter object length
Can any one give me some suggestions! Thank you!
2009/12/5 David Winsemius
>
> On Dec 5, 2009, at 4:59 PM, li li wrote:
>
> Hello,
>> I have some trouble in terms of using integ
__
>
> Ravi Varadhan, Ph.D.
> Assistant Professor,
> Division of Geriatric Medicine and Gerontology
> School of Medicine
> Johns Hopkins University
>
> Ph. (410) 502-2619
> email: rvarad...@jhmi.edu
>
>
> - Original Message -
>
Hello,
I want to write a function calculating posterior probability.
Can anyone help have a look at the following program? Here function f is
what I eventually
need. It is related to function f1, f2 and f3. The argument x is a vector.
I get evaluation errors here.
Thank you very much!
> f1
Hello,
Can anyone give me some suggestion in term of calculating the sum below.
Is there a function in R that can help doing it faster?
x1, x2, ...xn where xi can be 0 or 1. I want to calculate the following:
sum{ beta[a+sum(xi), b+n-sum(xi) ]* [ (1-x1)dnorm(0,1)+x1dnorm(2,1) ]* [
(1-x2)dnorm
>
> then the sum is
>
> sum(beta(a + x, b + 1 - x) * ((1 - x) * dnorm(x, 0, 1) + x * dnorm(x, 2,
> 1))
>
>
> More below...HTH
> Dennis
>
> On Mon, Dec 14, 2009 at 6:38 PM, li li wrote:
>
>> Hello,
>> Can anyone give me some suggestion in term of calcu
), orep) :
invalid 'times' value
In addition: Warning message:
In rep.int(rep.int(seq_len(nx), rep.int(rep.fac, nx)), orep) :
NAs introduced by coercion
Is there a way to correct it?
Thank you.
2009/12/15 Charles C. Berry
> On Tue, 15 Dec 2009, li li wrote:
>
> Hi:
>
Hi,
Does anyone know how to compute the quantile of a mixture of four
bivariate normal distriutions?
Many thanks!
Hannah
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.
Hi,
Does anyone know how to write a R function to solve the quantile c for the
following equation.
P(Z1>1.975, Z2c, Z2>c)=0.05/6.
Z1 and Z2 have a bivariate normal distribution with mean 0, variance 1 and
correlation 0.5.
Thanks a lot!
Hannah
[[alternative HTML version deleted]
ook at packages mnormt and mvtnorm.
>
>
> Best,
> Dimitris
>
>
> li li wrote:
>
>> Hi,
>> Does anyone know how to write a R function to solve the quantile c for the
>> following equation.
>> P(Z1>1.975, Z2c, Z2>c)=0.05/6.
>>
&g
Hi
Does anyone know whether in R there is a function for the
joint distribution of the ordered normal random variables?
Thanks a lot!
Hannah
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz
Hi, can anyone help me with the following code? Thanks!
library(mvtnorm)
f2 <- function(n, rho) {
var <- matrix(c(1,rho,rho,1), nrow=2, ncol=2, byrow=T)
beta <- seq(0, 1, length.out=n+1)
alpha <- sort (sapply(1-beta, qnorm))
x <- array(0, dim=c(n, n))
for (s in 1:n) {
for (t in 1:n){
Dear all,
I need to write the following function in R. Can anyone give me some
hint?
Thank you! Please see the attachment for the function.
Hannah
question to R-heip.pdf
Description: Adobe PDF document
__
R-help@r-project.org mailing list
https
Hi all,
Does anyone know whether there is an R function available to find the
Bayesian variance components estimators
for random effects or mixed models?
Thank you very much.
Hanna
[[alternative HTML version deleted]]
__
R-help@r-projec
Hi all,
Is there a way to change the color of the boxplot plots outliers?
Thanks.
Hanna
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting gui
Dear all,
I have a Pharmokinetics data set where single dose is used for several
time points on 8 subjects.
I wanted to fit a two compartment model on the data set to see whether it
is reasonable.
This is the first time to analyze a PK data set and am not familar with
various concepts in the
Dear all,
I have a data frame where there are three variables: values, experiment,
composite.
Values are numerical values. There are 10 levels for the experiment. Within
each level of experiment,
there are 17 levels of composite.
I want to find mean for each combination of levels of the experi
Hi all,
I am trying to plot the one-sided confidence limits for the regression
line.
It seems it is ok to use predict function to compute the two sided
confidence
limits. Does any one know a easy way to compute the one sided confidence
limits?
Thank you very much in advance.
Hannah
[
Hi all,
For the simple linear regression, I want to find the input "x" value so
that the
lower confidnece limit is a specific number, say 0.2.
In other words, I want to find the value of x so that the lower
confidence bound crosses the horizontal line 0.2.
Is there a simple way (an R funct
Hi all,
In my plotCI function, the argument x is chosen to be seq(0.05, 0.95,
by=0.05).
However, when I make the plot, the plot has the x coordinate goes 1:19.
Does anyone know how to make the x coordinate to be (0,0.5, 0.1, ...,
0.95).
Thank you.
Hanna
[[alternative HTML v
ny plotCI functions in many different packages... which
> one are you referring to? Also please construct a reproducible example
> illustrating your problem.
>
> Best,
> Ista
>
> On Thu, Jan 31, 2013 at 11:58 PM, li li wrote:
> > Hi all,
> >In my plotCI function,
Hi all,
I defined the function integrand as follows.
library(mnormt)
integrand <- function (rho, a, b,z, x, y){
Sigma <- matrix(c(1, rho, rho, 1), 2,2)
mu <- rep(0,2)
f <- pnorm(c((z-a*x)/b, (z-a*y)/b), mu, Sigma)*dnorm(c(0,0), mu,
diag(2))
f
Dear all,
I got an error message when running the following code.
Can anyone give any suggestions on fixing this type of error?
Thank you very much in advance.
Hanna
> integrand <- function(x, rho, a, b, z){
+ x1 <- x[1]
+ x2 <- x[2]
+ Sigma <- matri
Hi alL,
I have a data frame with 4 columns: "value", "time", "group" and "id".
I would like to plot "value" vs. "time" with different colors for
different levels of "group" and
different symbols for different values of "id".
I think I could do this but I would like to see what is an easie
--
> > David L Carlson
> > Associate Professor of Anthropology
> > Texas A&M University
> > College Station, TX 77843-4352
> >
> >
> >
> >
> >> -Original Message-
> >> From: r-help-boun...@r-
Hi all,
it seems that there is problem with function "adaptIntegrate",
when the integration limits is infinity.
Please see the code below. The second integration does not
seem to work.
Can anyone familiar with this give some help?
Thank you with much.
Hanna
library(mnormt)
library(c
semi-infinite intervals is
> possible by a change of variables."
>
>
>
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of li li
> Sent: Donnerstag, 21. März 2013 16:10
> To: r-help
> Subject: [R] &qu
Hi all,
Is there an R function that computes the probabilty or quantiles of
order statistics of multivariate normal?
Thank you.
Hanna
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/
t; On Thu, Mar 21, 2013 at 02:32:44PM -0700, David Winsemius wrote:
>>
>>>
>>> On Mar 21, 2013, at 1:44 PM, li li wrote:
>>>
>>> Hi all,
>>>> Is there an R function that computes the probabilty or quantiles of
>>>> order statistics of mu
() function in MASS
> could be used to simulate the samples.
>
> Again, corrections appreciated if I am wrong on any of this.
>
> -- Bert
>
>
>
> On Fri, Mar 22, 2013 at 6:31 AM, Ted Harding wrote:
>
>> On 22-Mar-2013 13:02:25 li li wrote:
>> > Thank you
t; You get to work through the details:-)
>
> Ranjan
>
>
>
>
> On Fri, 22 Mar 2013 10:48:06 -0400 li li wrote:
>
> > Yes. What I meant is "the distribution of order statistics from a
> > non-iid sample of a (normal) distribution with specified sample
>
Dear all,
I want to fit a random effect model with only one random factor. I do not
want to
include the intercept term either.
The model I using now is
lmer(values ~ (1|lot), data=tmp)
The results are as below. How do I take out the intercept term? Or
if this is not possible for the lmer fu
I have a big data set that includes character variables of many different
values. I'm trying to use ff to read the data and then use biglm.big.matrix
to build linear models. However, since big.matrix will convert all
character vectors to factors and the character labels will be lost. I
decided to c
I have a big data set that includes character variables of many different
values. I'm trying to read the data as big.matrix and then use
biglm.big.matrix to build linear models. However, since big.matrix will
convert all character vectors to factors and the character labels will be
lost, I decide
Dear all,
Y, X are bivariate normal with all the parameters known.
I would like to generate numbers from the distribution Y | X > c
where c is a constant.
Does there exist an R function generating
random numbers from such a distribution?
Thank you very much.
Dear all,
In the following code, I was trying to compute each row of the "param"
iteratively based
on the first row.
This likely is not the best way. Can anyone suggest a simpler way to
improve the code.
Thanks a lot!
Hannah
param <- matrix(0, 11, 5)
colnames(param) <- c("p", "
Dear all,
In my R plot, I would like to add the title as "Estimator vs. Eta",
where I want to use the greek letter eta.
I was trying to use expression(plain("Estimator vs.") *eta* ). It does not
seem to work.
Can anyone familiar with this give some help?
Thank you very much.
Hannah
Dear all,
Does any one know whether there is a help forum for sas?
I know this is not relevant question to ask here but don't know
where else to ask.
Thank you.
Hannah
[[alternative HTML version deleted]]
__
R-help@r-project.org mailin
Hi all,
When making a bunch of plots using a loop function, how to add title to
reflect different plots.
Specifically, for the code below, I generated 9 plots. I would like to add
a title to each plot.
For example, the titles will be respectively, plot1, plot 2, ⦠plot 9.
Thank you very much!
Dear all,
I have two vectors x and y, both of which are of length 1000.
I created a factor as.factor(rep(1:100,each=10)).
Now I want to count, for each factor level, the number of intersections
between x and y. In other words, I would like to count the number of
intersections between x[1:10] a
Hi all,
I fit a complete second order model for my response with three
predictors. However, the lack of fit of the model is
still significant. I wish to add the third order terms also. Is there a way
to do that using rsm function?
Thanks.
Hanna
[[alternative HTML version d
Hi all,
I am trying to perform an ordinal regression using proportional odds
model.
First I would like to test whether the assumption of proportional odds is
supported by the data.
I got the following error message when I try to fit one of the relevant
models. Can anyone give
some suggestions on
Hi all,
I want to solve the following equation for x with rho <- 0.5
pnorm(-x)*pnorm((rho*dnorm(x)/pnorm(x)-x)/sqrt(1-rho^2))==0.05
Is there a function in R to do this?
Thank you very much!
Hannah
[[alternative HTML version deleted
Hi all,
I have two questions. Can some one give some help?
The first question is regarding the pair of operators "&" and "&&". What
is the
difference between the two?
The second question is regarding "<-" and "=". Usually we use
"<-" as the assignment operator. I saw some people use "="
orm(100) )
> And
> > mean( z = rnorm(100) )
>
> Are even more different.
>
>
>
> --
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> greg.s...@imail.org
> 801.408.8111
>
>
> > -Original Message-
> > From: r-h
Dear all,
I am trying to calculate certain critical values from bivariate normal
distribution (please see the
function below).
m <- 10
rho <- 0.1
k <- 2
alpha <- 0.05
## calculate critical constants
cc_z <- numeric(m)
var <- matrix(c(1,rho,rho,1), nrow=2, ncol=2, byrow=T)
for (i in 1:m){
if
Dear all,
Does anyone know where to download the package 'Biobase' in R.
Thank you!
Hannah
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE
Dear all,
I have the following program for a multiple comparison procedure.
There are two functions for the two steps. First step is to calculate the
critical values,
while the second step is the actual procedure [see below: program with two
functions].
This work fine. However, However I wan
Hi all,
I want to add the red color under the standard normal curve to the right
of 1.96.
Can anyone give me a hand? Please see the code below.
Thank you.
x <- seq(-4, 4, length=100)
hx <- dnorm(x)
par(pty="s")
plot(x, hx, type="l", xlab="z value",
ylab="Density", main="density of N(0,1)"
Hi all,
I am have some difficulty with the legend function.
I need to add a legend to describe the different line types in a plot. The
legend box is small.
It did not include sufficient length of each line type to help distinguish
the differnt line types.
Is there a way to fix this.
Thank y
Thank you all for your kind reply and help.
I changed the legend function as Mr. Peter Ehlers suggested and
the plots look good.
Thank you again.
Hannah
2010/7/22 Peter Ehlers
> On 2010-07-21 22:06, li li wrote:
>
>> Hi all,
>> I am have some difficul
Hi all,
I want to add 6 plots in the format of 2 columns and 3 rows as one
figure in latex. The plots are in .eps file.
I know how to add 2 plots side by side, but could not figure out how to do
multiple rows.
I know this may not be the right place to ask such a question. But I do
not know who
Hi all,
I want to extract every 20th row of a big matrix, say 1 by 1000.
What is the simper way to do this?
Thank you very much!
Hannah
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.e
Dear all,
I have a function f(x) which return a list as result.
$T1
[1] 0.03376190
$T2
[1] 0.04725
$T3
[1] 0.3796071
$T4
[1] 0.3713452
$T5
[1] 0.4523651
$T6
[1] 0.4575873
I now find the result for a vector of x values at one time. I want to
store the reuslt
for each xi value in a column of a
Thanks for the kind help!
Hannah
2010/10/14 Brian Diggs
> On 10/14/2010 2:53 PM, li li wrote:
>
>> Dear all,
>> I have a function f(x) which return a list as result.
>>
>> $T1
>> [1] 0.03376190
>> $T2
>> [1] 0.04725
>> $T3
Dear all,
I have a function f(x) which return a list as result.
$T1
[1] 0.03376190
$T2
[1] 0.04725
$T3
[1] 0.3796071
$T4
[1] 0.3713452
$T5
[1] 0.4523651
$T6
[1] 0.4575873
I now find the result for a vector of x values at one time. I want to
store the reuslt
for each xi value in a column of a
Hi all,
I have some trouble reading data from a csv file.
I used command "read.delim("clipboard") to read in the data.
> aalpha.data <- read.delim("clipboard")
> class(aalpha.data)
[1] "data.frame"
> dim(aalpha.data)
[1] 8 25
> colnames(aalpha.data)
[1] "X" "V1" "V2" "V3" "V4" "V5"
Hi all,
I have a function rho.f which gives a list of estimators. I have the
following problems.
rho.f(0.3) gives me the right answer. However, if I use rho.f(corr[4]) give
me a different
answer, even though corr[4]==0.3.
This prevents me from using a for loop. Can someone give me some help?
u'll get a satisfactory answer.
>
> HTH,
> Dennis
>
> On Fri, May 28, 2010 at 6:52 AM, li li wrote:
>
>> Hi all,
>> I have a function rho.f which gives a list of estimators. I have the
>> following problems.
>> rho.f(0.3) gives me the right answer
can take a look.
>
> Sarah
>
> On Fri, May 28, 2010 at 10:17 AM, li li wrote:
> > Thanks very much for your reply. The function is a bit long. I attached
> it.
> >
> > rho.f () is in second text document. It uses rada1.mnorm() function which
> > is contained i
> var.f() is a complete function, except that m and J are not passed
> as arguments. Instead, you rely on them being present in the
> calling environment, and that is both dangerous and bad practice.
>
> Sarah
>
> On Fri, May 28, 2010 at 12:00 PM, li li wrote:
> > I a
> mis-use as object names, generally without obvious deleterious effects:
>
> df # the density of the F distribution
> c
> data
> sd
> var
> names
>
>
>> var.f <- function(rho) {
>> (1-rho)*diag(m)+rho*J%*%t(J)
>> }
>>
>> var.f() is a
Hi Sarah,
Thanks for your kind help. I now know where the problem is.
Hannah
2010/5/28 Sarah Goslee
> My initial guess appears to be right: you're working with something
> exceedingly sensitive to floating point precision. You may have to
> reconsider your methods.
>
Hi all,
Sorry I have too many questions. I could not think of a way to fix
problem. Can anyone give some suggestions on fixing this?
Hannah
2010/5/28 li li
> Hi Sarah,
> Thanks for your kind help. I now know where the problem is.
>
Hi all,
I wrote the following function to generate data following a mixture-ar1
model.
The model is described as below:
theta is a m-vector with each entries identically and
independent Bernoulli trials with
success probability pi1.
x is a m-vector with entries follow a ar1 mod
Hi all,
I have some problem with the tinnR editor. At
each end of the line, there is a strange symbol
and there is a dot between any two words.
Does anyone know how to correct this?
Thank you very much!
Hannah
[[alternative HTML version deleted]]
___
Hi all,
I have some some problem with regard to finding the integral of a
function containing an indicator function.
please see the code below:
func1 <- function(x, mu){
(mu^2)*dnorm(x, mean = mu, sd = 1)*dgamma(x, shape=2)}
m1star <- function(x){
integrate(func1, lower = 0, upper = Inf,x
Hi all,
I have some some problem with regard to finding the integral of a
function containing an indicator function.
please see the code below:
func1 <- function(x, mu){
(mu^2)*dnorm(x, mean = mu, sd = 1)*dgamma(x, shape=2)}
m1star <- function(x){
integrate(func1, lower = 0, upper = Inf,x)
.
Hannah
2011/2/17 Dennis Murphy
> Hi Hannah:
>
> You have a few things going on, but the bottom line is that numer and denom
> are both double integrals.
>
> On Thu, Feb 17, 2011 at 1:06 PM, li li wrote:
>
>> Hi all,
>> I have some some problem with re
Hi all,
I have the following two function f1 and f2.
f1 <- function(lambda,z,p1){
lambda*(p1*exp(-3*z-9/2)+(0.2-p1)*exp(4*z-8))-(1-lambda)*0.8}
f2 <- function(p1,cl, cu){
0.8*(pnorm(cl)+(1-pnorm(cu)))/(0.8*(pnorm(cl)+(1-pnorm(cu)))+p1*(pnorm(cl+3)+(1-pnorm(cu+3)))+(0.2-p1)*(pnorm(cl-4)+(1-p
t
cu <- uniroot(f1, lower =0, upper = 10,
tol = 1e-10,p1=0.15,lambda=lam[i])$root
x1[i]<- f2(p1=0.15, cl=cl, cu=cu)
}
x1<=0.05
x1[259]
## x1[259] is the lambda value for f2()=0.05.
Thank you very much!!
Hannah
2011/2/21 li li
> Hi all,
> I have the followi
Hi all.
I was having some trouble with a for loop and I found the problem is the
following.
Does anyone have some idea why I got the following R result? Since mone
is equal to 3, why
mu1 only have 2 components?
library(MASS)
> p0 <- seq(0.1, 0.9,by=0.1)
> m <- 10
>
>
> p0 <- p0[7]
>
> ## da
Dear all,
I wrote the following function previously. It worked fine with the old
mvtnorm package.
Somehow with the updated package, I got a error message when trying to use
the function.
I need some help. It is sort of urgent. Can anyone please take a look. The
function is the following.
Thank
Dear all,
I have the following problem with the uniroot function. I want to find
roots for the fucntion "Fp2" which is defined as below.
Fz <- function(z){0.8*pnorm(z)+p1*pnorm(z-u1)+(0.2-p1)*pnorm(z-u2)}
Fp <- function(t){(1-Fz(abs(qnorm(1-(t/2)+(Fz(-abs(qnorm(1-(t/2)}
Fp2 <- func
Dear all,
I forgot to mention the values for the parameters in the first email.
u1 <- -3
u2 <- 4
alpha <- 0.05
p1 <- 0.15
Thank you very much.
2011/9/3 li li
> Dear all,
>I have the following problem with the uniroot function. I want to find
> roots for the fu
Dear all,
Can anyone take a look at my program below?
There are two functions: f1 (lambda,z,p1) and f2(p1,cl, cu).
I fixed p1=0.15 for both functions. For any fixed value of lambda (between
0.01 and 0.99),
I solve f1(p1=0.15, lambda=lambda, z)=0 for the corresponding cl and cu
values.
Then I pl
Dear all,
I need some help on plotting multiple boxplots on one figure.
I have three matrix A, B and C. Each of them is a 1000 by 10 matrix.
The 10 columns of all three matrix correspond to the
10 values of the same parameter, say k=1, ..., 10.
I want to make a plot where x axis represents di
Hi Petr, David and John,
Thanks for the reply. I am sorry that I did not make it very clear.
"One on top of another" may not be the right expression.
Actually what I wanted is the second option of David's. There
are 10 columns in the plot and, in each column, there are three boxplots.
Different c
The following is what I get when I run the code.
> library(ggplot2)
Loading required package: reshape
Loading required package: plyr
Attaching package: 'reshape'
The following object(s) are masked from 'package:plyr':
rename, round_any
Loading required package: grid
Loading required packa
Hi John,
It worked. Thanks a lot!
Hannah
2012/6/30 John Kane
> It looks like we have different versions of software loaded.
> I have R version 2.15.0 (2012-03-30)
>
> My packages.
> reshape2_1.2.1 ggplot2_0.9.0
>
> Hannah's packages.
> R version 2.12.2 (2011-02-25)
> quantreg_4.71 SparseM
Also, it is possible to change "ylim" also?
2012/7/1 li li
> Dear all,
> I have a few questions regarding the boxplot output from the
> "geom_boxplot" function.
> Attached is the output I get. Below are my questions:
>
> 1. How can I define the xlab an
Dear all,
I have a few questions regarding the boxplot output from the
"geom_boxplot" function.
Take as an example the output of the below:
library(ggplot2)
p <- ggplot(mtcars, aes(factor(cyl), mpg))
p + geom_boxplot(aes(fill = factor(am)))
Here are my questions:
1. How can I define the xlab
Hi all,
Can anyone please take a look at the following two functions.
The answer does not seem to be right.
Thank you very much!
f1 <- function(x)
{integrand <- function (x, mu){
dnorm(x, mean=mu, sd=1)*dnorm(mu, mean=2, sd=1)
}
integrate(in
dnorm(x, mean=mu, sd=1)*mu^2*dnorm(mu, mean=2, sd=1)
}
integrate(integrand, -Inf, Inf,x)$val
}
2011/6/25 Peter Ehlers
> On 2011-06-25 08:48, li li wrote:
>
>> Hi all,
>>Can anyone please take a look at the following two fun
Peter, Thank you very much!
2011/6/26 Peter Ehlers
> On 2011-06-26 06:34, li li wrote:
>
>> Thank you all for the answering.
>> Sorry I did not state the problem clearly. I want to take the
>> integration with respect to mu, not x.
>> For example, f1 should h
Dear all,
I have a question regarding changing the xlim and ylim in the function
image().
For example, in the following code, how can I have a heatmap with
xlim=ylim=c(0, 100)
instead of (0,1).
Thank you very much.
x <- matrix(rnorm(1, 0,1), 100, 100)
image(x)
Hannah
Hi all,
I have a question regarding the density function which gives the
kernel density estimator.
I want to decide the bandwidth when using gaussian kernel, given a set of
observations. I am not familiar with different methods for bandwidth
determination. Below are the different ways in R on
M University
> College Station, TX 77843-4352
>
> > -Original Message-
> > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> > project.org] On Behalf Of Michael Young
> > Sent: Wednesday, July 25, 2012 9:53 PM
> > To: li li
> > Cc: r-h
Dear all,
For two sets of random variables, say, x <- rnorm(1000, 10, 10) and y
<- rnorm(1000. 3, 20).
Is there any way to overlay the histograms (and density curves) of x and y
on the plot of y vs. x?
The histogram of x is on the x axis and that of y is on the y axis.
The density curve here
Thanks a lot.
Hannah
2012/8/6 R. Michael Weylandt
> See
>
> example(layout)
>
> for one idea. I think you might also want to look into rug plots.
>
> Best,
> Michael
>
> On Mon, Aug 6, 2012 at 2:40 PM, li li wrote:
> > Dear all,
> > For two sets
101 - 200 of 226 matches
Mail list logo