similar to: applying data generating function

Displaying 20 results from an estimated 1000 matches similar to: "applying data generating function"

2004 Feb 12
2
calling R from a shell script and have it display graphics
Hello, I am running R under Linux/x11. I would like to call R from a shell script and have it display a series of graphics. The graphics should remain visible until the user clicks or presses a key. I first tried R BATCH, but it does not load the x11 module, making it impossible to open x11 or png devices. Then, I tried to call R with a 'here' script: R --vanilla --quiet --args
2007 Jun 19
2
Function -return value
Hi, I am trying to write a function with the following codes and I would like it to return the values for "alpha beta para parab " seperately. Then I would like to use this funstion for "variable" with factor "a" and "b". But the result turns out to be a matrix with element like "Numeric,2" ... I guess they are just the values for
2004 Feb 14
6
Beginner's question about t.test()
Dear All, I am doing some exercise in statistics textbook on comparison of two experimental means. Is it possible to use t.test() do t-test when I have only two means, sample size, two standard deviations ? (no raw data). Thanks. Pramote
2007 Jun 04
3
test for nested factors
Is there a conventional way to test for nested factors? I.e., if 'a' and 'b' are lists of same-length factors, does each level specified by 'a' correspond to exactly one level specified by 'b'? The function below seems to suffice, but I'd be happy to know of a more succinct solution, if it already exists. Thanks, Tim. --- "%nested.in%" <-
2003 Dec 09
2
PROC MIXED vs. lme()
I'm trying to learn how to do a repeated measures ANOVA in R using lme(). A data set that comes from the book Design and Analysis has the following structure: Measurements (DV) were taken on 8 subjects (SUB) with two experimental levels (GROUP) at four times (TRIAL). In SAS, I use the code: PROC MIXED DATA=[data set below]; CLASS sub group trial; MODEL dv = group trial group*trial;
2007 Jul 26
4
Finding matches in 2 files
I have 2 files containing data analysed by 2 different methods. I would like to find out which genes appear in both analyses. Can someone show me how to do this? _________________________________________________________________ [[trailing spam removed]] [[alternative HTML version deleted]]
2004 Apr 18
1
multistratum glm?
Hello, I routinely use aov and and the Error term to perform analyses of variance of experiments with 'within-subject' factors. I wonder whether a notion like 'multistratum models' exists for glm models when performing a logit analysis (without being 100% sure whether this would make sense). I have data of an experiment where the outcome is a categorical variable: 20
2007 Jun 28
4
compare 2 vectors
Dear all, I would like to take out the values from one vector that are equal to the values in another vector. Example: a <- c(1,2,3,4,5,6,7,8,9) b <- c(3,10,20,5,6) b_noRepeats = c(10,20) So I would like to have the vector b without the same values as vector a. Kind regards, João Fadista [[alternative HTML version deleted]]
2007 May 15
3
aov problem
I am using R to make two-way ANOVA on a number of variables using g <- aov(var ~ fact1*fact2) where var is a matrix containing the variables. However the outcome seem to be dependent on the order of fact1 and fact2 (i.e. fact2*fact1) gives a slightly (factor of 1.5) different result. Any ideas why this is? Thanks for any help Anders
2004 Jan 20
2
repeated measurements with R
Hello All, I have a more statistical question, and how this is implemented in R. The problem is the following: We have 2 different solutions (samples), which are filtered and then the concentration of the filtrate is measured. We want to evaluate how the filter proces and the concentration measurement influences the detection of the difference of the two solutions and which step has which
2004 May 10
7
strange behavior of names<-
Dear R-help, I've encounter what seems to me a strange problem with "names<-". Suppose I define the function: fun <- function(x, f) { m <- tapply(x, f, mean) ans <- x - m[match(f, unique(f))] names(ans) <- names(x) ans } which subtract out the means of `x' grouped by `f' (which is the same as, e.g., resid(lm(x~f)) if `f' is a factor).
2004 May 08
1
Surprise when indexing with a factor.
Hello, I had been thinking for years, without having ever checked (shame on me), that indexing a named vector by a factor 'f' produced the same results as indexing it by 'as.character(f)'. I was wrong, as the following example shows: (m <- c(a=1,b=2)) (f <- factor(c(1,2),labels=c('b','a'))) m[f] m[as.character(f)] m[as.numeric(f)] When the
2003 Dec 08
1
aggregate and names of factors
Hello, I use the function 'aggregate' a lot. One small annoyance is that it is necessary to name the factors in the 'by' list to get the names in the resulting data.frame (else, they appear as Group.1, Group.2...etc). For example, I am forced to write: aggregate(y,list(f1=f1,f2=f2),mean) instead of aggregate(y,list(f1,f2),mean) (for two factors with short names, it is not such
2010 Sep 30
7
how to make list() return a list of *named* elements
If I combine elements into a list b <- c(22.4, 12.2, 10.9, 8.5, 9.2) my.c <- sample.int(round(2*mean(b)), 5) my.list <- list(b, my.c) the names of the elements seems to get lost in the process: > str(my.list) List of 2 $ : num [1:5] 22.4 12.2 10.9 8.5 9.2 $ : int [1:5] 11 8 6 9 20 If I explicitly name the elements at list-creation, I get what I want: my.list <- list(b=b,
2004 Apr 10
4
Automation of c()
Hi, I have around 300 files with the x, y and z coordinates of a DEM that I would like to join in a single data frame object. I know how to automate the import of the 300 data frames. in Bash ls > names in R names<-scan(names...) With rep() and data.frame() construct a series of read.table() commands, which you write to a file and execute them with source(). I do not know however how
2007 Jul 23
1
Multilevel package: Obtaining significance for waba within-group correlation?
Hello everyone, I am employing the waba method from the multilevel package for obtaining a within-group correlation (Description: http://bg9.imslab.co.jp/Rhelp/R-2.4.0/src/library/multilevel/man/waba.html). Does anybody know a way or a calculation for obtaining a significance value for that correlation? And another question: Does anybody know whether it is possible to save individual
2003 Dec 14
2
density plot for very large dataset
I'm new to R and am trying to perform a simple, yet problematic task. I have two variables for which I would like to measure the correlation and plot versus each other. However, I have ~30 million data points measurements of each variable. I can read this into R from file and produce a plot with plot(x0, x1) but as you would expect, its not pretty to look at and produces a postscript
2005 Feb 23
2
Need your help in calculating the p-value
Hi, I am using R to perform wilcox.test and wondering if you know how the p-value in wilcox.test is calculated? Thank you for your help:-) Regards, Latha
2007 Jun 18
1
BATCH
Hello, I run some programs R from BATCH using this syntax R CMD BATCH options(echo = FALSE) C:\R\copie.r C:\PHP\sortie.r but the options doesn't work do you know why? thanks. _____________________________________________________________________________ [[alternative HTML version deleted]]
2007 Jun 20
2
add line to data.frame
Dear R user, how can I update a data.frame adding new lines? I need to create a second data frame from a first one with only some of their entrys filtering the value of a specific column... How can I do this? thankyou very much in advance best regards Manuele PEsenti -- Manuele Pesenti manuele a inventati.org amicogodzilla a jabber.linux.it http://mpesenti.polito.it