search for: sim1

Displaying 20 results from an estimated 25 matches for "sim1".

Did you mean: sim
2008 Jul 23
1
Questions on weighted least squares
Hi all, I met with a problem about the weighted least square regression. 1. I simulated a Normal vector (sim1) with mean 425906 and standard deviation 40000. 2. I simulated a second Normal vector with conditional mean b1*sim1, where b1 is just a number I specified, and variance proportional to sim1. Precisely, the standard deviation is sqrt(sim1)*50. 3. Then I run a WLS regression without the intercept t...
2007 Jul 14
3
How to read many files at one time?
I want to load many files in the R. The names of the files are "Sim1.txt", " Sim2.txt", "Sim3.txt", "Sim4.txt", "Sim5.txt" and so on. Can I read them at one time? What should I do? I can give the same names in R. Thanks. For example: > tst=paste("Sim",1:20,".txt",sep="") # the file names...
2010 Sep 01
1
Looks like a bug in subsetting of a complicated object
I don't understand what is happening! I have a (large) object sim1, an matrix list with dim c(101,101) where each element is an 3*3 matrix. I am subsetting that with a matrix coo, of dim c(100,2), of unique indices, but the resulting object has length 99, not 100 as expected. Code reproducing the problem follows: library(RandomFields) set.seed(123) sim0 <-...
2012 Mar 16
2
Elegant Code
Hi, Can anyone help to write a more elegant version of my code? I am sure this can be put into a loop but I am having trouble creating the objects b1,b2,b3,...,etc. b1 <- rigamma(50,1,1) theta1 <- rgamma(50,0.5,(1/b1)) sim1 <- rpois(50,theta1) b2 <- rigamma(50,1,1) theta2 <- rgamma(50,0.5,(1/b2)) sim2 <- rpois(50,theta2) b3 <- rigamma(50,1,1) theta3 <- rgamma(50,0.5,(1/b3)) sim3 <- rpois(50,theta3) b4 <- rigamma(50,1,1) theta4 <- rgamma(50,0.5,(1/b4)) sim4 <- rpois(50,theta4) b5 <-...
2008 May 08
1
scrime Package simulatedSNP function
Hello, I need some help with the simulatedSNPs function from scrime package. I am trying to simulate some genotype of a case/control disease locus. The allele frequence are cases/controls Sample cases controls 2000 .5 .10 1500 .6 .40 In each of the row, i need to simulate 100 snp and calculate the pvalue ##############Download Scrime
2012 Sep 10
1
usb port issue in 9.1-Prerelease (Possibly Cam related)
...1: SCSI over Bulk-Only; quirks = 0x0000 umass1:7:1:-1: Attached to scbus7 cd1 at umass-sim0 bus 0 scbus6 target 0 lun 0 cd1: <HUAWEI Mass Storage 2.31> Removable CD-ROM SCSI-2 device cd1: 1.000MB/s transfers cd1: Attempt to query device size failed: NOT READY, Medium not present da0 at umass-sim1 bus 1 scbus7 target 0 lun 0 da0: <HUAWEI SD Storage 2.31> Removable Direct Access SCSI-2 device da0: 1.000MB/s transfers da0: Attempt to query device size failed: NOT READY, Medium not present o Time Elapses....many packets passed, no da0 or cd1 used. o USB Modem drops off the b...
2010 Jan 29
1
FracSim set.seed
.... However, the simulate function ignores my attempt to set the RNG seed I need for reproducible research. The published docs and google have not yielded an answer, so any help greatly received. Thanks, Selwyn ## Example code snippet library(FracSim) ## simulate some 1d fractal data set.seed(1234) sim1 = fracsim.1d(h=0.5,k=1000,n=5000) ## reset the seed set.seed(1234) sim2 = fracsim.1d(h=0.5,k=1000,n=5000) table(sim1$process == sim2$process) ## not identical... [[alternative HTML version deleted]]
2011 Mar 23
1
rbind a heterogeneous row
I have a dataframe with many rows like this: > df X1 X2 X3 X4 X5 X6 X7 week d sim1 FALSE TRUE TRUE TRUE TRUE TRUE TRUE 1 0.3064985 sim1 is the rowname, X1..X7,week,d are the column names. X1..X7 are factors, booleans in this case. I need to add another row, represented by the following list: list(rep(T,7),5,0.0) -- i.e, TRUE in all boolean columns, 5 in the week column, 0...
2010 Mar 16
1
Outbound route prefixes
...rixbox as my PBX. Until a couple of days I've installed a GSM Gateway to communicate with our three cellular phones: 15 64227777 15 64228888 15 64229999 The GSM Gateway has just one SIM. I use the Free PBX web interface in order to set up the route and trunk parameters: Trunk: ******* Name: SIM1 Peer details: host=10.10.1.2 (IP from GSM Gateway) port=5060 type=peer Outbound route: ****************** Name: SIM1 Dial patterns: 15XXXXXXXX (remember I just want to call our three cellular numbers) My GSM Gateway SIP number is 999. After that, I call 999 from my SIP phone, I get new tone, d...
2006 Feb 27
1
Different deviance residuals in a (similar?!?) glm example
...148, 112, 75, 52, 32, 23, 15, 7, 6, 3) # just as example deaths.sim <- rpois(length(age), exposures*hazard.sim) # simulating deaths from a poisson distribution (Brillinger, 1986) my.offset <- log(exposures) # offset for the poisson regression # new dataset: decupleing the sample size deaths.sim1 <- deaths.sim * 10 exposures1 <- exposures * 10 my.offset1 <- log(exposures1) # fitting the first dataset fit <- glm(formula = deaths.sim ~ age + offset(my.offset), family = poisson(link = "log")) res <- residuals(fit, type="deviance") # fitting...
2015 Feb 27
2
situation with ivr and four-channel gateway
2015-02-27 10:25 GMT-06:00 A J Stiles <asterisk_list at earthshod.co.uk>: > O.K. So what does your existing Dial() statement in extensions.conf look > like? > apology, put the gateway was sangoma but is a openvox , all my outgoing calls out for this context: [my-mobile-out] exten => _NXXXXXXX,n,Dial(SIP/1003/${EXTEN},55,rT) exten =>
2012 May 25
1
equivalent to source() inside a package
...then using source() instead of calling the functions (with consistent variable names and such) but this didn't work. The goal is for the user to be able to see the entirety of the code in the interactive R session, i.e. with a standard package implementation: > library(wei.simulations) > sim1 function (seed=5555) { [stuff] a = internal_function1(data) [stuff] } I would like the user to see: > sim1 function (seed=5555) { [stuff] tmp = apply(data,1,mean) a = sum(tmp) #or whatever, this is just an example [stuff] } where I can change those two lines in t...
2012 Sep 30
0
interleaving messages on umass detach
Hi. No biggie, but when I remove a umass device it appears that two kernel messages are being written at the same time. (da4:umass-sim1:1:0:0): lost device - 0 outstanding, 1 refs (da4:(pass6:umass-sim1:1:umass-sim1:1:0:0:0): removing device entry 0): passdevgonecb: devfs entry is gone (FreeBSD 9.1-PRERELEASE #0 r241067) Cheers Michiel
2019 Dec 27
2
"simulate" does not include variability in parameter estimation
...?? 1 > sim0 <- simulate(fit0, 10000, 1) > var(unlist(sim0)) [1] 2.006408 > x1 <- 1 > fit1 <- glm(x1~1, poisson) > coef(fit1) ?(Intercept) 4.676016e-11 > exp(coef(fit1)) (Intercept) ????????? 1 > vcov(fit1) ??????????? (Intercept) (Intercept)?? 0.9999903 > sim1 <- simulate(fit1, 10000, 1) > var(unlist(sim1)) [1] 1.00617 > sessionInfo() R version 3.6.2 (2019-12-12) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Catalina 10.15.2 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Framewor...
2019 Dec 27
1
"simulate" does not include variability in parameter estimation
...t; ? > fit1 <- glm(x1~1, poisson) >> ? > coef(fit1) >> ? ?(Intercept) >> 4.676016e-11 >> ? > exp(coef(fit1)) >> (Intercept) >> ? ????????? 1 >> ? > vcov(fit1) >> ? ??????????? (Intercept) >> (Intercept)?? 0.9999903 >> ? > sim1 <- simulate(fit1, 10000, 1) >> ? > var(unlist(sim1)) >> [1] 1.00617 >> ? > sessionInfo() >> R version 3.6.2 (2019-12-12) >> Platform: x86_64-apple-darwin15.6.0 (64-bit) >> Running under: macOS Catalina 10.15.2 >> >> Matrix products: default &...
2015 Mar 02
0
situation with ivr and four-channel gateway
...el 1 is passed to > channel 2 Ah. *Incoming* calls are not something that is within your control; they have already been routed onto a line by your telco. So you will need to speak to someone at your telco about doing this. As a temporary measure, you could try setting up divert-on-busy so SIM1 diverts to SIM2, SIM2 diverts to SIM3, SIM3 diverts to SIM4 and SIM4 diverts to SIM1. You can do this with specially-crafted Dial() statements, or by temporarily inserting the SIMs in an old mobile phone. See your telco's website for details of setting up call diversion. -- AJS Note:...
2005 Mar 31
2
how to simulate a time series
...nnov=rdtb)) } allsim <- as.data.frame(sim) colnames(allsim) <- paste("sim",1:5,sep="") all <- cbind(rdtb,allsim) #-------------------------------- I don't understand why the simulation runs generate virtually identical values: > all[100:105,] rdtb sim1 sim2 sim3 sim4 sim5 100 2.3863636 1.065661 1.065661 1.065661 1.065661 1.065661 101 1.9318182 2.606093 2.606093 2.606093 2.606093 2.606093 102 2.2954545 3.854074 3.854074 3.854074 3.854074 3.854074 103 2.5882353 4.880240 4.880240 4.880240 4.880240 4.880240 104 2.0227273 4.917622...
2019 Dec 27
0
"simulate" does not include variability in parameter estimation
...; [1] 2.006408 > > x1 <- 1 > > fit1 <- glm(x1~1, poisson) > > coef(fit1) > ?(Intercept) > 4.676016e-11 > > exp(coef(fit1)) > (Intercept) > ????????? 1 > > vcov(fit1) > ??????????? (Intercept) > (Intercept)?? 0.9999903 > > sim1 <- simulate(fit1, 10000, 1) > > var(unlist(sim1)) > [1] 1.00617 > > sessionInfo() > R version 3.6.2 (2019-12-12) > Platform: x86_64-apple-darwin15.6.0 (64-bit) > Running under: macOS Catalina 10.15.2 > > Matrix products: default > BLAS: > /System/Library/...
2010 Jan 22
2
sorted reshaping?
dear R wizards:? I am wrestling with reshape.? I have a long data set that I want to convert into a wide data set, in which rows are firms and columns are years. > summary(rin) firm fyear sim1 Min. :1004.00 Min. :1964.0 Min. : -1.00000 1st Qu.:1010.00 1st Qu.:1979.0 1st Qu.: -0.14334 Median :1016.00 Median :1986.0 Median : 0.00116 Mean :1016.34 Mean :1986.1 Mean : 1.03475 3rd Qu.:1021.00 3rd Qu.:1993.2 3rd Qu.: 0.26931 Max. :1034.00 Max. :20...
2009 Mar 17
0
(no subject)
...(1,"Exp",15), nmax = 20) set.seed(1) iso <- predict(g.dummy, newdata = xy, nsim = 10) gridded(iso) = ~x+y # spplot(iso,main="isotropic") # not essential for this question # I could make a dataframe like: diso<-data.frame(iso) diso[1:4,] # which results in: # x y sim1 sim2 sim3 sim4 sim5 sim6 sim7 sim8 sim9 sim10 # 1 1 1 0.4093776 1.0752794 -1.5654566 0.6183240 -2.196812 0.4545051 -0.06372423 -2.1544707 -1.131036 -0.4008869 # 2 2 1 0.8133436 0.9041941 -0.9712924 0.4319641 -2.432893 1.0770354 0.21302299 -1.6938882 -2.0653...