similar to: Generating Data for Simulation

Displaying 20 results from an estimated 8000 matches similar to: "Generating Data for Simulation"

2012 Jan 03
3
An R interface to Model Building
Hello all, To anyone who is interested, I'm trying to learn a bit more about developing applications in R with user interfaces. I've been playing around with gWidgets to develop a model building interface. I'd appreciate any comments, suggestions, or guidance on how to better structure my R code and organize the programming task. In addition, any suggestions for features and
2002 Feb 08
2
Managing Data
Hello everyone, Can someone point me to some resources on managing data in R and/or S-plus? I have started using R more and more often in my work and I really like it. But, managing data is very different in R and S-Plus than in other packages that I am accustomed to. I know that it is an option to use different workspaces for different projects or to store all objects as source and read them
2002 Feb 25
1
Managing Data [Summary]
A while ago I asked about data management approaches in R. I was asked by several people to post a summary of the responses and alas I am just getting around to doing it. I received several comments, both on and off list. Below is a compilation of these responses. Hope this is as helpful to others as it was to me. Best, Brett 1. Frank Harrell recommended a section, "Operating in
2010 Mar 13
2
dmvnorm masked by emdbook
I am using curve3d in the emdbook package to graph a gaussian copula density function generated via the copula package. Unfortunately, it appears that emdbook masks dmvnorm from the package mvtnorm in a way that prohibits copula from generating the gaussian copula. (Sounds very confusing!) For example, > library(copula) > f<-function(x,y) dcopula(normalCopula(0),c(x,y)) >
2001 Jul 12
2
R Applied Regression Text
Is this text publicized? I ran across it doing an internet search. I have never seen any reference to it and it is not on CRAN under documentation. http://www.stat.lsa.umich.edu/~faraway/book/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
2001 Mar 26
1
Item Analysis and Cronbach's Alpha (Code Attached)
A short function I wrote for the purpose of evaluating scales made up of a number of questionnaire items. It provides Cronbach's Alpha, both unstandardized and based on standardized items. It also provides item statistics which include item-total correlations (corrected) and item-removed alpha. Thought some of you might find it useful. I would also appreciate any programming tips or
2011 Oct 10
1
variable scope for deltavar function from emdbook
Dear all, I want to use the deltavar() function from emdbook. I can use it directly from the command terminal but within a function it behaves weird. Working example: ---------------------- library("emdbook") fn <- function() { browser() y <- 2 print(deltavar(y*b2, meanval=c(b2=3), Sigma=1) ) } x <- 2 print(deltavar(x*b1, meanval=c(b1=3), Sigma=1) ) y<-3 fn()
2002 Jan 17
1
Using S-Plus Documentation with R
Insightful has some nice docs available for download that are s-plus command line guides to statistics. There are two versions, one for S-plus 2000 and one for S-plus 6.0. With regard to syntax, is one a closer match to R than the other? Are they based on the same S engines? Does that matter? I know there will be differences in any case, I am just trying to decide wich version I want to
2008 Aug 01
1
Confidence intervals with nls()
I have data that looks like O.lengthO.age 176 1 179 1 182 1 ... 493 5 494 5 514 5 606 5 462 6 491 6 537 6 553 6 432 7 522 7 625 8 661 8 687 10 704 10 615 12 (truncated) with a simple VonB growth model from within nls(): plot(O.length~O.age, data=OS) Oto = nls(O.length~Linf*(1-exp(-k*(O.age-t0))), data=OS, start=list(Linf=1000, k=0.1, t0=0.1), trace=TRUE) mod <- seq(0, 12)
2011 Oct 03
1
Quasi-Binomial simulation
Hi I want to do simulation on quasi-binomial distribution with some covariates. Does anyone have an idea how to do that? [[alternative HTML version deleted]]
2008 Mar 25
1
Error propagation
Dear R-helpers, I´m in the context of writing a general function for error propagation in R. There are somehow a few questions I would like to ask (discuss), as my statistical knowledge is somewhat restricted. Below is the function I wrote, the questions are marked. Many thanks in advance. propagate <- function(expr, varList, type = c("stat", "raw"), cov = TRUE) {
2018 Apr 12
3
Bivariate Normal Distribution Plots
R-Help I am attempting to create a series of bivariate normal distributions. So using the mvtnorm library I have created the following code ... # Standard deviations and correlation sig_x <- 1 sig_y <- 1 rho_xy <- 0.0 # Covariance between X and Y sig_xy <- rho_xy * sig_x *sig_y # Covariance matrix Sigma_xy <- matrix(c(sig_x ^ 2, sig_xy, sig_xy, sig_y ^ 2), nrow = 2, ncol = 2)
2012 Nov 19
2
Ben Bolker's '‘emdbook’ Package , rbetabinom
Hello, I am using rbetabinom ( to generate beta binomial random variables) function available in the "emdbook"package written by Professor. Ben Bolker for my research study. I have no questions with this function. However, I am looking for the theoretical method/algorithm of the function "rbetabinom " . Morris (1997), American Naturalist 150:299-327 is given as the reference
2007 Mar 05
4
about find the solution
If I want to find out the soltion of X1,X2 that min(3X1+2X2+X1X2) subject to 20<=X1+3X2<=50 10<=X1 which function or package can I use? Thanks.
2011 Aug 30
2
Multivariate Normal: Help wanted!
I have the following function, a MSE calc based on some Multivariate normals: MV.MSE<-function(n,EP,X,S){ (dmvnorm(X,mean=rep(0,2),I+S+EP)-dmvnorm(X,mean=rep(0,2),I+S))^2 + 1/n*(dmvnorm(X,mean=rep(0,2),1+S+EP/2)*det(4*pi*EP)^-.5- (dmvnorm(X,mean=rep(0,2),I+S+EP ))^2)} I can get the MV.MSE for given values of the function e.g
2008 Oct 07
1
Ecological Niche Modelling on R
Dear all, I have strong interest on Ecological Niche Model, which in general use a set of environmental variables (continuous, categorical etc) and Presence (or Presense/Absence) records for species. I think that "grasp" and "adehabitat" packages could help me on these tasks. My input layers are on ASC format, and the record of species is a data-frame with X, Y, name of
2000 Jul 17
3
Code for Coefficent (Cronbach's) Alpha
Hi all, I am trying to teach myself to use and program R (How else do you do it? lol) Anyway, I wrote a piece of code to compute coefficent alpha for a scale. As I am neither a statistician nor a programmer, I wanted people's feedback. The code appears to work (Win 95 with R 1.0.1) and I have verified my result with SPSS and it was correct (much to my astonishment!). Nonetheless, I am
2002 May 03
3
skipping columns with read.fwf?
I have a file in fwf. It is rather large, about 40,000 rows and 40 variables (columns). I only need about 10 variables form the data set for the analysis at hand. Unfortunately, these 10 variables are not contiguous in the file, for example, the first is position 1-8, the next position 25-27, then 40. Is there a way to read the selected varaibles that I need without reading in the entire data
2004 Feb 22
3
Simulation help
I am a new R user. As a test, I want to write a simple code that does the following simulation: 1. Randomly generate a number from a distribution, say, Poisson. Let's say that number is 3. 2. Randomly generate 3 numbers from another distribution, say, Normal. 3. Compute the sum of the numbers generated in step 2 and read it into a vector, V. 4. Repeat steps 1 through 3 for 100,000 times. 5.
2001 May 01
3
Factor Analysis
Thanks to Brian Ripley for the time and effort put into developing the factanal package for R. I have found it very useful. However, in trying to replicate some results from previous research, I have run into the need for a couple of extensions and was wondering if they might find their way into future implementations. 1. Though maximum likelihood estimates might be more rigorous and