[R] simplifying output of mapply

2017-02-08 Thread jeremy adler
t(p,aes(v2))+geom_density(aes(x=v2,fill=v1))+geom_histogram(aes(y=..density..),alpha=.5)+ theme(legend.position="none") g<-g+xlab(x) return(g) } m<-mapply(FUN=plt,x=c("spot_001"),y=c("Cell.Median.CD3")) So I just want the graphs (g) to be stor

[R] Integration using nlsLM ?

2015-06-03 Thread Jeremy Clark
Dear All - I'm trying to integrate the following function via nlsLM - and I think the problem is something to do with passing the correct arguments (error is given below) - any help gratefully appreciated - many thanks. library(minpack.lm) dOM - function(x, mu = 0, sigma = 1, log = FALSE) {

Re: [R] Graphs for scientific publication ?

2015-06-03 Thread Jeremy Clark
The coding I've settled on to save file without clipping is: library(gridExtra) gt - ggplot_gtable(ggplot_build(q3)) gt$layout$clip[gt$layout$name==panel] - off gt4 - arrangeGrob(gt) ggsave - ggplot2::ggsave; body(ggsave) - body(ggplot2::ggsave)[-2] ## from Baptiste ggsave(gt.pdf, plot = gt4,

Re: [R] Graphs for scientific publication ?

2015-05-04 Thread Jeremy Clark
including IOS 8.2, OS X 10.10, Xcode 6.2. I previously, and fairly recently, installed X11 (and Xquartz), and also updated R and R Cairo, but none of this has affected the above behaviour. Any advice gratefully received. Yours sincerely, Jeremy Clark library(ggplot2) library(grid) library(Cairo

[R] Graphs for scientific publication ?

2015-04-30 Thread Jeremy Clark
Dear All, First of all, many thanks to all R contributors for a fantastic program, and especially to Hadley Wickham for creating ggplot2. The following is intended to be a warning that, if the apparently superficial problems described are not sorted out, R could well find itself being superceded.

[R] R match - could be improved ?

2015-03-15 Thread Jeremy Clark
​Dear All, The following gives a very unpleasant experience with apparently random NAs - probably it's my bad formatting of the coding - but the effect is unexpected and if undetected can lead to considerable problems: myvector1 = NULL myvector3 = NULL myvector4 = NULL myvector5 = NULL

[R] Difference betweeen cor.test() and formula everyone says to use

2014-10-16 Thread Jeremy Miles
/sqrt(10 - 3) z - r.z / se (1 - pnorm(z))*2 [1] 0.04237039 My p-value is different. The help file for cor.test doesn't (seem to) have any reference to this, and I can see in the source code that it is doing something different. I'm just not sure what. Thanks, Jeremy

[R] mice - undefined columns selected

2014-09-11 Thread Jeremy Miles
selected I hope I'm doing something foolish, thanks, Jeremy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] metafor package: changing decimal in forest plot to midline decimal

2014-07-07 Thread Jeremy Miles
I've found that if you want really fine control over an issue like this in a chart, the easiest thing to do is to export it as PDF, and then directly edit the chart in Illustrator (not free) or Inkscape (free). On 7 July 2014 10:21, Viechtbauer Wolfgang (STAT)

Re: [R] R for Android

2014-05-08 Thread Jeremy Miles
It exists: https://play.google.com/store/apps/details?id=com.appsopensource.R No graphics. Jeremy On 8 May 2014 05:44, Kevin E. Thorpe kevin.tho...@utoronto.ca wrote: This is a question asked purely out of idle curiosity (and may also be in wrong list). Are there plans for porting R

Re: [R] Lavaan Model Specification

2014-04-30 Thread Jeremy Miles
~~ congressmenPerceptConstiuentAttitudes rollCallBehav ~~ congressmanAttitudes And your model runs, with 0 df. Your latent variable does nothing, becuase you only only have one variable which relates to it. Jeremy P.S. There's a lavaan group on google groups. On 30 April 2014 08:02, Patzelt, Edward patz

Re: [R] lavaan fit indices Chronbach's alphas

2014-03-26 Thread Jeremy Miles
. Do you mean composite reliability? That's not automatic either, but it can be programmed. Jeremy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Passing vectors through a dataframe

2014-02-07 Thread Jeremy Clark
can I select the correct vector from the list (ie.F4287) using an object extracted from the dataframe (eg. maxr or maxr2) ?? On Thu, Feb 6, 2014 at 6:20 PM, Duncan Murdoch murdoch.dun...@gmail.comwrote: On 06/02/2014 10:00 AM, Jeremy Clark wrote: Dear All, I would like to be able

[R] Passing vectors through a dataframe

2014-02-06 Thread Jeremy Clark
Dear All, I would like to be able to associate a list of vectors (one vector of which is to be called later) with some other character and numeric data. I've tried two methods: 1) I can put the vector names in quotes into the dataframe, and then extract the vector name - but this is just a

Re: [R] Functions in formulae ??

2013-11-26 Thread Jeremy Clark
) On Thu, Nov 21, 2013 at 11:57 AM, Jeremy Clark jeremyclark...@gmail.com wrote: Dear All, In the following simple case I can't seem to get an improved fit, despite trying all of the control possibilities. As there seem to be no examples anywhere which show use of functions such as dnorm within

Re: [R] Functions in formulae ??

2013-11-26 Thread Jeremy Clark
) ## plot fitted values lines(gg, fitted(modLM4), col = 2, lwd = 2) On Thu, Nov 21, 2013 at 11:57 AM, Jeremy Clark jeremyclark...@gmail.com wrote: Dear All, In the following simple case I can't seem to get an improved fit, despite trying all of the control possibilities. As there seem

[R] Functions in formulae ??

2013-11-21 Thread Jeremy Clark
Dear All, In the following simple case I can't seem to get an improved fit, despite trying all of the control possibilities. As there seem to be no examples anywhere which show use of functions such as dnorm within a formula, and as I am not confident at all that my formula is correctly

[R] Replacing strings to numbers

2013-07-02 Thread Jeremy Ng
are not necessarily AA,AT, or TT. Any ideas? Thanks! Jeremy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

[R] Loading an .RData file and assigning the loaded objects within a loop

2013-06-01 Thread Jeremy Ng
workspace object name. Is there anyway for each individually read in Rdata object to be assigned a new name? Thanks! JEremy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Multidimensional interpolation

2013-02-25 Thread Jeremy Beaulieu
looked into several packages and none seem to interpolate across more than 3-dimensions. All the best, Jeremy Beaulieu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Converting code to R Question

2013-02-25 Thread Jeremy Miles
=TRUE) Jeremy On 25 February 2013 17:02, Craig J cjohn...@gmail.com wrote: I'm learning R and am converting some code from SPSS into R. My background is in SAS/SPSS so the vectorization is new to me and I'm trying to learn how to NOT use loops...or use them sparingly. I'm wondering what

Re: [R] MIMIC latent variable with PLS Path Modelling with R ?

2013-02-16 Thread Jeremy Miles
By MIMIC do you mean multiple indicator/multiple cause? Something like this: http://www.jeremymiles.co.uk/misc/fun/img059.gif If so, you can use sem, Lavaan, or openMx. Jeremy On 13 February 2013 05:11, Hervé Guyon herve.gu...@yahoo.fr wrote: I want estimate MIMIC latent variable with R

Re: [R] Interpret R-squared and cor in R

2013-02-15 Thread Jeremy Miles
that do this much better than I could in an email. But you probably have a favorite of your own. Jeremy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] Rcmdr, RODBC and XLConnect conflict cause R to crash

2013-02-14 Thread Jeremy MAZET
Dear all, Since I upgraded R to the version 2.15.2, I have a strange problem which implies XLConnect, RODBC and Rcmdr packages. - If the three packages are loaded in the same R session, the use of RodbcConnect functions cause R to crash. - This crash occur only if Rcmdr is loaded. - If only

[R] Dot plot of character and numeric matrix

2013-01-23 Thread Ng Wee Kiat Jeremy
chart function, I get the error message 'x' must be a numeric vector or matrix, which I can understand it to be a result of the fact that I have characters AA, AG etc as my x-values. Any idea how I can go about doing this? Thanks in advanced! Jeremy [[alternative HTML version deleted

Re: [R] Question about Linear Regression

2012-12-28 Thread Jeremy Miles
You can run that as it is. The term to search for on Google is 'dummy coding'. Jeremy On 28 December 2012 07:45, Lorenzo Isella lorenzo.ise...@gmail.com wrote: where x3 is a dichotomous variable assuming only 0 and 1 values (x1 and x2 are continuous variables). Is there any particular

Re: [R] Non-linear regression analysis in R

2012-12-19 Thread Jeremy Miles
Could you provide the code that you're running, so we can see what you're trying to do? Even better would be a repeatable example. Jeremy On 19 December 2012 09:42, Yann Labou yann.la...@outlook.com wrote: Hey all, I'm trying to fit a non-linear model y ~ a * constant ^ b * x ^ c

[R] Beta-coefficients for ZINB model

2012-12-14 Thread Jeremy Goss
Dear users, Does anyone have any idea how to generate standardised beta coefficients for a ZINB model in R to compare which explanatory variables are having the greatest impact on the dependent variable? Thanks, Jeremy [[alternative HTML version deleted

[R] Marginal effects of ZINB models

2012-12-10 Thread Jeremy Goss
code to compute overall marginal effects of each variable? My model is specified as follows: ZINB - zeroinfl(Tot.Anglers ~ Location + Season + Daytype + Holiday.not + CPUE + ShoreType + Access + Source.pop + WindSpeed + offset(beat_length), dist=negbin, data=anglers) Many thanks, Jeremy

[R] Help with manipulation of matrix object

2012-12-06 Thread Jeremy Ng
same dimensions, except that instead of a matrix reporting the values I now have a matrix of reporting the probabilities. The median and sd is calculated for each row. Any help/ thoughts on this will be greatly appreciated! Jeremy [[alternative HTML version deleted

Re: [R] Help for a function

2012-12-04 Thread Jeremy Miles
What are you expecting? What do you get? What is the problem? J On 4 December 2012 06:01, anoumou teko_maur...@yahoo.fr wrote: Hello all, I need a help. I am modeling a disease and a create a R function like that: Lambda-function (x,date1,r,h,a){ ndate1 - as.Date(date1, %d/%m/%Y) t1

Re: [R] Replacing string in matrix with zero

2012-11-14 Thread Jeremy Miles
You can use ifelse() #Create data for example x - matrix(data=c(Inf, 2, 3, 4, Inf, 6, 7, 8, Inf), nrow=3) #Turn Inf into zero. x - ifelse(x == Inf, 0, x) Jeremy On 14 November 2012 14:13, Nick Duncan nickd...@gmail.com wrote: Dear All, I have a matrix in which the diagonal has

Re: [R] R and SPSS

2012-11-06 Thread Jeremy Miles
- so check that the same variables have been removed. Jeremy On 6 November 2012 13:39, Hui Du hui...@dataventures.com wrote: Hi group: I have a data set, which has severe colinearity problem. While running linear regression in R and SPSS, I got different models. I am wondering if somebody

[R] Searching up a list of values

2012-10-27 Thread Jeremy Ng
1.06653 1.43876 2.15272 0.69042 0.66962 2.02502 0.7646 And this is how file A looks like: 2620456 2830090 2575215 2849041 How do I actually extract and export the corresponding values for A in B? Thanks in advanced! Jeremy [[alternative HTML version deleted

Re: [R] Error: object 'CO2' not found

2012-10-22 Thread Jeremy Miles
You need to load the dataset. First, run data(CO2) Then it should work. Jeremy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

[R] loglogistic survreg

2012-09-17 Thread Jeremy Brown
Hi, I'm trying to graph the hazard function using the survreg function with the distributional assumptions to be loglogistic. If h(t)=[lambda*alpha*(lambda*t)^(alpha-1)]/[1+(lambda*t)^alpha], what output from R is alpha? Thanks [[alternative HTML version deleted]]

Re: [R] negative AIC and BIC values in gls

2012-08-22 Thread Jeremy Miles
It's fine. Just interpret them as you would any other (lower is better). On 22 August 2012 16:43, Gary Dong pdxgary...@gmail.com wrote: Dear R users, I obtained negative AIC and BIC and positive Loglik values in a gls model. Is this normal? how should I interpret them? Thanks! AIC

Re: [R] Metafor package: Including multiple (categorical) predictors

2012-08-02 Thread Jeremy Miles
The test of moderator coefficients (QM) is chi-square distributed.You can use the change in this value when you add a predictor to the model as a chi-square test, with df equal to the change in df. Jeremy On 2 August 2012 05:54, Bexkens, Anika a.bexk...@uva.nl wrote: Dear Metafor users, I'd

Re: [R] Package MuMIn (dredge): Error in ret[, ] - cbind(x, se, rep(if (is.null(df)) NA_real_ else df, : number of items to replace is not a multiple of replacement length.

2012-07-15 Thread Jeremy Little
I have also reinstalled the MuMIn package as suggested at... http://r.789695.n4.nabble.com/Error-message-number-of-items-to-replace-is-not-a-multiple-of-replacement-length-td3257893.html ...however, this made no difference. any help is appreciated. thank you -- View this message in context:

[R] Package MuMIn (dredge): Error in ret[, ] - cbind(x, se, rep(if (is.null(df)) NA_real_ else df, : number of items to replace is not a multiple of replacement length.

2012-07-11 Thread Jeremy Little
of vector length (arg 3). I am unclear what this means and how to resolve the issue. If anyone has any idea how to address this error, I would very much appreciate your response. Thank you in advance. Jeremy My script is as follows : ## LOAD PACKAGES library(MASS) library

Re: [R] Package 'MASS' (polr): Error in svd(X) : infinite or missing values in 'x'

2012-07-11 Thread Jeremy Little
: int 1 1 1 1 1 1 1 1 1 1 ... Does this provide any insight? Thank you ## Thank you both for your generous time and support, it is greatly appreciated. kind regards Jeremy -- View this message in context: http://r.789695.n4.nabble.com/Package-MASS-polr-Error-in-svd-X-infinite

Re: [R] Package 'MASS' (polr): Error in svd(X) : infinite or missing values in 'x'

2012-07-11 Thread Jeremy Little
Thanks Jessi, your insights are extremely helpful. If you would indulge me one more quick question on your script. You have written... newData-data.frame(JVeg5=factor(Jdata[,JVeg5]),scale(Jdata[,c(Elevation,Lat_Y_pos,Coast_dist,Stream_dist)])) I wish to expand this analysis for all other

[R] Package 'MASS' (polr): Error in svd(X) : infinite or missing values in 'x'

2012-07-09 Thread Jeremy Little
' Does this imply an 'infinite value' and what would this mean? If anyone has any idea how to address this error, I would very much appreciate your response. Thank you in advance. Jeremy Date File Attachment (200 rows): http://r.789695.n4.nabble.com/file/n4635829

Re: [R] Package 'MASS' (polr): Error in svd(X) : infinite or missing values in 'x'

2012-07-09 Thread Jeremy Little
Hi Jessica, thank you for your prompt response. Yes I had deduced it had to do with the Hessian. However, I am not clear what all columns having range the order of one actually means and what this means for my data. Does this mean removing decimals (ie by shifting the decimal place)? I would

[R] Installing Rcompression package

2012-01-30 Thread Jeremy MAZET
Dear all I'm trying to install the Rcompression package under R-2.14.0 on a Windows plateform. I need it to use the Ropenoffice package Because there is no binary available, I'm trying to install it from source but I have always some error messages. I have installed zlib and Bzip2 softwares,

[R] Generating repeated network measures in R

2012-01-27 Thread Jeremy Goss
I am working on directed network data of the following form: Origin farm Destination farm Year Farm 1 - Farm 21999 Farm 1 - Farm 31999 Farm 3 - Farm 22000 Farm 1 - Farm 2

[R] Combining characters

2012-01-04 Thread jeremy
Hi all, I'm trying to combine exhaustively several character arrays in R like: x=c(one,two,three) y=c(yellow,blue,green) z=c(apple,cheese) in order to get concatenation of x[1] y[1] z[1] (one yellow apple) x[1] y[1] z[2] (one yellow cheese) x[1] y[2] z[1](one blue apple) ... x[length(x)]

[R] Creating a sequence from two samples with several constraints (frequency and repeats)

2011-11-04 Thread Jeremy Wang
I'm attempting to create a sequence for an experiment and am hoping I can use R to create it. It has several constraints: (1) It is made up of two sequences (red and green) that have 4 different repeating triplets (e.g. T1=ABC T2=DEF T3=GHI JKL) (2) Each sequence has the following constraints:

Re: [R] help in interpreting paired t-test

2011-09-21 Thread Jeremy Miles
cor(A, B) [1] 0.9986861 The data are very, very highly correlated. The higher the correlation, the greater the power of the t-test to detect the same difference between the means. Jeremy On 20 September 2011 10:46, Pedro Mardones mardone...@gmail.com wrote: Dear all; A very basic question

Re: [R] Differences in SAS and R defaults

2011-08-29 Thread Jeremy Miles
Do you mean things like treatment of categorical variables in regression procedures (which have different defaults in different procedures in SAS), and different default as to the reference category in logistic regression? Jeremy On 29 August 2011 04:46, n nikhil.abhyan...@gmail.com wrote

Re: [R] questions about metafor package

2011-08-17 Thread Jeremy Miles
? jeremy __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Automatic creation of binary logistic models

2011-08-04 Thread Jeremy Miles
Sounds like you want a best subsets regression, the bestglm() function, found in the bestglm() package will do the trick. Jeremy On 4 August 2011 12:23, Paul Smith phh...@gmail.com wrote: Dear All, Suppose that you are trying to create a binary logistic model by trying different

Re: [R] How to search for R related topics in search engines?

2011-07-27 Thread Jeremy Miles
Use rseek.org. Jeremy On 27 July 2011 07:12, Paul Menzel paulepan...@users.sourceforge.net wrote: Dear R folks, I am having problems getting good results when searching for R related topics, that means I have not found out yet what keywords I should use to get only relevant results. Most

Re: [R] function lm, get back the coefficient

2011-07-26 Thread Jeremy Miles
Will: result$coef[[2]] Give you want you want? Jeremy On 26 July 2011 08:21, ascoquel ascoq...@yahoo.fr wrote: Hi, I've done a linear fit on my data and I would like to get back the a (time) coefficient ... mod-lm(res_sql2$Lx0x~0+time) result-data.frame() result-coef(mod) print

Re: [R] Message for R-help mailing list

2011-07-26 Thread Jeremy Miles
This is clearly a message for the R-help mailing list, since it was sent to the R help mailing list. fisher.test(x)[1] Jeremy On 26 July 2011 14:51, Zmarz, Pawel pawel.zmar...@imperial.ac.uk wrote: Dear r-helpers, I would be very grateful if you could post the message below on the r-help

[R] Extract elements from objects in a list

2011-06-28 Thread Jeremy Miles
. This would be: x[[1]][[3]] x[[2]][[3]] x[[3]][[3]] I thought there would be a way of doing this with something like apply(), but I cannot work it out. Is there a way of doing this without a loop? Thanks, Jeremy __ R-help@r-project.org mailing list https

Re: [R] Extract elements from objects in a list

2011-06-28 Thread Jeremy Miles
0.5227 Median Median Median Median 0.6169 0.4904 0.4773 0.4779 On Tue, Jun 28, 2011 at 7:22 PM, Jeremy Miles jeremy.mi...@gmail.com wrote: Hi All, I want to extract elements of elements in a list. Here's an example of what I mean: If I create a list: x - as.list(100) for(loop in c(1

Re: [R] Factor Analysis with orthogonal and oblique rotation

2011-06-22 Thread Jeremy Miles
in the psych package has more flavors of extraction and rotation. Jeremy On 22 June 2011 14:02, Rosario Garcia Gil m.rosario.gar...@slu.se wrote: Hello I seem to find only two types of rotation for the factanal function in R, the Varimax and Promax, but is it possible to run a orthogonal and oblique

Re: [R] Bartlett's Test of Sphericity

2011-06-18 Thread Jeremy Miles
cortest.bartlett() in the psych package. I've never seen a non-significant Bartlett's test. Jeremy On 17 June 2011 12:43, thibault grava thibault.gr...@gmail.com wrote: Hello Dear R user, I want to conduct a Principal components analysis and I need to run two tests to check whether I can

[R] Matching vector order by indicators in a matrix

2011-06-16 Thread Jeremy Beaulieu
wanted to see if there was an easy way to do this that I am completely missing. Thanks and all the best, Jeremy __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

Re: [R] BIZARRE results from wilcox.test()

2011-06-14 Thread Jeremy Miles
The results weren't BIZARRE (or even bizarre). You didn't understand them, but that doesn't make them bizarre. (I didn't understand them either, but thanks to the replies, now I do). Why not send something more similar to your dataset to ensure you get relevant answers ? Jeremy On 14 June

Re: [R] Results of CFA with Lavaan

2011-06-08 Thread Jeremy Miles
What do you mean by latent estimate? The table of variances has variances for each factors. Is there something different in the sem output that you don't see here? Yes, this looks normal. Jeremy On 8 June 2011 13:14, R Help rhelp.st...@gmail.com wrote: I've just found the lavaan package

Re: [R] best subset regression in R

2011-05-04 Thread Jeremy Miles
, and sends me to this page: http://www.statmethods.net/stats/regression.html Jeremy -- Jeremy Miles Support Dan and Alex's school: Vote for Goethe Charter School to receive a grant from Pepsi to help build a library: http://www.refresheverything.com/gicslibrary

Re: [R] fisher exact for 2x2 table

2011-04-29 Thread Jeremy Miles
and Halton (1951), and this test is *also* known as the Freeman-Halton test. Emphasis mine. Jeremy -- Jeremy Miles Psychology Research Methods Wiki: www.researchmethodsinpsychology.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] R forum for only Statistics

2011-04-28 Thread Jeremy Hetzel
( https://groups.google.com/forum/#!forumsearch/sci.stat.*). Perhaps others have a better feel for which forums are of higher quality. The sci.stat.* groups look a bit overrun with spam these days. Jeremy On Thursday, April 28, 2011 7:26:06 AM UTC-4, Vincy Pyne wrote: Hi! I wish to know

Re: [R] Speed up code with for() loop

2011-04-28 Thread Jeremy Hetzel
parallel() with the .Internal calls reduces the elapsed time by about 70% on Ubuntu Natty. Multicore is not available for Windows, or at least not easily available for Windows. But maybe the true R wizards have better ideas. Jeremy __ R-help@r

Re: [R] calculations with vectors of unequal length

2011-04-27 Thread Jeremy Hetzel
See ?merge. df.1 - data.frame(year=factor(rep(1:3,3)), level=rep(letters[1:3],3), number=c(11:19)) df.2 - data.frame(year=factor(c(1:5)), number=c(21:25)) df.3 - merge(df.1, df.2, by = year) df.3$new - with(df.3, number.x + number.y) Jeremy On Wednesday, April 27, 2011 7:30:13 AM UTC-4, E

Re: [R] setting options only inside functions

2011-04-27 Thread Jeremy Hetzel
See ?on.exit Jeremy On Wednesday, April 27, 2011 9:16:13 AM UTC-4, Jannis wrote: Dear list members, is it possible to set some options only inside a function so that the original options are restored once the function is finished or aborted due to an error? Until now I do something

Re: [R] Rcmdr vs SPSS in hungarian

2011-04-21 Thread Jeremy Miles
the studentized (which SPSS calls studentized-deleted). Jeremy 2011/4/21 Tamas Barjak tamas.barja...@gmail.com: Remélem valaki ezt is elolvassa, megérti, és válaszol a problémámra. A gondom a következő: Kiszámoltattam a maradékokat az R commanderrel, és az SPSS -el is. És itt kezdődik igazán a gond

Re: [R] Random Relabelling

2011-04-20 Thread Jeremy Hetzel
Kevin, The following follows John's suggestion, but without the loop. It's quick for me. Jeremy Jeremy T. Hetzel Boston University ## Generate sample data n - 4000 rep - 1000 rate - rnorm(n, mean = 15, sd = 2) / 10 # Mortality rates around 15/100k ## Create an empty matrix

Re: [R] Rcmdr vs SPSS

2011-04-20 Thread Jeremy Miles
(because they follow the distribution). John Fox's regression book http://socserv.mcmaster.ca/jfox/Books/Companion/ explains all of this nicely. Jeremy On 20 April 2011 14:36, Tamas Barjak tamas.barja...@gmail.com wrote: Hy all! Excuse me for the inaccurate composition, but I do not speak well

Re: [R] Monte Carlo Simulation

2011-04-15 Thread Jeremy Miles
write.table() for the saving the files, or is the problem with splitting a large file, or generating the 1000 names ... Jeremy -- Jeremy Miles Psychology Research Methods Wiki: www.researchmethodsinpsychology.com __ R-help@r-project.org mailing list https

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread Jeremy Hetzel
Scribus claims to be able to convert RGB/CMYK colors to spot colors: http://documentation.scribus.net/index.php/Spot_Colors I've never used Scribus, but it's floss. Jeremy __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread Jeremy Hetzel
, convert to spot color in Scribus, then break the PDF apart again for Latex. Jeremy __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] Converting a categorical variable to multiple dichotemousvariables

2011-04-12 Thread Jeremy Hetzel
$eth, unique(simtest$eth), ==) + 0 # Combine simtest.combined - cbind(simtest, simtest.dichotomous) head(simtest.combined) Jeremy Jeremy Hetzel Boston University __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Multinomial Logit Model with lots of Dummy Variables

2011-04-10 Thread Jeremy Hetzel
) }) # Combine into new data frame dat.new - data.frame(dat$outcome, A, B) head(dat.new) Jeremy __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] xyplot, groups and colors

2011-04-08 Thread Jeremy Hetzel
and geom_line colour aesthetics as group g1 + geom_point(aes(colour = group)) + geom_line(aes(colour = group)) Is this what you are after? Jeremy Jeremy Hetzel Boston University [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] Removing not duplicated rows

2011-04-08 Thread Jeremy Hetzel
As I understand it, you are trying to subset the data frame to include only rows with a non-unique id. Try this: x - data.frame(cbind(id=c(1,2,2,2,3,3,4,5,6,6), value=1:10)) id.table - table(x$id) x_new - subset(x, id %in% id.table[id.table 1]) Jeremy

Re: [R] Removing not duplicated rows

2011-04-08 Thread Jeremy Hetzel
Sorry, I left out the names() function in the last step. Try this instead: x - data.frame(cbind(id=c(1,2,2,2,3,3,4,5,6,6), value=1:10)) id.table - table(x$id) x_new - subset(x, id %in% names(id.table[id.table 1])) Jeremy __ R-help@r-project.org

Re: [R] Correlation Matrix

2011-04-07 Thread Jeremy Miles
manually? You can use cbind(). cor(cbind(MyDataFrame$variable1, MyDataFrame$variable2,MyDataFrame$variable3) ) Jeremy __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Structural equation modeling in R(lavaan,sem)

2011-04-03 Thread Jeremy Miles
join it here: http://www2.gsu.edu/~mkteer/semnet.html#Joining. Jeremy -- Jeremy Miles Psychology Research Methods Wiki: www.researchmethodsinpsychology.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Italicized title from index

2011-03-31 Thread Jeremy Newman
morhua* I'm at wit's end, I tried to read about substitute, expression, and eval functions in the hopes I can figure it out, but I am lost! Thanks for any help! Cheers, -Jeremy N Undergraduate Researcher in Macroecology University of Ottawa Department of Biology Ad astra per alia porci

Re: [R] Italicized title from index

2011-03-31 Thread Jeremy Newman
Hi, Thank you *very* much. I'll remember that in the future! Cheers, -Jeremy N Undergraduate Researcher in Macroecology University of Ottawa Department of Biology Ad astra per alia porci! On Thu, Mar 31, 2011 at 8:01 AM, Henrique Dallazuanna www...@gmail.comwrote: Better: plot(1, main

Re: [R] Structural equation modeling in R(lavaan,sem)

2011-03-29 Thread Jeremy Miles
will help. http://www.biomedcentral.com/1756-0500/3/267 Might I also suggest you take a look at the semnet list, which is populated by practitioners of SEM. Jeremy On 29 March 2011 12:25, jouba antr...@hotmail.com wrote: Dear all, There is some where documentation to understand all  indices

Re: [R] Structural equation modeling in R(lavaan,sem)

2011-03-28 Thread Jeremy Miles
That's probably wrong. x4-x5,gamm4,NA x7-x6,gamm5,NA x6-x5,gamm6,NA Are the above two correct? x2 -x2 ,sigmma1,NA x3 -x3 ,simma2,NA x4 -x4 ,sigmma3,NA x5 -x5 ,sigmma4,NA x7 -x7 ,sigmma5,NA x6 -x6 ,sigmma6,NA It's a somewhat unusual looking model. What are you trying to do? Jeremy

Re: [R] Structural equation modeling in R(lavaan,sem)

2011-03-27 Thread Jeremy Miles
of introductory SEM texts, which will answer this sort of question. Jeremy -- Jeremy Miles Psychology Research Methods Wiki: www.researchmethodsinpsychology.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

Re: [R] testing power of correlation

2011-03-05 Thread Jeremy Miles
Can you clarify what you mean? The strength of the correlation is the correlation. One (somewhat) useful definition is Cohen's, who said 0.1 is small, 0.3 is medium and 0.5 is large. Or do you (as your subject says) want to get the power for a correlation? This is a different thing. Jeremy

[R] building R from source

2011-02-17 Thread Jeremy MAZET
Dear all, I post again my question with a new title ... please, help me! I build a customized version of R-2.12.1 from source (under windows XP). I work as explain in the R Installation and Adminstration manual and all seems to be good... But When I try to uninstall this version I have the

[R] uninstall R

2011-02-16 Thread Jeremy MAZET
Dear all, I build a customized version of R-2.12.1 from source (under windows XP). I work as explain in the R Installation and Adminstration manual and all seems to be good... But When I try to uninstall this version I have the error message cannot find utCompiledCode record for this version

Re: [R] sem problem - did not converge

2011-02-14 Thread Jeremy Miles
the structural equation modeling list - semnet. This isn't really a sem (the package) or R problem, it's a more general SEM (the approach) problem. Jeremy Chen, F., Bollen, K., Paxton, P., Curran, P.J., Kirby, J. (2001). Improper solutions in structural equation models: Causes, consequences

Re: [R] Revolution Analytics reading SAS datasets

2011-02-10 Thread Jeremy Miles
be construed as publishing the algorithm. (SPSS and WPS both can open SAS files, and I'd be surprised if SAS licensed to them. [Esp WPS, who SAS are (or were) suing for all kinds of things in court in London.) Jeremy __ R-help@r-project.org mailing list https

[R] Generate data from correlation matrix

2011-02-07 Thread Jeremy Miles
Hi All, I was wondering if anyone knew of a function which would generate data from a pre-specified correlation matrix (as in the Stata command r2corr) or sampled from a population with a specific covariance/correlation. (I thought I'd check before I wrote something inelegant and slow.) Jeremy

Re: [R] HLM Model

2011-01-27 Thread Jeremy Miles
. However, it appears that in R you did not dummy code them. It also appears you haven't given use all of the SAS output. Jeremy On 27 January 2011 15:52, Belle ping...@gmail.com wrote: Hi Harold: I know the outputs are different between SAS and R, but the results that I got have big difference

[R] Merge() error

2010-12-13 Thread Jeremy Miles
some of the variables across the data frames, so in addition to caseid, each also contains AuthorYr and StudyDesign. Thanks, Jeremy -- Jeremy Miles Psychology Research Methods Wiki: www.researchmethodsinpsychology.com [[alternative HTML version deleted

[R] R crash

2010-11-15 Thread Jeremy MAZET
We distribute several R applications using the tcltk package on different servers or PC (Windows XP). On some machines and in a not reproducible way, all the R windows disappear when using functions like tkgetSaveFile or tkchooseDirectory. The R application remains open (the Rgui.exe processus

Re: [R] how do I make a correlation matrix positive definite?

2010-10-21 Thread Jeremy Miles
You could use cov2cor() to convert from covariance matrix to correlation matrix. If the correlation is 1, the matrix won't be positive definite, so you can restandardize the matrix to get a pos def correlation matrix. Jeremy On 21 October 2010 15:50, HAKAN DEMIRTAS demir...@uic.edu wrote: Hi

Re: [R] how do I make a correlation matrix positive definite?

2010-10-21 Thread Jeremy Miles
not misunderstood. :) Jeremy On 21 October 2010 16:14, HAKAN DEMIRTAS demir...@uic.edu wrote: I know. Let me re-phrase the question: How do I convert a non-positive definite correlation matrix to a positive-definite correlation matrix in R? I don't think cov2cor is relevant here. Example:  print

[R] overlaying multiple contour plots

2010-10-13 Thread Jeremy Olson
element occupies on this map. Is there a way to do this in 'R'? I am fairly new to this software, so any help would be much appreciated. Thank you in advance, Jeremy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

Re: [R] FDR

2010-10-07 Thread Jeremy Miles
This is correct. Wikipedia is not bad, and provides some references. Another web page: http://courses.ttu.edu/isqs6348-westfall/images/6348/BonHolmBenHoch.htm http://courses.ttu.edu/isqs6348-westfall/images/6348/BonHolmBenHoch.htm Jeremy On 7 October 2010 10:37, will.ea...@gmx.net wrote

Re: [R] can I add line breaks to the paste() function?

2010-09-30 Thread Jeremy Miles
Try using cat instead. Then \n is the new line character. E.g. cat(1st line\n2nd line\n) Jeremy On 30 September 2010 13:30, David LeBauer dleba...@gmail.com wrote: Can I add a line break to the paste() function to return the following: 'this is the first line' 'this is the second line

  1   2   >