search for: sims

Displaying 20 results from an estimated 1216 matches for "sims".

Did you mean: aims
2013 Mar 08
4
Substitute value
Hi, I have a large data frame and within this there is one column which contains individual codes (eg. 1.1234.2a.2). I am splitting these codes into their 4 components using strsplit (eg. "1", "1234", "2a", "2"). However there are some individual codes which do not have a last component (eg. 2.4356.3b. ), I want to give these codes a "1" as their
2008 Jul 14
2
Backslash in sub pattern?
Dear guRus, I am trying to replace "~" by "$\sim$" for TeX. However, I can't get the backslash to work. I would like to turn "DV~IV" into "DV$\sim$IV". sub("~","$\sim$","DV~IV") => "DV$sim$IV" sub("~","$\\sim$","DV~IV") => "DV$sim$IV"
2004 Aug 25
1
brlr function
Hi, I'm trying the brlr function in a penalized logistic regression function. However, I am not sure why I am encountering errors. I hope to seek your advice here. (output below) Thank you! Your help is truly appreciated. Min-Han #No error here, the glm seems to work fine >
2007 May 01
2
Simulation using parts of density function
Hi My simulation with the followin R code works perfectly: sim <- replicate(999, sum(exp(rgamma(rpois(1,2000), scale = 0.5, shape = 12)))) But now I do not want to have values in object "sim" exceeding 5'000'000, that means that I am just using the beginning of densitiy function gamma x < 15.4. Is there a possibility to modify my code in an easy way? Thanks for any help!
2008 Feb 03
1
Effect size of comparison of two levels of a factor in multiple linear regression
...tment2 scale(covariate) -0.1720456 0.1994251 0.3167116 0.8753761 # Proposed way to determine effect size: simulate outcomes for each # treatment level assuming the covariate to have a fixed value (here # its mean value after standardization: zero) library(MCMCpack) no.of.sims <- 10000 sims.model <- MCMCregress(model, mcmc=no.of.sims) sims.model[1:2,] (Intercept) treatment1 treatment2 scale(covariate) sigma2 [1,] -0.1780735 0.2024111 0.3395233 0.8682119 0.002617449 [2,] -0.1521623 0.1773623 0.2956053 0.8764573 0.003529013 sims.treat0 &...
2009 Feb 05
3
seq(along= surprise
This surprised me: > reps <- 100 > sims <- list(length=reps) > sims $length [1] 100 > for(i in seq(along=sims))print(i) [1] 1 > This is R 2.8.1. Kjetil [[alternative HTML version deleted]]
2010 Oct 20
3
Plot help
Dear List, I am relatively new to R and am trying to create more attractive plots than excel can manage! I have looked through the various programmes ggplot, lattice, hmisc etc but my case seems to be not metnioned, maybe it is but i have not noticed - if this is the case i apologise.
2008 Jan 14
7
GSM SIM Cards and Digium, or GSM SIM Adaptor
Hi List; Is there an Digium cards support GSM SIM cards so we can fix an SIM card to be used for calls within mobiles as it is less rate? Or I have to use an FXS to SIM adaptor? If yes, then anyone advise a models and prices? Regards Bilal ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo!
2007 Jun 01
0
Metropolis code help
...h/458/metropolis.r Below is My code with a flat prior on beta only (I'd like also to have the hierarchical version!) X<- cbind(1,DF$nsaid,DF$diuretic,DF$diuretic*DF$nsaid) y<- DF$Var3 Metropolis <- function(logtarget, start, R = 1000, sd = 1) { parmcount <- length(start) sims <- matrix(NA, nrow=R, ncol = parmcount) colnames(sims) <- names(start) sims[1,] <- start oldlogalpha <- logtarget(start) accepts <- 0 for (i in 2:R) { jump <- rnorm(parmcount, mean=0, sd=sd) y <- sims[i-1,] + jump newlogalpha <- logtarget(y) if...
2006 Sep 20
4
Calculating mean together with split
Hi I have a table called npl containing results of simulations. It contains about 19000 entries and the structure looks like this: NoPlants sim run year DensPlants 1 6 lng_cs99_renosterbos 1 4 0.00192 . . . it has 43 different entries for sim and year goes from 1 to 100, and run from 1 to 5. I would like to calculate the mean of DensPlants for each
2008 Mar 05
2
simulating the anova
I have been trying to figure out how to run a simple simulation of the ANOVA and I'm coming up just a bit short. The code I've got is: cohen.f = .25 groups = 4 between.var = 19 within.var = between.var / cohen.f ^ 2 n = 500 sim.means = rnorm(n = groups, mean = 0, sd = sqrt(between.var)) sim.data = lapply(sim.means, function(mean) rnorm(n = n, mean = mean, sd = sqrt(within.var)))
2005 Apr 13
1
i param in "for" loop does not takes zeros?
Hi all Is there any reason why the parameter i in a "for" loop ignores a value of zero? For example sim=c() p=.2 for(i in 0:5) {sim[i]=dbinom(i,5,p) } sim [1] 0.40960 0.20480 0.05120 0.00640 0.00032 In this example the quantile i= 0 was ignored since dbinom(0,5,p) [1] 0.32768 The same behaviour occurs if I use a while loop to perform the same calculation: sim=c() p=.2 i=0
2004 May 24
1
Null model for arima.sim().
In some time series simulations I'm doing, I occasionally want the model to be ``white noise'', i.e. no model at all. I thought it would be nice if I could fit this into the arima.sim() context, without making an exceptional case. I.e. one ***could*** do something to the effect if(length(model)==0) x <- rnorm(n) else x <- arima.sim(model,n) but it would be more suave if one
2019 May 15
1
domain still running although snapshot-file is deleted !?!
Hi, i have a strange situation: A domain is still running where domblklist points to a snapshot file and also dumpxml says the current drive is that snapshot file. But the file has been deleted hours ago. And the domain is still running. I can login via ssh, the database and the webserver are still running, domain is performant. How can that be ? Also lsof shows that the file is deleted:
2005 Oct 10
1
using innov in arima.sim
Hello, I have used the arima.sim function to generate a lot of time series, but to day I got som results that I didn't quite understand. Generating two time series z0 and z1 as eps <- rnorm(n, sd=0.03) z0 <- arima.sim(list(ar=c(0.9)), n=n, innov=eps) and z1 <- arima.sim(list(ar=c(0.9)), n=n, sd=0.03), I would expect z0 and z1 to be qualitatively similar. However, with n=10 the
2005 Oct 02
2
arima.sim bug?
Hi, I am using the arima.sim function to generate some AR time series. However, the function does not seem to produce exactly the same time series when I specify the innov parameter. For example > r <- rnorm(300) > x <- arima.sim(300, model=list(order=c(1,0,0),ar=c(.96)), innov=r, n.start=10) > y <- arima.sim(300, model=list(order=c(1,0,0),ar=c(.96)), innov=r, n.start=10) >
2002 Feb 25
2
The Sims
I have a copy of the Sims installed on a Win2k FAT32 partition. I know for a fact that The Sims works under Wine (Mandrake's "Gamer" edition), but I get an error when I try to run it. The error is as follows: "Game cannot be started because: There is not enough memory or hard drive space to run. Ex...
2010 Aug 19
1
How to include trend (drift term) in arima.sim
I have been trying to simulate from a time series with trend but I don't see how to include the trend in the arima.sim() call. The following code illustrates the problem: # Begin demonstration program x <- c(0.168766559, 0.186874000, 0.156710548, 0.151809531, 0.144638812, 0.142106888, 0.140961714, 0.134054659, 0.138722419, 0.134037018, 0.122829846, 0.120188714,
2006 Jan 13
1
Variance-covariance by factor
Dear all, I have a data frame with one factor and four numeric variables and wish to obtain the var-cor matrix separately by factor. I tried by() and sapply() but getting nowhere. I understand this can be done by subsetting the dataframe, but there should have some sleek ways of doing it. Here is a simulated dataframe; s <- rep(c("A","B","C"), c(25,22,18)) d
2006 Jan 06
1
lmer p-vales are sometimes too small
...quot; "grDevices" "utils" "datasets" "base" other attached packages: lme4 lattice Matrix "0.98-1" "0.12-11" "0.99-3" Pasted code for the SimMixed function (some lines might wrap): # This function generates n.sims random data sets for a design with 4 # blocks, 2 treatments applied to each block, and 40 replicate # observations for each block-treatment combination. There is no true # fixed treatment effect, so a statistical significance of a test for # a fixed treatment effect ought to occur with a probabilit...