search for: logp

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

Did you mean: log
2009 Feb 08
2
how to make this qq plot in lattice and/or ggplot2
Hi Group, Here is some data. p <- runif(1000) # sample data groups <- rep(c(1,2),each=500) #conditioning variable mydata <- cbind(p,groups) n <- length(p) u <- (1:n)/(n + 1) # uniform distribution reference for qqplot logp <- -log(p,base=10) logu <- -log(u,base=10) qqplot(logp,logu) How can I make the above qqplot in lattice and/or ggplot2. The sample is uniform, and I take -log10. In addition, I would like to use the group variable to condition. I was not able to get the stat_qq function in ggplot2 to work....
2005 May 03
1
maximization help :
Given a vector : pvec=(p1,p2,.... p J) with sum(pvec)=1, all the elements are non-negative, that is, they are probabilities a matrix A ( N* J ), with the elements alpha(ij) are 0 or 1 I want to MAXIMIZE THE RESULT RESULT= product( i=1, to N [ sum ( alpha(ij)* pj , j =1,to J ) ] ) thus, I need to get pvec. how should I do ? for example
2013 Feb 20
0
Bayesian mixing model
...ing a new "userProb" argument, so I'd be very grateful to anyone who could help me out with this. Failing that, does anybody know of another package for Bayesian optimisation that could account for covariance in the source area geochemistry? For anyone that can help, you may need the logprobability function that BCE calls as the default when userProb is set to NULL: ########## logProbabilityBCE1 <- function (RAT, X, init.list) { with(init.list, { if (!is.null(userProb)) logp <- log(userProb(RAT, X)) else { y <- X %*% RAT if (!is.n...
2005 Mar 24
1
RE: [R] Mapping actual to expected columns for princomp object
...9 0.09070675 -1.68781215 10 -0.14930067 -0.15239717 Best, Andy > From: Dana Honeycutt > > I am working with data sets in which the number and order of columns > may vary, but each column is uniquely identified by its name. E.g., > one data set might have columns > MW logP Num_Rings Num_H_Donors > while another has columns > Num_Rings Num_Atoms Num_H_Donors logP MW > > I would like to be able to perform a principal component > analysis (PCA) > on one data set and save the PCA object to a file. In a > later R session, > I would lik...
2009 Sep 06
2
question about ... passed to two different functions
...so we write ### a function that evaluates the log unnormalized density of the ### Markov chain we want to run (log likelihood + log prior) ludfun <- function(beta) { stopifnot(is.numeric(beta)) stopifnot(length(beta) == ncol(modmat)) eta <- as.numeric(modmat %*% beta) logp <- ifelse(eta < 0, eta - log1p(exp(eta)), - log1p(exp(- eta))) logq <- ifelse(eta < 0, - log1p(exp(eta)), - eta - log1p(exp(- eta))) logl <- sum(logp[y == 1]) + sum(logq[y == 0]) val <- logl - sum(beta^2) / 2 return(val) } beta.initial <- as.vector(out$co...
2012 Apr 16
1
eval a SYMSXP from C
...val(attr(xn,"mu")) [1] 2 > In a .Call, I am attempting to eval the SYMSXP as follows: SEXP mu_ = Rf_getAttrib(x_,Rf_install("mu")); if(TYPEOF(mu_)==SYMSXP) { mu_ = Rf_eval(Rf_lang1(mu_),R_GlobalEnv); } However, when running this code, I get the following error: Error in logp(xn) : could not find function "mu" Do I need to create an expression of c("get", "mu") to force the name lookup to evaluate the SYMSXP? Thanks, Whit
2005 Mar 24
0
Mapping actual to expected columns for princomp object
I am working with data sets in which the number and order of columns may vary, but each column is uniquely identified by its name. E.g., one data set might have columns MW logP Num_Rings Num_H_Donors while another has columns Num_Rings Num_Atoms Num_H_Donors logP MW I would like to be able to perform a principal component analysis (PCA) on one data set and save the PCA object to a file. In a later R session, I would like to load the object and then apply the lo...
2011 Apr 04
1
Clarks 2Dt function in R
Dear Ben, you answerd to Nancy Shackelford about Clarks 2Dt function. Since the thread ended just after your reply, I would like to ask, if you have an idea how to use this function in R I defined it the following way: function(x , p, u) { (p/(pi*u))*(1+(x^2/u))^(p+1) } and would like to fit this one to my obeservational data (count) [,1] [,2] [1,] 15 12 [2,] 45 13 [3,]
2008 Jun 24
0
GWA plot
I need some help with a genome-wide association scatterplot. A recently published example of such a plot is attached to this message. Typical variables include: Y: -logP-value (range from 0 to 8) X: chromosomal distance Z: chromosomes 1 through 22 and X (a factor with 23 levels) I used coplot(Y~X|CHR) and xyplot(Y~X|CHR), but I am not sure how to get the entire graph in a single panel (see attached). Please let me know if there is any simple way to produce suc...
2011 Mar 03
0
[PATCH] Eliminate the ec_int32 and ec_uint32 typedefs.
...*/ #define ENCODER_RESET_START rng - ec_uint32 rng; + celt_uint32 rng; int spread_decision; int delayedIntra; int tonal_average; @@ -687,8 +687,8 @@ static void tf_encode(int start, int end, int isTransient, int *tf_res, int LM, int tf_select_rsv; int tf_changed; int logp; - ec_uint32 budget; - ec_uint32 tell; + celt_uint32 budget; + celt_uint32 tell; budget = enc->storage*8; tell = ec_tell(enc); logp = isTransient ? 2 : 4; @@ -727,8 +727,8 @@ static void tf_decode(int start, int end, int isTransient, int *tf_res, int LM, int tf_select_rsv...
2014 Apr 04
0
Wine release 1.7.16
.... d3d9: Use the private store api for buffers. d3d9: Use the private store api for textures. d3d9: Use the private store api for surfaces. wined3d: Remove resource private data methods. wined3d: Select the component by editing the swizzle. wined3d: Handle LOG and LOGP in shader_hw_scalar_op. wined3d: Handle RCP in shader_hw_scalar_op. wined3d: Translate LOGP to LG2 in the ARB shader backend. wined3d: Translate shader model 2.0+ EXPP to EX2. wined3d: Raise MaxPrimitiveCount and MaxVertexIndex. d3dx9_36/tests: Initialize some test val...