Displaying 20 results from an estimated 2000 matches similar to: "how to estimate conditional density"
2005 Feb 05
1
plot smooth density estimates for bivariate data
Hi, there.
Suppose I have a bivarariate data matrix y1 and y2. I want to plot a 3-D
picture of the estimated density f(y1, y2) against y1 and y2? How can I do
that? Do I use persp() or density()?
Thanks for your help.
Yulei
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Yulei He
1586 Murfin Ave. Apt 37
Ann Arbor, MI 48105-3135
yuleih at umich.edu
734-647-0305(H)
734-763-0421(O)
734-763-0427(O)
2003 Oct 27
4
how to set missing values in R
Hi, there.
Can I ask how to set up missing values in R? Suppose I want to assign the
missing value to the elements in vector which is greater than zero like
this:
x<-c(1,3,-1,0,4);
after the missing value assignment, x becomes (NA,NA,-1,0,NA).
Thanks!
Yulei
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Yulei He
1586 Murfin Ave. Apt 37
Ann Arbor, MI 48105-3135
yuleih at umich.edu
2004 Oct 30
2
(no subject)
Hi, there.
Does anybody know how to plot a smooth density plot for some data
simulated from certain distribution? Thanks.
Yulei
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Yulei He
1586 Murfin Ave. Apt 37
Ann Arbor, MI 48105-3135
yuleih at umich.edu
734-647-0305(H)
734-763-0421(O)
734-763-0427(O)
734-764-8263(fax)
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
2005 Jan 13
2
multivariate diagnostics
Hi, there.
I have two questions about the diagnostics in multivarite statistics.
1. Is there any diagnostics tool to check if a multivariate sample is from
multivariate normal distribution? If there is one, is there any function
doing it in R?
2. Is there any function of testing if two multivariate distribution are
same, i.e. the multivariate extension of Kolomogrov-Smirnov test?
Thanks for
2005 Jul 02
1
probability-probability plot
Hi, there.
Is there any function in R to plot the probability-probability plot (PP
plot)? Suppose I am testing some data against normal.
Thanks.
Yulei
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Yulei He
1586 Murfin Ave. Apt 37
Ann Arbor, MI 48105-3135
yuleih at umich.edu
734-647-0305(H)
734-763-0421(O)
734-763-0427(O)
734-764-8263(fax)
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
2004 Jul 16
0
for loops in Gibbs sampler
Dear all:
I am using R to do multiple imputation for longitudinal data set. The
Gibbs chain basically requires draw posterior distribution of model
parameters, including the random effects. The multiple imputation requires
several independent Gibbs chains. So my program structure is like:
for (chain in 1:5)
{
# perform Gibbs sampling...
for (row in 1:row.no)
{
b.row=some function # draw
2005 Sep 26
2
questions about boxplots
Hi, there.
I have two questions about using R to create boxplots.
1. The function boxplot() plots the outliers. How can I label the exact
values arount these outlier points? Does R have an option allow me to
do that?
2. How can I put two boxplots in one x-y axis?
Thanks.
Yulei
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Yulei He
276 Grove St. Apt 3
Newton, MA 02466
617-796-7834(H)
2006 Jun 14
1
Estimate region of highest probabilty density
Estimate region of highest probabilty density
Dear R-community
I have data consisting of x and y. To each pair (x,y) a z value (weight) is assigned. With kde2d I can estimate the densities on a regular grid and based on this make a contour plot (not considering the z-values). According to an earlier post in the list I adjusted the kde2d to kde2d.weighted (see code below) to estimate the
2011 Jan 20
2
auc function
Hi, there.
Suppose I already have sensitivities and specificities. What is the quick R-function to calculate AUC for the ROC plot? There seem to be many R functions to calculate AUC.
Thanks.
Yulei
[[alternative HTML version deleted]]
2011 Nov 24
2
Question on density values obtained from kde2d() from package MASS
Hello,
I am a little bit confused regarding the density values obtained from the function kde2d() from the package MASS because the are not in the intervall [0,1] as I would expect them to be. Here is an example:
x <- c(0.0036,0.0088,0.0042,0.0022,-0.0013,0.0007,0.0028,-0.0028,0.0019,0.0026,-0.0029,-0.0081,-0.0024,0.0090,0.0088,0.0038,0.0022,0.0068,0.0089,-0.0015,-0.0062,0.0066)
y <-
2006 Apr 23
3
bivariate weighted kernel density estimator
Is there code for bivariate kernel density estimation?
For bivariate kernels there is
kde2d in MASS
kde2d.g in GRASS
KernSur in GenKern
(list probably incomplete)
but none of them seems to accept a weight parameter
(like density does since R 2.2.0)
--
Erich Neuwirth, University of Vienna
Faculty of Computer Science
Computer Supported Didactics Working Group
Visit our SunSITE at
2010 Feb 15
4
density estimates for fixed points
Problem:
Based on a n x 2 data matrix i want a kernel estimate of the bivariate
density. However, i also wish to specify wich points the density should be
calculated at.
I can offcourse just write the full kernel density estimate as a R-code, but
surely there must already exist some package for this operation?
The package density(), seems to create a new matrix (depending on n), where
the
2006 Feb 13
2
bivariate normal distribution
Hi, there.
Does anyone know the R function for calculating the cdf of bivariate
normal distribution function?
Thanks.
Yulei
[[alternative HTML version deleted]]
2008 Mar 06
2
calculate AUC and plot ROC in R
Hi, there:
Could someone tell me a simple function of plot ROC curve and calculate
AUC in R? My setting is very simple, a column of the true binary
response and another column of predicted probabilities.
Thanks!
Yulei
[[alternative HTML version deleted]]
2010 Jul 13
6
create variables with indexes
Hi, there:
Suppose I want create variables with indexes in their names, e.g., X_1_1, X_1_2, X_1_3, ..., X_1_10, X_2_1, X_2_2, X_2_3, .. X_2_10,..., X_10_1, X_10_2, ... X_10_10. It looks like I need to use 2 indexes I and J so I is looped from 1 to 10, and J is looped from 1 to 10. But I don't know how to automatically produce X with these combination of indexes. Should I use paste function?
2007 Nov 26
2
2d Joint Density Plot
Hi all,
I'm fairly new to R, so I'm still trying to feel out what is available to
me. I would like to be able to plot joint density in a two dimensional plot
where density is indicated by color or darkness gradients, like a 2d color
coded topographic map. Ideally, the output would be something I could then
plot other points or lines on.
Currently, I'm calculating joint density with
2009 Dec 02
2
Joint density kde2d works improperly?
Dear all,
Please, look at the following code:
attach(geyser)
f1 <- kde2d(duration, waiting, n = 5)
a <- 0
for (i in 1:5){
for (j in 1:5){
a <- a + f1$z[i,j]
}
}
As far as I understood from Help kde2d returns matrix elements of which are
values of joint probability mass function Pr(X=x,Y=y) therefore, sum of its
elements should sum to 1.
Which is not the case from my check.
Where is
2008 Jun 11
1
specifying ranges in scatter plot
Hi, there:
Does anyone know how to specify the ranges in the axises when I make
scatter plots using pairs()? In the general plot function, I can use
xlim and ylim option. But how can I do this if I use pairs()?
Thanks.
Yulei
[[alternative HTML version deleted]]
2006 Apr 08
1
cross product
Hi, there.
How do I calculate the cross-product in the form of
\sum_{i=1}^{n}X_{i}^{t} \Sigma X_{i} using R code without using do loop?
X_{i} is the covariate matrix for subject I, \Sigma is the covariance
matrix.
Thanks for your help.
Yulei
[[alternative HTML version deleted]]
2009 Apr 27
1
plot estimates and their 95% confidence intervals
Hi, there:
I have a dataset with 50 states and for each state, I have its associated mean estimate (for some parameters) and the lower and upper bound of the 95% CI. The data look like below:
state ami_mean ami_low ami_up
1 MS -0.58630 -0.90720 -0.29580
2 KY -0.48100 -0.75990 -0.19470
3 FL -0.47900 -0.62930 -0.32130
I would like to have a plot the 95% CI (characterized by