similar to: "taking the log then later exponentiate the result" query

Displaying 20 results from an estimated 10000 matches similar to: ""taking the log then later exponentiate the result" query"

2009 Apr 12
0
Generalised Rejection Sampling
Hi, I am trying to figure out the observed acceptance rate and M, using generalised rejection sampling to generate a sample from the posterior distribution for p. I have been told my code doesn't work because I need to "take the log of the expression for M, evaluate it and then exponentiate the result." This is because R is unable to calculate high powers such as 545.501.
2012 Feb 10
4
function arrows.circular not working
I have started using the circular package but it is not recognizing the function arrows.circular. I attempted to use the example provided in the circular manual. Here is the example code using the circular package: plot(rvonmises(10, circular(0), kappa=1)) arrows.circular(rvonmises(10, circular(0), kappa=1)) arrows.circular(rvonmises(10, circular(0), kappa=1), y=runif(10), col=2)
2013 Oct 07
1
search for variable in package in .GlobalEnv first
Hi First, sorry if I get the terminology wrong, I am still quite new to the concept of using environments and workspaces. Say I have a statement in a package SIM like sim <- TYPE where the variable TYPE is initialized in the package to e.g. "exponential" (SIM::TYPE == "exponential"). Now, I want to give the user the option of specifying the variable TYPE, but to the
2008 Apr 14
3
Power curves
Hi, I am trying to create a power curve to show how the power of a t-test varies depending on the mean. Any ideas how I should go about this? Louisa _________________________________________________________________ [[alternative HTML version deleted]]
2011 Jan 03
3
Inverse Gaussian Distribution
Dear, I want to fit an inverse gaussion distribution to a data set. The predictor variables are gender, area and agecategory. For each of these variables I've defined a baseline e.g. #agecat: baseline is 3 data<-transform(data, agecat=C(factor(agecat,ordered=TRUE), contr.treatment(n=6,base=3))) The variable 'area' goes from A to F (6 areas: A,B,C,D,E,F) How can i
2004 Dec 28
1
RandomFields: Controling seed with GaussRF
Hi, I'm using RF to simulate a correlated variable with GaussRF set.seed=1 GaussRF(sim.kfinegrid, grid=F, model="exponential", param=c(0,0.5,0,0.2)) However when I simulate again using the same random seed I get different results. > set.seed=1 > summary(GaussRF(sim.kfinegrid, grid=F, model="exponential", param=c(0,0.5,0,0.2))) Min. 1st Qu. Median Mean 3rd
2008 Apr 14
2
Power curve for a wilcoxon test
Hi, I am trying to write R code to produce a power curve to show how the power of a Wilcoxon-test varies depending on the mean, with data generated from a uniform distribution. Any ideas how I should go about this?Louisa _________________________________________________________________ Amazing prizes every hour with Live Search Big Snap [[alternative HTML version deleted]]
2010 Dec 27
3
Gamma & Lognormal Model
Dear, I'm very new to R Gui and I have to make an assignment on Gamma Regressions. Surfing on the web doesn't help me very much so i hope this forum may be a step forward. The question sounds as follows: The data set is in the library MASS first install library(MASS) then type data(mammals) attach(mammals) Assignment: Fit the gamma model and lognormal model for the mammals data.
2004 Mar 24
2
geoR - help for bayesian modelling
Hi, I am trying to do a bayesian prediction for soil pollution data above a certain threshold, using geoR. Everything is working fine until i am doing the krig.bayes. I tried to do the prediction on a grid 67 by 113 cells and my computer is freezing to death. At larger numbers of cells it tells me after a while that it reaches the max. memory of 511 Mb. My computer has only 512 Mb of RAM.
2005 May 15
1
CircStats and Anova
Hi, If I have two sets of directional data (in radians) and want to compare them with a multifactorial anova. Is it even legitimate to compare circular data with an anova? The books I've picked up from the library don't really say, but it looks unlikely. If it is allowable, is my having stored the data as circular (X = as.circular(A)) something the aov() function will take into account,
2007 Sep 22
0
error messages
Hi, I have a density that I need to get MLEs from, which includes definite integrals both in the denominator and in the numerator of the density function. It looks like the outcome depends on the initial values given. My program is shown below: library(circular) ######################################## 4 parameters ######################################## z<-rvonmises(100,0,1)
2006 Sep 21
2
Exponentiate a matrix
Suppose I have a square matrix P P <- matrix(c(.3,.7, .7, .3), ncol=2) I know that > P * P Returns the element by element product, whereas > P%*%P Returns the matrix product. Now, P^2 also returns the element by element product. But, is there a slick way to write P %*% P %*% P Obviously, P^3 does not return the result I expect. Thanks, Harold [[alternative HTML version
2009 Apr 07
2
Frequency table to histogram
I have read a frequency table in to R called "temp." I now want to create a histogram table from it, but I obviously first have to expand the data - to the sample size of 100. I want to use the command rep(), but I'm not sure how to go about it..I tried using the code: temp1<-rep(temp$Chest,100) hist(temp1) But this creates a v. odd histogram so I know it must be wrong!
2013 Feb 04
2
Contract Syntactic Sugar
## the following is a dream: add some sugar syntax to allow for contracts with teeth (in and out checking) > is.positive <- function(x) (all(x>0)) > exponentiate <- function( x ::is.data.frame , exponent ::is.numeric is.positive) :: is.vector is.numeric { x$base :: is.positive ## error also if base does not exist in x; may need some special IQ x$base^exponent }
2008 Oct 22
0
ad.test exponential distribution
Hi, I'm trying to use ad.test or ad2.test to test whether a given data set is exponential. I see that one of the function inputs is "distn", but I try "exponential" and 5 other variants, but I still get the error message: ad.test(test2, distn="exponential", fit=list(estimate = 0.167685), H=NA, sim=100) Error in ad.test(test2, distn = "exponential",
2009 Jun 19
8
x4500 resilvering spare taking forever?
I''ve got a Thumper running snv_57 and a large ZFS pool. I recently noticed a drive throwing some read errors, so I did the right thing and zfs replaced it with a spare. Everything went well, but the resilvering process seems to be taking an eternity: # zpool status pool: bigpool state: ONLINE status: One or more devices has experienced an unrecoverable error. An attempt was
2007 Nov 24
2
unexpected result from reshape
Hi all. I have unexpected reshape results on datasets with certain variable names. Here a reproducible example: d <- matrix(seq_len(7*7), 1, 7*7) vnames <- c('acc','ppeGross','CF','ROA','DeltaSales','invTA','DeltaRevDeltaRec') varying <- unlist(lapply(vnames, paste, 1:7, sep='.')) d <- data.frame(d) names(d) <- varying
2007 Jan 03
1
mcmcsamp and variance ratios
Hi folks, I have assumed that ratios of variance components (Fst and Qst in population genetics) could be estimated using the output of mcmcsamp (the series on mcmc sample estimates of variance components). What I have started to do is to use the matrix output that included the log(variances), exponentiate, calculate the relevant ratio, and apply either quantile or or HPDinterval to get
2017 Jun 09
1
efetch result not in character format
Hi, I want to use reutils to obtain the accession numbers of a query search in character format. When I use efetch, the accession number isn't in a character format, and I'm not sure if the number is accurate, because I get the error: Error in file.exists(destfile) : object 'destfile' not found This is what I tried: UIDs<-esearch( "Methylation" ) accession_numbers
2018 Feb 11
4
Parallel assignments and goto
Hi guys, I am working on some code for automatically translating recursive functions into looping functions to implemented tail-recursion optimisations. See https://github.com/mailund/tailr As a toy-example, consider the factorial function factorial <- function(n, acc = 1) { if (n <= 1) acc else factorial(n - 1, acc * n) } I can automatically translate this into the loop-version