similar to: Simulation function

Displaying 20 results from an estimated 400 matches similar to: "Simulation function"

2009 Aug 14
1
Simulation Function - Save results
Hi listers, I am working on a simulation... But I am having some troubles... Suppose I have a function A which produces two results (mean and variance)... Then I would like to simulate this function A with a function B many times using the results from function A For example: #Function A boot<-function(a,b,c){ mean_boot<-(a+b)/2 var_boot<-c #list(a=a,b=b,c=c) return(a) } Then I would
2009 Sep 18
2
Sum according observation
Hi listers, I have a simple doubt... I need to manipulate the data base as: var1 var2 7 0.1 7 0.1 8 0.12 10 0.15 12 0.18 20 0.31 I would like to aggregate the equal cases as var1 making the sum of var2... I would get... var1 var2 7 0.2 8 0.12 10 0.15 12 0.18 20 0.31 Thanks in advance, Marcio -- View this message in context:
2000 Aug 10
2
help with matrix creation
hi R-help! I would like to know a simple and easy way (if posible) to do the following data manipulation. I have a matrix of experimental data (with replicae in time) >experiment<-data.frame(times=c(0,0,10,10,20,20,30,30),expval=c(1,1,2,2,3,3,4,4)) > experiment times expval 1 0 1 2 0 1 3 10 2 4 10 2 5 20 3 6 20 3 7 30 4 8
2009 Jun 11
4
Count observation
Hi listers, I have the following code... data<-as.matrix(c(1,2,3,4,5,6,7,8,9,10),nrow=10,ncol=1,byrow=TRUE) n<-nrow(data) m<-n-1 boot<-data[sample(m,replace=T),] So, I need to count the number of times each observation was selected at the sample with replacement... Suppose I sampled... 4 5 1 3 7 5 1 4 7 So, I would count... x count 1 2 2 0 3 1 4 2 5 2 6 0 7 2 8 0 9 0 10 0
2012 Mar 05
1
Trouble with a loop
I am trying to run this loop but it keeps coming up with the following error: 'Error: no function to return from, jumping to top level' n.simul <- 1000 A <- {for(i in 1:12){{ nT <- rpois(n.simul, T[i]) nP <- rpois(n.simul, P[i]) nD <- rpois(n.simul, D[i]) nC <- rbinom(n.simul, nT, C[i]) Score <- (5*nT + 2*nC + 3*nP + 3*nD) } return(Score)}} My aim is to calculate
2009 Dec 02
2
calculation problem when export and import data
Hello, I have a question on export and import data. Thank you for any suggestions. data 'simul' is generated as follows: N <- 20 n <- N/2 nsets <- 10 simul <- matrix(0,nsets,N) th <- c(0,1, 1) for(i in 1:nsets){ simul[i,] <- rnorm(N,mean= rep(th[1:2],N/2),sd=th[3]) } I exported data as follows: write.table(simul,
2010 Nov 01
2
grub irritants
It appears that if I do anything to grub.conf, say, take out the rhgb quiet, after every succeding kernel update, I have to manually edit grub.conf, because the kernel update - maybe the post install script? - will set the default to be the previous kernel. Has anyone got a solution to this, so that a kernel update will give the new kernel as the default? mark
2009 Jun 12
3
Order data frame
Hi listers, I have a data frame with 5 variables... And I want reorder the data frame according a specific variable X... I checked the sort and order functions... In my case I think that the ORDER function is applicable... But I did not understand at all... The idea is simple... Data order by X... I know that this is very simple... Anyways... How I would do that... Thanks in advance, Marcio --
2007 Nov 01
1
A question about lme object
I have a question about the lme function in R. My question is: After I got the object from function lme, why the numIter value of the object is always NULL? Following is my code: jjww<-lme(y~x*zz,data=simul,random=~x|group, control=lmeControl(returnObject=TRUE)) attributes(jjww) jjww$numIter the first 20 observation of data simul are: > simul y
2005 Jun 14
2
Plotting rows (or columns) from a matrix in different graphs, not using "par"
Dear R-users, I would like to ask whether it's possible (for sure it would be), to plot each rows (or columns) in different graphs and in the same figure region without using the function "par" and then struggling around with "axes" and labels etc. Luckily, I would always have "rows + columns = even number" and the same "ylim". The next one could be a
2007 Apr 22
1
labels
Hello, I would like to add to axis labels special caracters. Instead of writing :plot(simul, xlab="beta", ylab="sigma11") It would be great if I could write something as in LaTeX :plot(simul, xlab="\beta", ylab="\sigma_{11}") Is there a way to do that ? Thank you _________________________________________________________________ ues clics pour retrouver tout
2006 Jan 13
3
FastAGI Command Execution
I've noticed that with FastAGI (and maybe AGI) that when you sequentially send a sequence of dial commands, if the call is picked up, that after the call ends, the Fast AGI script keeps executing the commands! Is there anyway to stop execution once a call is picked up? I think looking at the result codes after the Dial to determine if the call was picked up or not is not a good idea... if it
2005 Jun 28
4
Anyone using SipP to produce RTP load?
Hey gang, I've been able to use sipp to produce some call volume on our asterisk server. The server has no problems handling 50 simul calls. But then again, no RTP is being done. I tried to use the rtp echo ability of sipp but that doesn't seem to work right. I also setup a fake number in asterisk that when called by sipp, would dial another number via PRI, hoping that some 729
2008 Apr 23
1
combining two (or more) tables by creating another dimension
Dear R community, I wish to combine two tables in one by adding an additional dimension: e.g.: > t1<-as.table(matrix(rnorm(40),nrow=4,ncol=10));rownames(t1)<-c("rowone","rowtwo","rowthree","rowfour") > t1 A B C D E F G H I J rowone
2009 Mar 26
2
Data manipulation - multiplicate cases
Hi listers, I am trying to arrange my data and I didn't find any information how to do it! I have a data with 3 variables: X Y Z 1-I would like to multiplicate de information of X according to the number I have for my Y variable... 2-Then I want to identify with a dicotomic variable by the number according my variable Z from X... I can do the first part by... z<-rep(x,y) But I don't
2007 Jul 24
1
function optimization: reducing the computing time
Dear useRs, I have written a function that implements a Bayesian method to compare a patient's score on two tasks with that of a small control group, as described in Crawford, J. and Garthwaite, P. (2007). Comparison of a single case to a control or normative sample in neuropsychology: Development of a bayesian approach. Cognitive Neuropsychology, 24(4):343?372. The function (see
2007 Dec 20
1
auto named savings (pngs & data-frames)
Hello, i only got a small problem. i try to create automatic new dataframes, or png?s. the main problem i got is: how can i create automatic a new name for a file (read out by simply "for") - i tried to use "(paste...) but theres an errormessage, about a wrong declination. R told it is as.character, but need as.Real. Should i use another method than "paste"? i tried as
2012 May 20
1
Basic questions regarding Samba capabilities
Hi people: I've been using Samba for a long time with some "basic" features like Samba working as a PDC, integrated with OpenLDAP, being a print server, among others, for a small number of "almost controlled" users (no more than 30 or 50 users). But now I'm interested to implement a Windows domain using Samba for a University with 6000-8000 users distributed through
2007 Jun 27
1
Help with IAX Trunk
Hi I've two servers : 1. UK 2. Pakistan Pakistan * server has ISDN30. Pakistan(ISDN30) <====> UK ===> User Im planning to setup an IAX2 trunk between these two server ? so , how much bandwidth I need for 30 simul. calls ? Im planning to use G729 on both my server ? to support 30 calls over IAX2 do I've to change some setting during compile time or not ? pls suggest.
2000 Aug 10
0
help with matrix creation (merging data frames)
> Date: Thu, 10 Aug 2000 15:33:39 -0700 > From: Jesus Maria Frias Celayeta <iosu at bureau.ucc.ie> > > hi R-help! > > I would like to know a simple and easy way (if posible) to do the following > data manipulation. I have a matrix of experimental data (with replicae in time) actually, they seem to be data frames. > >