similar to: Simulation study in R

Displaying 20 results from an estimated 10000 matches similar to: "Simulation study in R"

2007 May 03
4
Survival statistics--displaying multiple plots
Hello all! I am once again analyzing patient survival data with chronic liver disease. The severity of the liver disease is given by a number which is continuously variable. I have referred to this number as "meld"--model for end stage liver disease--which is the result of a mathematical calculation on underlying laboratory values. So, for example, I can generate a Kaplan-Meier plot
2007 Jun 12
3
Appropriate regression model for categorical variables
Dear users, In my psychometric test i have applied logistic regression on my data. My data consists of 50 predictors (22 continuous and 28 categorical) plus a binary response. Using glm(), stepAIC() i didn't get satisfactory result as misclassification rate is too high. I think categorical variables are responsible for this debacle. Some of them have more than 6 level (one has 10 level).
2008 Jun 30
3
Is there a good package for multiple imputation of missing values in R?
I'm looking for a package that has a start-of-the-art method of imputation of missing values in a data frame with both continuous and factor columns. I've found transcan() in 'Hmisc', which appears to be possibly suited to my needs, but I haven't been able to figure out how to get a new data frame with the imputed values replaced (I don't have Herrell's book). Any
2011 Jun 05
3
How to convert a factor column into a numeric one?
I have a data frame: > head(df) Time Temp Conc Repl Log10 1 0 -20 H 1 6.406547 2 2 -20 H 1 5.738683 3 7 -20 H 1 5.796394 4 14 -20 H 1 4.413691 5 0 4 H 1 6.406547 7 7 4 H 1 5.705433 > str(df) 'data.frame': 177 obs. of 5 variables: $ Time : Factor w/ 4 levels
2010 Apr 29
2
Random numbers with PDF of user-defined function
Hi, In S+/R, is there an easy way to generate random numbers with a probability distribution specified by an exact user-defined function? For example, I have a function: f(x) = 1/(365 * x), which should be fitted for values of x between 1 and 100,000 How do I generate random numbers with a probability distribution that exactly maps the above function? Nick This email and any attachments may
2008 Apr 22
2
Multidimensional contingency tables
How does one ideally handle and display multidimenstional contingency tables in R v. 2.6.2? E.g.: > prob1<- data.frame(victim=c(rep('white',4),rep('black',4)), + perp=c(rep('white',2),rep('black',2),rep('white',2),rep('black',2)), + death=rep(c('yes','no'),4), count=c(19,132,11,52,0,9,6,97)) > prob1 victim perp
2006 May 11
3
Please help me to combine two datasets.
Dear r-users, Suppose I have two data sets data set-1 Date height ------------------------ 1/11/2005 10 2/11/2005 23 3/11/2005 54 4/11/2005 21 5/11/2005 22 data set-2 weight -------- 32 45 11 Now I want to combine this two data sets. i.e. i want to see: Date height weight ------------------------------------------- 3/11/2005 54
2007 Sep 10
1
S-Plus "resample" package and associated functions
Are there any packages in R that reproduce the package "resample" of S-Plus? The sample() function in R doesn't provide equivalent flexibility of bootstrap() and bootstrap2(). ================================================================ Robert A. LaBudde, PhD, PAS, Dpl. ACAFS e-mail: ral at lcfltd.com Least Cost Formulations, Ltd. URL: http://lcfltd.com/ 824
2008 Sep 25
1
R function which finds confidence interval for binomial variance
I need to construct confidence intervals for the binomial variance. This is the usual estimate v = x*(n-x)/n or its unbiased counterpart v' = x*(n-x)/(n-1) where x = binomial number of successes observed in n Bernoulli trials from proportion p. The usual X^2 method for variance confidence intervals will not work, because of the strong non-normal character of the sampling
2010 Jun 21
2
Singularity in simple ANCOVA problem
I'm using R 2.10.1 with the latest version of all packages (updated today). I'm confused as to why I'm getting a hard singularity in a simple set of experimental data: > blots ID Lot Age Conc 1 1 A 3 4.44 2 2 A 3 4.56 3 3 B 41 4.03 4 4 B 41 4.57 5 5 C 229 4.49 6 6 C 229 4.66 7 7 D 238 3.88 8 8 D 238 3.93 9 9 E 349 4.43 10 10 E 349
2011 Feb 09
2
comparing proportions
Hi, I have a dataset that has 2 groups of samples. For each sample, then response measured is the number of success (no.success) obatined with the number of trials (no.trials). So a porportion of success (prpop.success) can be computed as no.success/no.trials. Now the objective is to test if there is a statistical significant difference in the proportion of success between the 2 groups of
2007 Jan 20
3
Insert R logo
Dear all R users, I want to insert the R logo in every graphic that I made in my Statistical analysis using R. Can anyone tell me whether is it possible or not and if possible how to do this? your help will be highly appreciated. Thanks and Regards, Arun [[alternative HTML version deleted]]
2009 Sep 03
1
Problem accessing functions in package 'roxygen'
I have Vista Home with R-2.9.0, and installed and tried to test the package 'roxygen': > utils:::menuInstallPkgs() trying URL 'http://lib.stat.cmu.edu/R/CRAN/bin/windows/contrib/2.9/roxygen_0.1.zip' Content type 'application/zip' length 699474 bytes (683 Kb) opened URL downloaded 683 Kb package 'roxygen' successfully unpacked and MD5 sums checked The
2006 Feb 14
2
how I can perform Multivariate Garch analysis in R
Dear aDVISOR, Hope I am not disturbing you. Can you tell me how I can perform Multivariate Garch analysis in R. Also please, it is my humble request let me know some resource materials on Multivariate Garch analysis itself. Sincerely yours, -- Arun Kumar Saha, M.Sc.[C.U.] S T A T I S T I C I A N [Analyst] Transgraph Consulting [www.transgraph.com] Hyderabad, INDIA Contact # Home:
2008 Apr 10
1
Problem installing and using package "tseries"
I have R 2.6.2, and have tried downloading and installing the package "tseries". I get the same error when I use two different mirror sites: > utils:::menuInstallPkgs() trying URL 'http://cran.mirrors.hoobly.com/bin/windows/contrib/2.6/tseries_0.10-14.zip' Content type 'application/zip' length 400799 bytes (391 Kb) opened URL downloaded 391 Kb package
2007 Sep 18
5
Need help on "date"
Dear all, I have a variable 'x' like that: > x [1] "2005-09-01" Here, 2005 represents year, 09 month and 01 day. Now I want to create three variables naming: y, m, and d such that: y = 2005 m = 09 d = 01 can anyone tell me how to do that? Regards, [[alternative HTML version deleted]]
2010 Feb 25
1
Help with simple bootstrap test
Hi all Forgive me, I'm a total R newbie, and this seems to be a straightforward simple bootstrap problem, but after a whole day of trying to figure out how to do it I'm ready to give up. Part of the problem is that every example and every help page seems to be about doing something more far more complex. I'm got a table with 40 columns and 750 rows. I sum all the values across the
2008 Feb 27
3
Loading user defined functions autometically each time I start R
Hi all, I wrote some user defined function for my own. Now I want to get a mechanism so that every time I start R, those function will automatically be loaded in R without manually copying pasting. Can gurus here pls tell me how to do that? Or I have to build my own packages bundled with those functions. However I am not familiar in writing R package yet. Regards, [[alternative HTML version
2008 Jul 12
5
shapiro wilk normality test
Hi everybody, somehow i dont get the shapiro wilk test for normality. i just can?t find what the H0 is . i tried : shapiro.test(rnorm(5000)) Shapiro-Wilk normality test data: rnorm(5000) W = 0.9997, p-value = 0.6205 If normality is the H0, the test says it?s probably not normal, doesn ?t it ? 5000 is the biggest n allowed by the test... are there any other test ? ( i know qqnorm
2006 Jun 12
3
NA values
Dear all R users, I am wondering whether there is any way to replace all "NA" values in a data frame by some numerical value, suppose 1000? Thanks and Regards [[alternative HTML version deleted]]