Skip to content

Search Archives

Search tips
from:Name Search by author name, e.g. from:Duncan Murdoch "exact phrase" Match an exact phrase word1 word2 Match messages containing both words Date range Use the date pickers to filter results to a time period

Use the list dropdown to narrow results to a specific mailing list. Combine from: with other terms to filter by author and content.

18 results for “from:Patrick Wang”

Unsubscribe!!!
Patrick Wang · Mar 3, 2008 · r-help

how to find how many modes in 2 dimensions case
Patrick Wang · Jun 8, 2007 · r-help

Hi, Does anyone know how to count the number of modes in 2 dimensions using kde2d function? Thanks Pat

Inverse gamma
Patrick Wang · May 17, 2007 · r-help

Hi, All: assume I need to generate X from inverse gamma with parameter (k, beta). should I generate from Y from gamma(-k, beta), then take X=1/Y? Thanks pat

draw two plots on a single panel
Patrick Wang · May 8, 2007 · r-help

Hi, I have 2 dataset, plot(data1) plot(data2), but it comes as two graphs, can I draw both on a single panel so I can compare them? Thanks Pat

How to specify the start position using plot
Patrick Wang · Jun 10, 2007 · r-help

Hi, How to specify the start position of Y in plot command, hopefully I can specify the range of X and Y axis. I checked the ?plot, it didnot mention I can setup the range. Thanks Pat

Split a vector(list) into 3 list
Patrick Wang · May 17, 2007 · r-help

Hi, I have a vector contains values 1,2,3. Can I call a function split to split it into 3 vectors with 1 corresponds to value ==1, which contain all the indexes for value==1. 2 corresponds to value...

How to generate two dimensional random variable for normal distributed
Patrick Wang · May 16, 2007 · r-help

Hi, I can use runif to generate 1 dimensional random variables, assume the dimesion of the random variable is 2, X(x1, x2), how do I generate the 2 dimensional random variable with normal distribution? Do I need to both...

Why ?rmvnorm not working
Patrick Wang · May 26, 2007 · r-help

Hi, My R version is 2.4.1 and I installed the the packages MASS and run command library("MASS"), however when I type ?rmvnorm, no help topic found, it worked before. I tried to ype ?rinvgamma from "MCMCpack" which...

Does inverse function exist in R
Patrick Wang · Jan 26, 2007 · r-help

Hi, I wrote a simple derivative program (ftest=deriv(y~x^2, c("x"), function(x){} )) I put (ftest=deriv(y~x^2, c("x"), function(x){} ))(1) which return 2 which is correct. however, if I want the output...

kernel smooth for tw-dimensional data
Patrick Wang · Jun 5, 2007 · r-help

Hi all: I can use the density() function to get the kernel density for given observed data X with bandwidth. Is there a function in R that can take in two dimensional data(x, y) and return a joint density...

ratio optimization with quadratic form
Patrick Wang · Jan 27, 2007 · r-help

Hi, All I have a function f(y) = (x'Ax + 2yx'a_i+y^2*a_ii)/(x'Bx + 2yx'b_i+y^2*b_ii), where A and B are known square matrix, a_i are the ith row...

How to use density function to find h_{k}
Patrick Wang · Jun 2, 2007 · r-help

Hi, All: How can I use the density function to find the minimum of the bandwidth make the density function one mode, 2 mode, 3 mode etc. It will be impossible to try all possible bandwidths to then plot the...

How to find a uniroot of a deriv function
Patrick Wang · Apr 13, 2007 · r-help

Hi, All Assume I have function x^2-1, I tried to find the root of its derivative 2*x = 0. I run the command below but it return 1, root of the original function. Does anyone know how to...

How to use density function to find h_{k}
Patrick Wang · Jun 3, 2007 · r-help

Hi, All: How can I use the density function to find the minimum of the bandwidth make the density function one mode, 2 mode, 3 mode etc. usually the larger the bandwidth, the fewer mode of the density. less bumpy...

How to get the number of modes using kde2d
Patrick Wang · Jun 7, 2007 · r-help

Hi, The silverman's paper introduction offer how to find a mode for one dimensional data based on software http://www.stanford.edu/~kasparr/software/silverman.r, for two dimensional data I use kde2d to smooth it out first, then...

kernel smooth for tw-dimensional data
Patrick Wang · Jun 5, 2007 · r-help

Hi, I found kde2d in the MASS packages return densities for the bivariate random varaibles. I donot understand why each element of density Z is a 2*2 matrix. Why it is not a number. For example, a bivariate normula...

how to find how many modes in 2 dimensions case
Patrick Wang · Jun 8, 2007 · r-help

Thanks for the reply, maybe I shall say bumps, I can use persp to show a density on a X Y dimensions. one peak is one mode I think. I try to find an automatic way to detect how many...

Split a vector(list) into 3 list
Patrick Wang · May 17, 2007 · r-help

Thanks, no index function was defined in R. I try to use the split(order(temp), temp), the number of groups are correct, however the result doesnot seem to be correct. I try to match before the ordered index and...

Can't find what you're looking for? Try searching with Google .