search for: ewijaya

Displaying 11 results from an estimated 11 matches for "ewijaya".

Did you mean: hwijaya
2008 Jun 17
2
Accessing Max/Min Value of Density Function
Dear all, Currently I have the following output > mydensity <- density(x) > print(mydensity) x y Min. : -92.14 Min. :0.000e+00 1st Qu.: 356.66 1st Qu.:5.530e-09 Median : 805.45 Median :4.681e-05 Mean : 805.45 Mean :5.564e-04 3rd Qu.:1254.24 3rd Qu.:3.370e-04 Max. :1703.04 Max. :5.541e-03 How can I access the Max value of
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",
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
2008 May 14
1
EM Algorithm in R
Hi all, Is there any EM (Expectation Maximization) package available for R? CRAN Package archive (http://cran.r-project.org/) doesn't seem to have it. Regards, Edward
2008 May 21
1
Log likelihood of Gamma distributions
Dear all, How can I compute the log likelihood of a gamma distributions of a vector. I tried the following. But it doesn't seem to work: samples<-c(6.1, 2.2, 14.9, 9.9, 24.6, 13.2) llgm <- dgamma(samples, scale=1, shape=2, log = TRUE) It gives [1] -4.291711 -1.411543 -12.198639 -7.607465 -21.397254 -10.619783 I expect it only returns "one" value instead of vector.
2008 May 22
1
Computing Maximum Loglikelihood With "nlm" Problem
Hi, I tried to compute maximum likelihood under gamma distribution, using nlm function. The code is this: __BEGIN__ vsamples<- c(103.9, 88.5, 242.9, 206.6, 175.7, 164.4) mlogl <- function(alpha, x) { if (length(alpha) > 1) stop("alpha must be scalar") if (alpha <= 0) stop("alpha must be positive") return(- sum(dgamma(x, shape = alpha, log = TRUE)))
2008 May 23
0
Est. Component Size with AIC/BIC under Gamma Distribution
Dear all, I am trying to model number of samples from a given series. The series are modelled according Gamma function. In order to estimate the # samples, I use BIC/AIC with MLE (computed from dgamma function). Here is the code I have. __BEGIN__ mlogl <- function( x_func, theta_func, samp) { # computing log_likelihood return( - sum(dgamma(samp, shape = x_func, scale=theta_func, log
2008 May 26
1
X-Axis Problem with Multhist Plot
I am creating a side-by-side histogram using "multhist" of PLOTRIX. However, I can't seem to control the X-axis. It yields the following X points in the axis: 1 3 5 7 9 13 17 21 25 29 33 with uneven spacing between x-ticks (see attached file). Especially I want to create a bar for every x-axis (1,2,3,4...36), now not every x-axis has a bar. Is there a way to alter my following
2008 May 21
2
Converting Data Types
Hi, How can I convert the matrices to list. For example I have this snippet: samples<-mymatrix[1,] print(samples) which prints: V1 V2 V3 V4 V5 V6 1 103.9 88.5 242.9 206.6 175.7 164.4 How can I convert the object "samples" such that it prints: [1] 103.9 88.5 242.9 206.6 175.7 164.4 The reason I ask this because I can't use the former "samples"
2008 May 23
2
About Passing Arguments to Function
Hi, Below I have a function mlogl_k, later it's called with "nlm" . __BEGIN__ vsamples<- c(14.7, 18.8, 14, 15.9, 9.7, 12.8) mlogl_k <- function( k_func, x_func, theta_func, samp) { tot_mll <- 0 for (comp in 1:k_func) { curr_mll <- (- sum(dgamma(samp, shape = x_func, scale=theta_func, log = TRUE))) tot_mll <- tot_mll + curr_mll }