similar to: SAS to R: I would like to replicate a statistical analysis performed in SAS in R.

Displaying 20 results from an estimated 6000 matches similar to: "SAS to R: I would like to replicate a statistical analysis performed in SAS in R."

2011 Nov 29
1
Help in determining the formula for a mixed model analysis
Dear R and statistics experts: I have data of a behavioral experiment with the aim to investigate the effect of a memory task on motor learning. Question: I would appreciate help in figuring out a possible formula to determine whether motor learning across sessions differs between 2 groups. Design: - 2 Groups: group A: n=10 subjects, group B: n=10 - 6 motor learning sessions: baseline;
2010 Dec 06
5
How can I refer to actual (n) and previous (n-1) elements in a vector?
Hello, How can I apply a function on a vector that refers to actual (n) and previous elements in the vector (e.g. n-1)? For example: I would like to calculate the sum of (n-1) + n for each element of a vector and get a vector as a result. Besides others I tried this: v<-c(3,6,8,1,1,3,9,5,6,3) for (i in 1:NROW(v)){a[i]<-a[i-1]+a[i]} I would like to get this result:
2009 Apr 11
2
who happenly read these two paper Mohsen Pourahmadi (biometrika1999, 2000)
http://biomet.oxfordjournals.org/cgi/reprint/86/3/677 biometrika1999 http://biomet.oxfordjournals.org/cgi/reprint/94/4/1006 biometrika2000 Hi All: I just want to try some luck. I am currenly working on my project,one part of my project is to reanalysis the kenward cattle data by using the method in Mohsen's paper,but I found I really can get the same or close output as he did,so,any
2010 Feb 22
3
gsub patterns from vector elements w/out loop?
Dear list, I have two vectors: x <- c("one","two") y <- paste(rep(x,2),"blah") I want to replace all occurrences of each element of x in y with something else, so that y looks like this: y [1] "something else blah" "something else blah" "something else blah" [4] "something else blah" I can do this using a loop: for (
2010 Nov 29
1
cross tabulate variables by subject id
Dear list, I have data like this: dat1 <- data.frame(subject=rep(1:10,2), cond1=rep(c("A","B"),each=5), cond2=rep(c("C","D"),each=10), choice=sample(0:1,10,replace=TRUE)) I would like to compare subjects' "choice" for (cond1=="A" & cond2=="C") vs
2016 Jan 12
2
Welcoming a new SIG member :)
Virt SIG folks, please join me in welcoming our latest SIG member, Marianne Lombard (username: jehane). She's been a Fedora contributor for quite sometime already, and will now be helping to ensure I'm not being a bottleneck RE: docker on CentOS virt :) Welcome aboard, Marianne. -- Lokesh Freenode: lsm5 GPG: 0xC7C3A0DD -------------- next part -------------- A non-text attachment was
2010 Aug 24
1
Index list by other list (w/ logical elements)?
I have two lists of the same shape, like this: x <- list() x[[1]] <- c("one","two") x[[2]] <- c("three","four","five") y <- list() y[[1]] <- c(TRUE,FALSE) y[[2]] <- c(FALSE,TRUE,TRUE) I would like to index x "by" y, that is, the result in this case should be: z [[1]] [1] "one" [[2]] [1] "four"
2011 Feb 02
1
pass nrow(x) to dots in function(x){plot(x,...)}
Dear Rers, I have a function to barplot() a matrix, eg myfun <- function(x, ...) { barplot(x , ... )} (The real function is more complicated, it does things to the matrix first.) So I can do: m1 <- matrix(1:20,4) myfun(m1) myfun(m1, main="My title") I'd like to be able to add the number of rows of the matrix passed to the function to the "..." argument, eg
2008 Oct 05
1
barchart for aggregated (sum) data in lattice?
Hi list, I have data in a dataframe t1, with a column for different amounts spent, a column what it was spent on, and a column with dates, from which I create a new column with months. Example: amount <- rep(c(10,20,30),3) what <- rep(c("food","books","cycling"),3) when <- c(rep("2008-09-05",5),rep("2008-10-07",4)) t1 <-
2009 Sep 02
1
get function to return object "name"?
Dear list, I've written a function that plots subjects. Something like: myplot <- function(subject) { plot(subject) } Subjects are vectors, e.g. ... s1 <- c(200,200,190,180) ... and plotting them works fine, e.g. ... myplot(s1) Now I want to have "s1" etc appear in the plot title, but I don't know how to refer to this generically (the object "name"? I tried
2009 Dec 12
1
read.csv to read output of system()?
Dear list, I have a file that is comma delimited but contains some erroneous non-delimiter commas. I would like to replace these commas with semicolons and then read the correct file into R as a data frame. I want to do this from within R, without changing the original data file. My current idea of how to do this would be to use system("sed ...") and feed the result to read.csv(), but
2009 Oct 03
2
add lines() to 1st plot in layout() after calling 2nd plot()?
Dear R users, I create a graphic with two plots side by side using layout(), like this: layout(matrix(c(1,2),1)) plot(1:10,main="left plot") lines(c(3:7,7:3),col="red") plot(10:1,main="right plot") The lines() obivously get added to the "left plot" plot. Now, I'm trying to write a function that builds up a plot bit by bit to then include it in a
2008 Aug 26
2
accented characters in filenames mangled when rsyncing to a samba share
Hi folks, I am having a problem rsyncing files with accents in the names. I've seen similar problems reported a few times before in the archives but they didn't seem to be referring to exactly the same problem as what I have, and I'm not good enough at Linux to solve my problem by generalising from the information there: sorry. Anyway, my specific details are this. I am running rsync
2009 Oct 09
3
"Use R" -- term and logo copyright?
Dear list, I would like to start some R workshops at King's College London, and to do so, I would like to use the "Use R!" logo at http://www.agrocampus-ouest.fr/math/useR-2009//useR%21%202008_fichiers/useR-middle.png Since it seems to be difficult to get a shell account at KCL, I also went ahead and registered use-r.org.uk and am starting to put together a website at
2009 Jun 10
1
ggplot, qplot: alpha channel for colors corresponding to factor
Hi, I have a qplot like the one in the minimal example below, except I also have faceting like this: qplot(jitter(Goodall),jitter(Better.adapt),colour=Second.adapt,facets=~Pol,data=d1) and with the real data I get quite a lot of overplotting, so I would like to add an alpha channel. In addition, I would like to be able to control which colors are used for each value of Second.adapt (which
2010 Mar 27
1
R runs in a usual way, but simulations are not performed
Dear addresses, I need perform a batch of 10 000 simulations for each of 4 options considered. (The idea is to obtain the parameter estimates in a heteroskedastic linear regression model - with additive or mixed heteroskedasticity - via the Kenward-Roger small-sample adjusted covariance matrix of disturbances). For this purpose I wrote an R program which would capture all possible options (true
2009 Oct 02
3
plot scale
Hi, Is there a way to set the scale of a plot (i.e. number of axis units per centimeter) when you output it to postscript? If not, how am I supposed to plot graphs with different axis limits to the same scale? They just get resized to fit the paper so that graphs which show a smaller number of axis units end up with a larger scale. Cheers, Ben -- Dr. Ben Kenward Department of Psychology,
2008 Mar 04
1
simplifying a GLM-removing categorical variables
Hi, Thanks for reading this mesage! I have created a GLM (using the quasipoisson family) and am now trying to simplify it. One of my explanatory variables is categorical (vegetation type, with 6 different levels). In the model, 5 of the 6 levels are significant and one is not. How should I simplify my model? Do I need to take out the whole category (i.e. all of vegetation type), or just the
2010 Nov 30
1
researcher with highly skewed data set seeks help finding practical GLMM tutorial
Hi! I am a psychologist who suspects that the only sensible way to analyse a particular data set is to use generalised linear mixed models. I am hoping that someone might be able to point me in the right direction to find some very practical hands on documentation that might be able to talk me through actually doing such an analysis? So far in my searches the most useful document I have turned
2016 May 13
3
[RFC] Disabling DAG combines in /O0
Hi all, The DAGCombiner pass actually runs even if the optimize level is set to None. This can result in incorrect debug information or unexpected stepping/debugging experience. Not to mention that having good stepping/debugging experience is the major reason to compile at /O0. I recently suggested a patch to disable one specific DAG combine at /O0 that broke stepping on a particular case