Re: [R] R, RStudio, and a server for my iPad.

2014-04-12 Thread John Sorkin
a separate keyboard. It does not work with the virtual keyboard. The same is true with android tablets. Frans 2014-04-12 3:38 GMT+02:00 Roy Mendelssohn roy.mendelss...@noaa.gov: GIYF - Google VPN and iPad. -Roy On Apr 11, 2014, at 6:34 PM, John Sorkin jsor...@grecc.umaryland.edu

[R] R, RStudio, and a server for my iPad.

2014-04-11 Thread John Sorkin
I bemoan the fact that I can not run R or Rstudio on my iPad. A possible work around would be to set up a server (probably under Linux), and get the server to present a web page that to would allow me to run R on the server. I have searched the web for a clear, simple answer on how to do this

Re: [R] R, RStudio, and a server for my iPad.

2014-04-11 Thread John Sorkin
, John Sorkin jsor...@grecc.umaryland.edu wrote: I bemoan the fact that I can not run R or Rstudio on my iPad. I feel like this is something I'm not missing much, at all, but different strokes ... :-) A possible work around would be to set up a server (probably under Linux), and get the server

Re: [R] R, RStudio, and a server for my iPad.

2014-04-11 Thread John Sorkin
be a very easy way for you to see if taking one of the 2 avenues of setting up RStudio Server yourself would be worth the pain. HTH, -steve On Fri, Apr 11, 2014 at 2:34 PM, John Sorkin jsor...@grecc.umaryland.edu wrote: Steve, Thank you for your help. I have seen the material you have sent me

Re: [R] R, RStudio, and a server for my iPad.

2014-04-11 Thread John Sorkin
support quite enough html to get a fully functional Rstudio interface - almost everything works but you can't type anything :/ It would be possible to fix this, but fundamentally we don't believe that the Rstudio interface is the right choice for an ipad. Hadley On Fri, Apr 11, 2014 at 5:00 PM, John

Re: [R] R, RStudio, and a server for my iPad.

2014-04-11 Thread John Sorkin
, John Sorkin jsor...@grecc.umaryland.edu wrote: Hadley, First, thank you for replying to my question. Are you saying that the iPad browser will not allow me to type the character string :/ into a browser window? I am not sure exactly what you are trying to tell me. Please forgive my lack

Re: [R] R, RStudio, and a server for my iPad.

2014-04-11 Thread John Sorkin
call phone number above prior to faxing) David Winsemius dwinsem...@comcast.net 4/11/2014 9:06 PM On Apr 11, 2014, at 2:00 PM, John Sorkin wrote: I bemoan the fact that I can not run R or Rstudio on my iPad. A possible work around would be to set up a server (probably under Linux), and get

[R] Output including listing and graphs.

2014-02-08 Thread John Sorkin
R 3.0.0 or RStudio 0.98.490 Windows 7 (or Linux Mint) Is there any easy way to run an R program and have it produce text output in a file along with any graphs that the code produces? I know I can run the program and paste the graphs into the output however doing this is rather time

[R] Use function parameter as an unevaluated text string

2014-01-29 Thread John Sorkin
I would like to take a parameter passed to a function as a text string. I don't want the parameter evaluated, I want it uses exactly as passed, doit - function(data) { cat(This function is using values from the data frame ,data,\n) } mydata - data.frame(x = c(1,2,3), y=c(3,2,1)) doit(mydata)

[R] Problems downloading and installing nlme under Linux Mint 15

2014-01-21 Thread John Sorkin
I am running R under Linux Mint 15 and trying to download and install nlme. During the download I get an error message: Warning message: In install.packages(nlme) : installation of package ‘nlme’ had non-zero exit status When I try to load the package, I get an error message library(nlme)

Re: [R] Problems downloading and installing nlme under Linux Mint 15

2014-01-21 Thread John Sorkin
On Tue, 21 Jan 2014, John Sorkin wrote: I am running R under Linux Mint 15 and trying to download and install nlme. During the download I get an error message: Warning message: In install.packages(nlme) : installation of package ‘nlme’ had non-zero exit status When I try to load

Re: [R] how to replace NA values

2014-01-20 Thread John Sorkin
I hope the code below will show you how to co what you want to do. John Elder1 - data.frame( ID=c(ID1,ID2,ID3,ID6,ID8), age=c(38,35,,NA,NA)) Elder1 # The age variable is a factor, we want it to be numeric class(Elder1[,'age']) # Convert factor to a numeric value.

[R] Setting up an R server.

2014-01-20 Thread John Sorkin
Can someone provide suggestions about how to best set up an R server? I would like to be able to run R on my IPad. It sounds like the only way to do this is to have the IPad access an R server. The server will be at my home, connected to the internet via my cable company (comcast). I don't yet

[R] Fortune?

2013-12-31 Thread John Sorkin
Fortune? Where did lost variables go, with example Sent from my iPhone On Dec 31, 2013, at 7:36 PM, David Parkhurst parkh...@imap.iu.edu parkh...@imap.iu.edu wrote: Thank you. I've tried what you're suggesting, at an earlier suggestion from another respondent, and I don't find my

Re: [R] error in ca.jo

2013-12-25 Thread John Sorkin
Please, everyone civility is a positive virtue J Sent from my iPhone On Dec 25, 2013, at 7:11 PM, Jeff Newmiller jdnew...@dcn.davis.ca.us jdnew...@dcn.davis.ca.us wrote: Out of context, I would agree with you. However, I stand behind it as regards the original question... the OP should

Re: [R] Should there be an R-beginners list?

2013-11-24 Thread John Sorkin
Mailing list vs. stack overflow, I have no opinion, but beginners list NO! I was a beginner at one time and the mailing list worked just fine. I see no reason to divide our efforts across two lists (be they mailing lists or stack overflow). John John David Sorkin M.D., Ph.D. Professor of

[R] Repeated measures ANOVA for unbalanc

2013-11-21 Thread John Sorkin
R 3.0.1 Windows 7 Rstudio 0.97.551 Colleagues, The last time I thought about using lmer to run an unbalanced repeated measures ANOVA, I found that the package did not return p values or SEs. I believe this was because Professor Bates had important questions about the theory behind the

Re: [R] ordinal data with binary response

2013-10-24 Thread John Sorkin
Kishor, It sounds like you will need to use logistic regression. Although the following URL might help you better understand logistic regression, http://ww2.coastal.edu/kingw/statistics/R-tutorials/logistic.html it would probably be most helpful if you would see help from a local statistician.

Re: [R] Instructions for upgrading R on ubuntu

2013-09-15 Thread John Sorkin
Jeff, Andrew, When you come up with a solution to the upgrade problem, please send it to me. I have a similiar problem under Mint, which is an Unbuntu fork. Thank you, John John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of Maryland School of

Re: [R] coxph diagnostics

2013-08-15 Thread John Sorkin
Dr. Therneau, Thank you as always for first writing, and second continuing the Cox model in R (and earlier I believe in SAS). While your comments concerning non-proportional hazards is helpful, it does not fully address the question, What alternatives do I have if I assume proportional

Re: [R] Advice on use of R for Generalised Linear Modelling

2013-08-11 Thread John Sorkin
Alan, I can't answer your first question, but as far as the second question goes, have you examined RStudio? http://www.rstudio.com/ Rstudio is a free, nice, IDE (I think this stands for integrated development environment that facilitates working in R. I provides very very basic sytax help

Re: [R] Repeated measures Cox regression ??coxph??

2013-07-26 Thread John Sorkin
Marc, Thank you for your comments. The data has been previously collected, so the study is a non-concurrent prospective analysis, i.e. retrospective analysis. John John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of Maryland School of Medicine

[R] Repeated measures Cox regression ??coxph??

2013-07-25 Thread John Sorkin
Colleagues, Is there any R package that will allow one to perform a repeated measures Cox Proportional Hazards regression? I don't think coxph is set up to handle this type of problem, but I would be happy to know that I am not correct. I am doing a study of time to hip joint replacement. As

Re: [R] Repeated measures Cox regression ??coxph??

2013-07-25 Thread John Sorkin
...@me.com marc_schwa...@me.com wrote: On Jul 25, 2013, at 4:45 PM, David Winsemius dwinsem...@comcast.net wrote: On Jul 25, 2013, at 12:27 PM, Marc Schwartz wrote: On Jul 25, 2013, at 2:11 PM, John Sorkin jsor...@grecc.umaryland.edu wrote: Colleagues, Is there any R package

Re: [R] Generating random numbers satisfying specific regression equation

2013-05-25 Thread John Sorkin
(1) you need to examine the rnorm function, enter ?rnorm() (2) when you review the documentation produced by entering the command above, you will see that the rnorm function needs three parameter, the number of values to generate, the mean of the numbers to be generated, and the SD (standard

[R] RStudio and R version 3.0

2013-04-05 Thread John Sorkin
Windows 7 32 bit R 3.0 RStudio that previously worked with R versions prior to R3.0 Colleagues, I just downloaded R 3.0. When I try to launch RStudio (which was previously on my computer), I get a message, R Session has a fatal error. Any suggestions for getting RStudio up and running would

[R] Make a matrix from two lists

2013-03-29 Thread John Sorkin
I am trying to write a function that makes a matrix out of two lists. As you will see run running the function below, the result is NOT a matrix but rather a list. Can anyone tell me what I am doing wrong? Thanks, John test - function(one,two) { cat(List One=,one,\n) cat(List Two=,two,\n)

Re: [R] Make a matrix from two lists

2013-03-29 Thread John Sorkin
Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Please call phone number above prior to faxing) Ben Tupper btup...@bigelow.org 3/29/2013 1:49 PM Hi, On Mar 29, 2013, at 1:29 PM, John Sorkin wrote: I am trying to write a function that makes a matrix

[R] Cluster analysis in the setting of repeated measures

2013-03-10 Thread John Sorkin
Does R have any function for performing cluster analysis when each subject contributes more than one observation to the analysis, i.e. a repeated measures cluster analysis? I prefer an agglomerative clustering, but would certainly be happy with a K-mean or other clustering technique. To the

[R] Non linear programming: choose R that minimizes corr(y, x^R)

2013-02-05 Thread John Sorkin
I am looking for a package that will allow me to choose R (a real number) that minimizes the correlation of y and x^R, i.e. find R such that corr(y,x^R) is minimized. Any suggestions for packages I might look at would be helpful. Thanks, John John David Sorkin M.D., Ph.D. Chief,

Re: [R] Non linear programming: choose R that minimizes corr(y, x^R)

2013-02-05 Thread John Sorkin
(Please call phone number above prior to faxing) Bert Gunter gunter.ber...@gene.com 2/5/2013 4:16 PM If you really mean minimize and not maximize, I doubt that any such R exists. -- Bert On Tue, Feb 5, 2013 at 1:08 PM, John Sorkin jsor...@grecc.umaryland.edu wrote: I am looking for a package

Re: [R] Relative Risk in logistic regression

2013-02-03 Thread John Sorkin
Amin, It is incorrect to use the relative risk as a measure of association in a logistic regression. The measure of association in a logistic regression is the odds ratio. The odds ratio is an approximation of the relative risk. The approximation becomes progressively better as the disease

[R] How does this function print, why is n1 which equals 1 printed as 2?

2013-02-01 Thread John Sorkin
Windows 7, R 2.12.1 Colleagues, I am trying to understand the n.for.2means function. The code below is a copy of the function (renamed to n.for.2means.js). I have inserted a single line of code towards the bottom of the function which uses the cat function to print the value of n1. You will

Re: [R] Relative Risk in logistic regression

2013-01-30 Thread John Sorkin
I am not sure why one would want a relative risk from a logistic regression. The measure of association from a logistic regression is the odds ratio, not the relative risk. John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine

Re: [R] Relative Risk in logistic regression

2013-01-30 Thread John Sorkin
21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Please call phone number above prior to faxing) Kevin E. Thorpe kevin.tho...@utoronto.ca 1/30/2013 11:22 AM On 01/30/2013 11:17 AM, John Sorkin wrote: I am not sure why one would want a relative risk from a logistic regression. The measure

Re: [R] how to use ...

2013-01-20 Thread John Sorkin
Why are the help pages not right? The ... construct is a fundamental part of the language syntax. Information about this fundamental construct should be easily available! John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division

Re: [R] how to use ...

2013-01-17 Thread John Sorkin
Rolf Perhaps the philosophy of the help system needs to change . . . John Sent from my iPhone On Jan 17, 2013, at 7:11 PM, Rolf Turner rolf.tur...@xtra.co.nz rolf.tur...@xtra.co.nz wrote: The help facility is applicable to functions and data sets. It is not designed or intended to

[R] piece-wise linear regression nls function

2013-01-09 Thread John Sorkin
windows 7, R 2.12 I am trying to run a piecewise linear regression with a single knot, i.e. a regression composed of two straight lines where the two lines intersect at an x value given by the variable knot. I wish to estimate the slope of both lines, the value of knot, the x value where the

[R] Function to tabulate t-test (1) How can I get dependent variable name (2) How can I make data frame know to function

2013-01-07 Thread John Sorkin
Windows 7 R 2.12.1 I am trying to write a function (see sample code below) that will take the output of a t-test and produce results suitable for a table. I have two questions (1) You will note that the name of the outcome variable, which is value in the input is replaced by the string outcome

Re: [R] New Version of R?

2013-01-04 Thread John Sorkin
Erin, We recently received an email message saying version 3.0 was coming soon. As I remember it, there will be a number of important improvements, but no major changes in functionality. Version 2.xx will probably be fine for your class. John John David Sorkin M.D., Ph.D. Chief, Biostatistics

[R] lme: subject-specific slopes.

2012-12-04 Thread John Sorkin
I am running a random intercept random slope regression: fitRIRT - lme(echogen~time,random=~ 1+time|subject,data=repeatdata,na.action=na.omit) summary(fitRIRT) I would like to get the subject-specific slopes, i.e. the slope that the model computes for each subject. If I have 10-subjects I

Re: [R] lme: subject-specific slopes.

2012-12-04 Thread John Sorkin
Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Please call phone number above prior to faxing) Kenneth Frost kfr...@wisc.edu 12/4/2012 10:44 AM I think this might be close to what you want. ranef(fitRIRT) On 12/04/12, John Sorkin wrote: I am running

Re: [R] lme: subject-specific slopes.

2012-12-04 Thread John Sorkin
will hopefully correct me if I'm wrong. On 12/04/12, John Sorkin wrote: Ken, Thank you for your help. ranef(fitRIRT) does not give me what I expect. The subject-specific slopes, and subject-specific intercepts are not anywhere close to what I would expect them to be; the mean

[R] marginal structural modeling

2012-12-02 Thread John Sorkin
Does anyone know an R package that implements marginal structural modeling as described by Jamie Robins? A similar question was asked of the list approximately two-years ago and it does not appear that anyone responded. Thanks, John Sorkin John David Sorkin M.D., Ph.D. Chief, Biostatistics

Re: [R] Line numbers with errors and warnings?

2012-12-02 Thread John Sorkin
Gentleman, This thread has been of great interest. Perhaps I missed part of it, but do far I have not seen an example of code that has line numbers that demonstrates how one can (in some instances) recover the line number of an error. Can I impose upon the people who contributed to this thread to

[R] kmeans cluster analysis. How do I (1) determine probability of cluster membership (2) determine cluster membership for a new subject

2012-10-02 Thread John Sorkin
Window XP R 2.15 I am running a cluster analysis in which I ask for three clusters (see code below). The analysis nicely tells me what cluster each of the subjects in my input dataset belongs to. I would like two pieces of information (1) for every subject in my input data set, what is the

Re: [R] kmeans cluster analysis. How do I (1) determine probability of cluster membership (2) determine cluster membership for a new subject

2012-10-02 Thread John Sorkin
maitra.mbox.igno...@inbox.com 10/2/2012 1:59 PM John, On Tue, 2 Oct 2012 11:35:12 -0400 John Sorkin jsor...@grecc.umaryland.edu wrote: Window XP R 2.15 I am running a cluster analysis in which I ask for three clusters (see code below). The analysis nicely tells me what cluster each

Re: [R] kmeans cluster analysis. How do I (1) determine probability of cluster membership (2) determine cluster membership for a new subject

2012-10-02 Thread John Sorkin
14:32:12 -0400 John Sorkin jsor...@grecc.umaryland.edu wrote: Ranjan, Thank you for your help. What eludes me is how one computes the distance from each cluster for each subject. For my first subject, datascaled[1,], I have tried to use the following: v1 - sum(fit$centers[1,]*datascaled[1

[R] Trap an error from a function

2012-09-18 Thread John Sorkin
Window 7 R 2.15 I am writing a simulation which generates sample sized estimates from simulated data. When I run the function shown below, power.t.test(delta=14.02528,sd=1.945226,power=0.8,sig.level=0.05) I get an error message:

Re: [R] Trap an error from a function

2012-09-18 Thread John Sorkin
) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Please call phone number above prior to faxing) David Winsemius dwinsem...@comcast.net 9/18/2012 8:35 PM On Sep 18, 2012, at 5:10 PM, John Sorkin wrote: Window 7 R 2.15 I am writing a simulation which generates sample sized

Re: [R] test Breslow-Day for svytable??

2012-08-31 Thread John Sorkin
Suggstion: You need to send us more information, i.e. the code that genrated daty, or a listing of the daty structure, and a copy of the listing produced by epi.2by2 John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of

Re: [R] R-squared with Intercept set to 0 (zero) for linear regression in R is incorrect

2012-07-13 Thread John Sorkin
Pamela R squared with a non-zero, and with a zero intercept can be very different as the regression line that you get with and without a zero intercept can be very different. Have you plotted your data plot(k[,2],k[,1]) to see if a zero intercept is reasonable for your data? Have you drawn the

[R] lme random slope results the same as random slope and intercept model

2012-06-12 Thread John Sorkin
R 2.15.0 Windows XP Can someone help me understand why a random intercept model gives the same results as the random intercept and slope models? I am rather surprised by the results I am getting from lme. I am running three models (1) random intercept fitRI -

Re: [R] lme random slope results the same as random slope and intercept model

2012-06-12 Thread John Sorkin
-project.org [mailto:r-help-boun...@r-project.org] Namens John Sorkin Verzonden: dinsdag 12 juni 2012 16:52 Aan: r-help@r-project.org Onderwerp: [R] lme random slope results the same as random slope and intercept model R 2.15.0 Windows XP Can someone help me understand why a random intercept

[R] lme random intercept model vs. random intercept, random slope model yield difference in fixed effects but not difference in the anova.

2012-04-14 Thread John Sorkin
I am running two mixed effects regressions. One (fitRandomIntercept) has a random intercept, the second (fitRandomInterceptSlope) has a random intercept and a random slope. In the random slope regression, the fixed effect for time is not significant. In the random intercept random slope model,

Re: [R] identify with mfcol=c(1,2)

2012-04-05 Thread John Sorkin
say if I press escape or use the stop sign button (both stop the whole evaluation rather than just the identifying). On Tue, Apr 3, 2012 at 8:52 AM, John Sorkin jsor...@grecc.umaryland.edu wrote: I would like to have a figure with two graphs. This is easily accomplished using mfcol: oldpar

Re: [R] meaning of sigma from LM, is it the same as RMSE

2012-04-05 Thread John Sorkin
how rss and rdf are computed in the code as well. On Tue, Apr 3, 2012 at 8:56 AM, John Sorkin jsor...@grecc.umaryland.edu wrote: Is the sigma from a lm, i.e. fit1 - lm(y~x) summary(fit1) summary(fit1)$sigma the RMSE (root mean square error) Thanks, John John David Sorkin M.D., Ph.D

[R] meaning of sigma from LM, is it the same as RMSE

2012-04-04 Thread John Sorkin
Please forgive my re-sending this question. I did not see any replies from my prior post. My apologies if I missed something. Is the sigma from a lm, i.e. fit1 - lm(y~x) summary(fit1) summary(fit1)$sigma the RMSE (root mean square error) Thanks, John John David Sorkin M.D., Ph.D. Chief,

[R] identify with mfcol=c(1,2)

2012-04-04 Thread John Sorkin
Please forgive my re-sending this question. I did not see any replies from my prior post. My apologies if I missed something. I would like to have a figure with two graphs. This is easily accomplished using mfcol: oldpar - par(mfcol=c(1,2)) plot(x,y) plot(z,x) par(oldpar) I run into trouble

[R] identify with mfcol=c(1,2)

2012-04-03 Thread John Sorkin
I would like to have a figure with two graphs. This is easily accomplished using mfcol: oldpar - par(mfcol=c(1,2)) plot(x,y) plot(z,x) par(oldpar) I run into trouble if I try to use identify with the two plots. If, after identifying points on my first graph I hit the ESC key, or hitting stop

[R] meaning of sigma from LM, is it the same as RMSE

2012-04-03 Thread John Sorkin
Is the sigma from a lm, i.e. fit1 - lm(y~x) summary(fit1) summary(fit1)$sigma the RMSE (root mean square error) Thanks, John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North

[R] abline with xyplot does not work

2012-03-29 Thread John Sorkin
I am trying to plot the results of a random effects model where each subject is allowed to have his, or her, own intercept. I use xyplot to plot the data, lme to compute the regression and then try to put a summary regression line on the xyplot. As can be seen by the output pasted below, I am

[R] Connect lines in a dot plot on a subject-by-subject basis

2012-03-28 Thread John Sorkin
I am trying to plot where data points from a give subject are connected by a line. Each subject is represented by a single row of data. Each subject can have up to five observations. The first five columns of mydata give the time of observation, columns 6-10 give the values at each time point.

Re: [R] Connect lines in a dot plot on a subject-by-subject basis

2012-03-28 Thread John Sorkin
, type = b, col = black) -- Bert On Wed, Mar 28, 2012 at 2:39 PM, John Sorkin jsor...@grecc.umaryland.edu wrote: I am trying to plot where data points from a give subject are connected by a line. Each subject is represented by a single row of data. Each subject can have up to five observations

[R] Matrix algebra in R to compute coefficients of a linear regression.

2012-02-18 Thread John Sorkin
I am trying to use matrix algebra to get the beta coefficients from a simple bivariate linear regression, y=f(x). The coefficients should be computable using the following matrix algebra: t(X)Y / t(x)X I have pasted the code I wrote below. I clearly odes not work both because it returns a

Re: [R] transforming a data frame to matrix

2012-02-18 Thread John Sorkin
Adel, I don't fully understand your question. Please try to explain what you want to do again. In general to change a data frame to a matrix, all one needs to do is use the as.matrix function. # Create dataframe mydataframe1 - data.frame(x=1:3, y=10:12) mydataframe1 class(mydataframe1) #

Re: [R] Matrix algebra in R to compute coefficients of a linear regression.

2012-02-18 Thread John Sorkin
you're doing and be able to fix it so I wouldn't just use below immediately. xprimex - solve(t(data[,1:2]) %*% data[,1:2]) xprimey - t(data[,1:2]) %*% data[,3] betas - xprimex %*% xprimey print(betas) On Sat, Feb 18, 2012 at 8:36 AM, John Sorkin jsor...@grecc.umaryland.eduwrote: I am trying

Re: [R] Matrix algebra in R to compute coefficients of a linear regression.

2012-02-18 Thread John Sorkin
phone number above prior to faxing) Berend Hasselman b...@xs4all.nl 2/18/2012 9:05 AM On 18-02-2012, at 14:36, John Sorkin wrote: I am trying to use matrix algebra to get the beta coefficients from a simple bivariate linear regression, y=f(x). The coefficients should be computable using

[R] x-axis label for boxplot

2012-02-08 Thread John Sorkin
I am trying to produce three boxplots and label the x axis values: xvalues, yvalues, zvalues. My code is below. The labels are not below the three boxplots. If you could show me how to get the labels below the columns I would be appreciative. John jdata-data.frame(x =

Re: [R] x-axis label for boxplot

2012-02-08 Thread John Sorkin
phone number above prior to faxing) Robert Baer rb...@atsu.edu 2/8/2012 8:07 PM xlab = needs to be names = see ?boxplot boxplot(jdata[,x],jdata[,y],jdata[,z],names=c(x values,yvalues,zvalues)) -Original Message- From: John Sorkin Sent: Wednesday, February 08, 2012 6:48 PM Cc: r-help

Re: [R] need help

2012-01-07 Thread John Sorkin
Peter, I have sympathy for Dong. It would be helpful if the message at the bottom of the Email were modified to be more directive, e.g. To modify your subscription (e.g. hold mail delivery during a vacation, unsubscribe, etc.) go to https://stat.ethz.ch/mailman/listinfo/r-help To make matters

[R] help()

2012-01-07 Thread John Sorkin
Confidentiality Statement: This email message, including any attachments, is for th...{{dropped:6}} __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Turning my subscription to mailing list back on

2011-12-24 Thread John Sorkin
Please respond directly to me as I am not receiving Email from the R-Help mailing list: jsor...@grecc.umaryland.edu Before I left for vacation, I turned delivery of mail from R-Help off. I cannot find the proper web-page to use to turn mail back on. Can someone send me the URL, or perhaps an

Re: [R] ANOVA and LSD TEST - contrasting results

2011-11-19 Thread John Sorkin
Roberto, Please be more specific. What are the differences between ANOVA and LSD that give you concern? John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Greene Street

[R] Contrasts with an interaction

2011-10-28 Thread John Sorkin
Windows XP R 2.12.1 contrast package. I am trying to understand how to create contrasts for a model that contatains an interaction. I can get contrasts to work for a model without interaction, but not after adding the interaction. Please see code below. The last two contrast statements show

Re: [R] sorting data

2011-10-28 Thread John Sorkin
I am not sure (I can't test at the moment) but will this work? sort(a[,4]) John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD

[R] Contrasts with an interaction. How does one specify the dummy variables for the interaction

2011-10-28 Thread John Sorkin
Forgive my resending this post. To data I have received only one response (thank you Bert Gunter), and I still do not have an answer to my question. Respectfully, John Windows XP R 2.12.1 contrast package. I am trying to understand how to create contrasts for a model that contatains an

Re: [R] Contrasts with an interaction. How does one specify the dummy variables for the interaction

2011-10-28 Thread John Sorkin
(column) contrasts(row)-contr.treatment(levels(row)) contrasts(column)-contr.treatment(levels(column)) # Works for Terps fit.terp-glm(counts ~ row + column + row*column, family=poisson(link=log)) summary(fit.terp) HTH, Daniel Malter University of Maryland, College Park John Sorkin wrote

[R] Using functions written in Fortran in R

2011-10-26 Thread John Sorkin
Windows XP R 2.12 I am trying to understand how I can take a subroutine (i.e. function) I have written in Fortran, and call the function in R. I need to know (1) where I should store the Fortran subroutine (2) how to prepare the function for use in R, and (3) how to load and call the

Re: [R] suggestion for proportions

2011-09-07 Thread John Sorkin
From you description, you should not used a paired Student's t-test. One uses a paired test when pairs of observations come from the same experimental unit (and thus are correlated). You describe a study where each experimental unit is tested once and where there are two independent groups of

Re: [R] suggestion for proportions

2011-09-07 Thread John Sorkin
Would the following strategy work? numtests - 20 # Create a data frame: test1 results from trial 1 # test2 results from trial 2 # agree indicagtor if trial1= trial2 (value =1) or # trial1trial2 (value =0) data -

Re: [R] suggestion for proportions

2011-09-07 Thread John Sorkin
Let my try again, but this time with corrected R code: would the following strategy work: numtests - 2000 # Create a data frame: test1 results from trial 1 # test2 results from trial 2 # agree indicagtor if trial1= trial2 (value =1) or #

Re: [R] suggestion for proportions

2011-09-07 Thread John Sorkin
Correction. It won't work. Please ignore. John Sorkin 9/7/2011 10:41:46 PM Let my try again, but this time with corrected R code: would the following strategy work: numtests - 2000 # Create a data frame: test1 results from trial 1 # test2 results from trial 2

Re: [R] Question about BIC of two different regression models? how should we compare two regression models?

2011-09-02 Thread John Sorkin
I believe when using BIC one needs to compare nested models, i.e. , when comparing models A and B one must make sure that model A contains all the parameters of model B and additionally A contains one or more extra parameter beyond those in B. Further the comparison of BICs requires that models

Re: [R] limits on liniar model

2011-08-03 Thread John Sorkin
It is hard to prove a negative, but to the best of my knowledge lm will not do what you want. This does not mean there is not a function that will perform your analyses; the sort of thing you want to do is often accomplished using non-linear methods. John ראובן אברמוביץgantk...@walla.com

[R] Is a string all blanks?

2011-08-02 Thread John Sorkin
windows 7 R 2.12.1 Is there any easy way to determine if a sting contains nothing but blanks? I need to check a series of strings of various length. OneBlank - TwoBlanks - ThreeBlanks - NoBlanks - NoBlanks What I want would be a function such as ALLBLANKS that would return the

Re: [R] help with algorithm

2011-07-31 Thread John Sorkin
I can help with a few questions: Q) How to get means for by groups and subset a files based on those (subset highest and lowest groups)? (I can do this in multiple steps* but wonder what the best, R way is to do this.) A) aggregate Q) How to create a matrix of plots? (Take 4 separate plots and

Re: [R] Save generic plot to file (before rendering to device)

2011-07-11 Thread John Sorkin
After the plot is created, you can save the graph as a pdf document (file menu, save as). You can then send the pdf file to your colleagues. John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology Baltimore VA

Re: [R] Logistic Regression

2011-06-10 Thread John Sorkin
First a word of caution: Forward, backward, and stepwise regression analyses are not well received among statisticians. There are many reasons for this. Some of the reasons include: (1) The p value computed at each step is computed ignoring all the previous steps. This can lead to incorrect

[R] Create 2x2 table from summary data and run chi square test.

2011-04-22 Thread John Sorkin
R 2.12 windows 7 I am summary data that I would like to make into a 2x2 table representing counts positive vs. negative counts: 28/289 20/276 My table should look something like the following: group1 group2 Positive28 20 Negative 289 276 How can a (1) create the 2x2

[R] Problem having tick marks aligned when plotting three graphs on top of one another.

2011-04-22 Thread John Sorkin
R 2.10 Windows 7 I am trying to plot three graphs on top of each other. I need to have the axises perfectly aligned. For some reason the ticks on the y axes are slightly off so they do not perfectly align. Can someone tell me how I can get the to overlay each other perfectly? I thought the

[R] Specifying the color of points and the plot symbol to be used on a graph

2011-04-10 Thread John Sorkin
R 2.12.2 Windows 7 I would like to know how to specify the color used in plotting points on a scatter plot, generated using plot(x,y) and how I can specify the particular symbol used. I would like, for example, to plot some points as blue circles and other points a red squares. If someone will

Re: [R] Specifying the color of points and the plot symbol to be used on a graph

2011-04-10 Thread John Sorkin
Of John Sorkin Sent: Monday, 11 April 2011 2:29 p.m. To: r-help@r-project.org Subject: [R] Specifying the color of points and the plot symbol to be used on a graph R 2.12.2 Windows 7 I would like to know how to specify the color used in plotting points on a scatter plot, generated using plot

[R] Fatal error: unable to restore saved dat in .RData

2011-03-29 Thread John Sorkin
Windows 7 R 2.12.2 When I launch R, I get the following error message: Fatal error: unable to restore saved dat in .RData after which R closes. What does the error message mean, and what can I do to get R to work? I tried removing the R program, re-downloaded the program, and re-installed

[R] Generating repeated measures data

2011-03-18 Thread John Sorkin
How would one generate data to be used in a simulation of a repeated measures ANOVA given a known (1) within-person correlation with known (2) mean and SD of data obtained at each of three times of observation? Thanks, John John Sorkin Chief Biostatistics and Informatics Univ. of Maryland School

Re: [R] consulta

2011-03-08 Thread John Sorkin
Yeleska, Has leyido los papeles de ayuda por rbind? Si no, abri R y entre ?rbind. Subset es mas deficil. Tiene que usar subscriptos. Por ejemplo, se tienes una matrix o data frame se llama datos, para ver la primera linea de datos entre datos[1,], par ver el segundo linea, datos[2,]. Se hay una

[R] Components of variance with lme

2011-03-01 Thread John Sorkin
R 2.10 Windows Vista Is it possible to run a variance-components analysis using lme? I looked at Pinheiro and Bates' book and don't see code that will perform these analyses. If the analyses can not be done using lme, what package might I try? Thanks, John John David Sorkin M.D., Ph.D. Chief,

[R] lme error: Error in getGroups.data.frame(dataMix, groups)

2011-02-28 Thread John Sorkin
R 2.10.0 Windows XP I am trying to run lme. I receive the following error message: My lme code is: fitRandom - lme(values ~ factor(subject), data=withindata) Below I have printed the console output, and at the bottom of this message, I have printed my code. I hope someone can tell my what I

[R] lme error message: Error in getGroups.data.frame(dataMix, groups) :

2011-02-28 Thread John Sorkin
Windows XP R 2.10 I am trying to run lme and get the following error: fitRandom - lme(values ~ subject, + data=withindata) Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups my data follows, below which is a copy of all my code print(withindata) subject

Re: [R] lme error: Error in getGroups.data.frame(dataMix, groups)

2011-02-28 Thread John Sorkin
(Please call phone number above prior to faxing) Dennis Murphy djmu...@gmail.com 2/28/2011 4:08 PM Hi: On Mon, Feb 28, 2011 at 8:42 AM, John Sorkin jsor...@grecc.umaryland.eduwrote: R 2.10.0 Windows XP I am trying to run lme. I receive the following error message: My lme code is: fitRandom

<    1   2   3   4   >