Re: [R] error in mlogit

2012-06-21 Thread Kazu Nada
Thank you so much for the suggestion. I want to estimate interactions between "the attributes of the choice set" and "subject-specific data (e.g., gender or income)". However, y ~ x | z notation is to see the interaction between "the alternatives of choice set" and "subject-specific data (e.g., gen

Re: [R] Local linear regression

2012-06-21 Thread JeffND
locpoly() might be useful -- View this message in context: http://r.789695.n4.nabble.com/Local-linear-regression-tp4512566p4634166.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/m

Re: [R] optFederov/AlgDesign - help avail?

2012-06-21 Thread disha
Hi, The design generated using optFederov is not including all the levels ie levels are missing from the fractional factorial design. Can anyone plz help with the modified command. The command i am giving is- library(AlgDesign) Levels.design=c(3,4,2) fe.design<-gen.factorial(levels.design) fe.desi

Re: [R] data normalization

2012-06-21 Thread arun
Hi, Probably you might have got the solution. Anyway, you can try this: Dat <- read.table(text=" ID  TIME    DV 1  0  0.880146038 1  1  0.88669051 1  3  0.610784702 1  5  0.75604 2  0  0.456263368 2  1  0.369991537 2  3  0.508798346 2  5  0.441037014 3  0  0.854905349 3  1  0.960457553 3  3 

Re: [R] Package for Jump detection

2012-06-21 Thread R. Michael Weylandt
This might be a question more suited for the R-SIG-Finance list. Best, Michael On Wed, Jun 20, 2012 at 3:44 AM, rahul deora wrote: > Dear All, > > Are there any packages in R to carry out the jump detection test and find > the jump sizes and its its time of occurence on high frequency data(5 > m

Re: [R] rgdal package load problem

2012-06-21 Thread Pascal Oettli
Hello, Sorry for the confusion. I assumed you were using a portage of R through MacPorts for example. I use it, to avoid the kind of issue you are facing to. For the moment, I don't have a solution. When I will have time, I will go further. Best Regards, Pascal Le 12/06/22 10:14, BHorn a

Re: [R] rgdal package load problem

2012-06-21 Thread BHorn
Pascal Thank you for your reply.I have installed GDAL 1.9 Complete [33.6 MiB] (Snow Leopard & Lion) 2012-6-21. I have also had no problem installing the the rgdal library for R 2.15 direct form the rgdal_0.7-11.tgz. Finally, I have updated and sourced my .bash_profile file to ensure GDAL, PRO

[R] R workshop at UC Berkeley Aug. 6-9

2012-06-21 Thread John Fox
Dear R users, I'd like to announce a workshop on R, entitled "The R Statistical Computing Environment: The Basics and Beyond," which I'll be teaching at the University of California, Berkeley, from August 6 through 9. Held under the auspices of the Inter-University Consortium for Political and

Re: [R] Comparing to create a new list

2012-06-21 Thread RobertDavis
So I got this to work and thought that I should post it, in case it might help someone else: library(maptools) library(maps) elem_school_district <- readShapePoly("E:/My Documents/Web Usage/RTest/School_District_Shape_Files/Elementary School Districts/unzipped/tl_2010_47_elsd10.shp", IDvar="N

[R] install package mixdist

2012-06-21 Thread Yakir Gagnon
Hi all, I'm trying to install the mixdist package with: install.packages("mixdist") But I'm getting the following errors: * installing *source* package ‘mixdist’ ... ** R ** data ** preparing package for lazy loading ** help *** installing help indices ** building package indices ... Warning in

Re: [R] lme random effects in additive models with interaction

2012-06-21 Thread elifnurdogruoz
Thanks for your answer, I would like to make clear my question: My data is like following and there is a response variable y: Time Size Charge Density Replication 3 small + low 1 . .

Re: [R] Question on EBImage package

2012-06-21 Thread Gregoire Pau
This is a bug, which I just fixed in EBImage 3.13.1. As Martin suggested, please post EBImage-related questions on the Bioconductor mailing list. Greg On 06/20/2012 02:57 PM, Steven Winter wrote: > >> I am having trouble using the "resize" function (in the package EBImage) >> with matrices conta

Re: [R] how to make a histogram with percentage on top of each bar?

2012-06-21 Thread arun
HI, Probably this link will be useful to you (http://stackoverflow.com/questions/9317948/how-to-label-histogram-bars-with-data-values-or-percents-in-r). A.K> - Original Message - From: york8866 To: r-help@r-project.org Cc: Sent: Thursday, June 21, 2012 1:26 PM Subject: [R] how to

[R] I got beats for your

2012-06-21 Thread Mojo Beats
I got your hot fresh beats and here is the download link as proof free of charge. If you like what you hear, then continue reading [1]http://mojobeats.com/soundofbounce.mp3 Read terms and condition here [2]http://mojobeats.com/terms.txt I searched around the internet and your ema

[R] I got beats for your

2012-06-21 Thread Mojo Beats
I got your hot fresh beats and here is the download link as proof free of charge. If you like what you hear, then continue reading [1]http://mojobeats.com/soundofbounce.mp3 Read terms and condition here [2]http://mojobeats.com/terms.txt I searched around the internet and your ema

Re: [R] convert 'character' vector containing mixed formats to 'Date'

2012-06-21 Thread arun
HI, #Instead of x1[is.na(x1)]<-c(x2[8],x2[10]) #You can use more general form, x1[is.na(x1)]<-x2[!is.na(x2)] x1  [1] "2005-03-01" "2004-04-13" "2005-05-02" "2005-05-02" "2007-05-07"  [6] "2004-04-22" "2005-04-21" "2008-04-30" "2003-05-13" "2008-05-29" [11] "1999-05-19" "2000-05-17" "2000-05-17" A

Re: [R] Exporting data from R into an Excel File on Mac

2012-06-21 Thread zgu9
You can try the following line. write.csv(x,file="x.csv") Eric Maureen Hayden wrote > > Dear R Professionals, > > I am currently an intern at the University of Rhode Island and I need to > know how to export data from R into an Excel file. As it is my > understanding, xlsReadWrite is not availa

Re: [R] How to set cookies in RCurl

2012-06-21 Thread mdvaan
Hi, I am using prof. Temple Lang's suggestions and I think I should be close but with the code below I get an error message which I don't fully get. Any suggestions? Thanks! Math library(RCurl) library(XML) setwd("C:/Comments") url <- getURLContent("http://www.scopus.com/results/results.url?sor

Re: [R] rgdal package load problem

2012-06-21 Thread Pascal Oettli
Hello, Let's assume that you already installed both "proj4" and "gdal" on your computer. Then, try the following command in R prompt: > install.packages("rgdal", dependencies=TRUE, configure.args=c("--with-proj-lib=/opt/local/lib", "--with-gdal-lib=/opt/local/lib")) Best Regards, Pascal

[R] calculating inflection point in mixed effect model

2012-06-21 Thread Gary Dong
Hi, dear R users, I estimated a mixed-effects model with the lme function in R. In this model, the relationship between my predictor x and the DV y follows quadratic function. In other words, in the model, x has a positive coefficient while x squared has a negative coefficient. I'm wondering how I

Re: [R] R function similar to gradient function in Matlab?

2012-06-21 Thread R. Michael Weylandt
I don't have a Matlab license or enough experience with it to know what gradient does, but I know there's a Matlab-to-R "dictionary" out there that many folks find helpful. It might have what you need (or just be generally useful). http://cran.r-project.org/doc/contrib/Hiebeler-matlabR.pdf No

[R] R function similar to gradient function in Matlab?

2012-06-21 Thread Ranjan Maitra
Hi, I am trying to convert some Matlab code into R for running some experiments and I was wondering if there is some function in R which does the work of the gradient function in Matlab calculating the "gradient" of 1-, 2- and 3-d images. I only need the 3-d calculations for running these experime

Re: [R] prcomp: where do sdev values come from?

2012-06-21 Thread David L Carlson
This should help you figure it out: getAnywhere("prcomp.default") -- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4352 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-he

Re: [R] Question on EBImage package

2012-06-21 Thread Martin Morgan
Hi -- EBImage is a Bioconductor package so better to ask there http://bioconductor.org/help/mailing-list/ and to cc the packageDescription("EBImage")$Maintainer Martin On 06/20/2012 02:57 PM, Steven Winter wrote: I am having trouble using the "resize" function (in the package EBImage) with

Re: [R] reversing the order of a y-axis in stripchart()

2012-06-21 Thread Rui Barradas
Hello, You should post a data example using dput(head(X, 20)) # or 30 Now, for your question, you can simply set ylim to the reverse order. Using one of the examples in the stripchart help page, op <- par(mfrow=c(1, 2)) # First graph, y axis in reversed order plot(1, typer="n", xlim=c(0, 9

Re: [R] Exporting data from R into an Excel File on Mac

2012-06-21 Thread jim holtman
Check out the XLConnect package since it will allow you to write EXCEL workbooks directly. On Thu, Jun 21, 2012 at 2:37 PM, Maureen Hayden wrote: > Dear R Professionals, > > I am currently an intern at the University of Rhode Island and I need to > know how to export data from R into an Excel fil

Re: [R] Exporting data from R into an Excel File on Mac

2012-06-21 Thread Sarah Goslee
write.table() can easily export delimited text files that can be opened in the spreadsheet of your choice. If you need to export Excel specifically, rather than something Excel can open, you'll need a different answerer. Sarah On Thu, Jun 21, 2012 at 2:37 PM, Maureen Hayden wrote: > Dear R Prof

[R] Exporting data from R into an Excel File on Mac

2012-06-21 Thread Maureen Hayden
Dear R Professionals, I am currently an intern at the University of Rhode Island and I need to know how to export data from R into an Excel file. As it is my understanding, xlsReadWrite is not available for mac. Is there another package available for mac users to be able to perform this function.

[R] rgdal package load problem

2012-06-21 Thread BHorn
I am having trouble getting the rgal package to work on Mac OS X. I suspect it has something to do with the link between the rgal package and the associated programs GDAL and PROJ4. Here is the message I get when I attempt to load rgal > library("rgdal") Error in dyn.load(file, DLLpath = DLLpat

[R] reversing the order of a y-axis in stripchart()

2012-06-21 Thread Brianna Wright
Hi, I am trying to plot a graph using stripchart() - my x-axis is categorical and my y-axis is numerical. I would like to reverse the order of my y-axis (i.e. with 0 at the top left and increasing numbers moving downward towards the bottom left corner). My data are subsetted into 3 categories that

[R] Getting started with Bayesian Change Point model in R

2012-06-21 Thread Kendra Karr
Hi- I am interested in running the BCP model in R and I am also new to R. My main issue is how to ask a specific questions within the script for this model, i.e., how one or multiple dependent factors (blue) are interact with the dependent factor (yellow), and nest the question do categorical fa

[R] how to make a histogram with percentage on top of each bar?

2012-06-21 Thread york8866
I have a dataset like the following: ID DV 1 0.868576818 2 0.337120116 3 0.029233775 4 0.719783525 5 0.976631182 6 0.672941605 7 0.13239462 8 0.99936475 9 0.91540604 10 0.545686514 to get a histogram with y axis as percentage, I wrote

[R] Random Forest Partial Dependence Plot

2012-06-21 Thread Namit Setia
I'm using the partial plot function in the Random Forest package (randomForest). I want to be able to control the region of values it chooses for the x.var variable (instead of going from 0 to 10, I want to go from 0 to 1000). The problem I'm having is that it seems the only method to do that

Re: [R] convert 'character' vector containing mixed formats to 'Date'

2012-06-21 Thread arun
HI, You could also try it with strptime to get the result: x <- c("1/3/2005", "13/04/2004", "2/5/2005", "2/5/2005", "7/5/2007",   "22/04/2004", "21/04/2005", "20080430", "13/05/2003", "20080529",   NA, NA, "19/05/1999", "17/05/2000", "17/05/2000")  x<-as.character(na.omit(x)) x1<-strptime

Re: [R] reshape

2012-06-21 Thread nrm2010
Hello, Jim, Thank you for the new version. I'm still verifying that everything is running correctly with the real data but it looks good so far. Thank you very much for your assistance. grep syntax is a bit mysterious... Toby On Wed, 20 Jun 2012 16:58:44 -0700 jim holtman wrote

Re: [R] Simple Question?

2012-06-21 Thread Rui Barradas
Hello, Try the following. dd <- read.table(text=" chromlength 1 chr1 249250621 2 chr2 243199373 [... etc ...] 22 chr19 59128983 23 chr22 51304566 24 chr21 48129895 ", header=TRUE) str(dd) dd$chrom <- as.character(dd$chrom) dd$chrom <- sub("chr", "", dd$chrom) # This 'chrom' is

Re: [R] RODBC to access a web server

2012-06-21 Thread Oliver Ruebenacker
Hello Brett, My guess is you did not set the access rules on the MySQL server to allow connections from this host. Take care Oliver On Thu, Jun 21, 2012 at 1:29 PM, Prof Brian Ripley wrote: > On 21/06/2012 17:17, Brett Robinson wrote: >> >> Hi, I have tried to figure this out f

Re: [R] RODBC to access a web server

2012-06-21 Thread Prof Brian Ripley
On 21/06/2012 17:17, Brett Robinson wrote: Hi, I have tried to figure this out from the help files and lists but not managed it I can access a local MySQL database from R running on my Windows XP PC. What I want to do is access a MySQL database on a linux web server, for which I have admin ac

Re: [R] Simple Question?

2012-06-21 Thread Bert Gunter
?? ggplot did not reorder the columns -- it just plotted them in the order of the levels of factor(chrom), which is exactly what you wanted afaics. There is no need to reorder to do what you want. Comment: ?dput to put reproducible data into an email that people can conveniently copy and paste int

Re: [R] Lattice: choice of symbol and symbol position in legend

2012-06-21 Thread Peter Ehlers
On 2012-06-21 03:30, tsuotu wrote: marcel wrote the positioning was 'text' followed by 'symbol' instead of the other way around. How did you set symbols before text? I read ?xyplot but still can't figure this out. -- View this message in context: http://r.789695.n4.nabble.com/Lattice-choi

Re: [R] R crashes with >kud<-kernelUD(data, h="LSCV") script

2012-06-21 Thread Peter Ehlers
On 2012-06-21 04:25, Amanda Kuepfer wrote: Hi, I am looking to perform a kernel density analysis in R, following the script that a friend of mine is using successfully. However, unlike for her, when I enter>kud<-kernelUD(data, h="LSCV"), R crashes and closes every time. This does not happen wh

Re: [R] How to calculate values with percent sign imported from Excel?

2012-06-21 Thread Peter Ehlers
On 2012-06-21 06:19, David Winsemius wrote: [...] What you should have done was convert the Excel column to numeric from percentage using the "Format/Cell" menu and then import. This is excellent advice. It has been my experience that _very_ few Excel addicts are aware that columns in thei

[R] Simple Question?

2012-06-21 Thread Kevin Parrish
Greetings, I am new to R, but trying to put in the time to learn. I have read the R manual and several other introductory texts; however, there is nothing like actually putting it into practice. So here is my problem, and its more of a learning exercise for myself than anything else, but I'm stuck

[R] RODBC to access a web server

2012-06-21 Thread Brett Robinson
Hi, I have tried to figure this out from the help files and lists but not managed it I can access a local MySQL database from R running on my Windows XP PC. What I want to do is access a MySQL database on a linux web server, for which I have admin access. I can't figure out how to set up odbc

Re: [R] check.k function in mgcv packages

2012-06-21 Thread Simon Wood
The point is that you are checking the basis dimension used in the first model, b, where the basis dimension for s(x2) was set to 6. All the other model fits are about checking that first one. On checking the residuals from model b you detect pattern with respect to x2, with an estimated degree

Re: [R] MGCV: Use of irls.reg option

2012-06-21 Thread Simon Wood
Hi Mark, irls.reg is kind of `legacy code'. Does model fitting actually fail for your example, or is it just that the estimated spatial smooth looks unpleasant? best, Simon On 06/21/2012 01:28 AM, r-help.20.tre...@spamgourmet.com wrote: Hi, In the help files in the mgcv package for the ga

Re: [R] Regression equation with a spline in gam (mgcv)

2012-06-21 Thread Simon Wood
Please see help("mgcv-FAQ") number 2 best, simon On 06/19/2012 05:27 PM, Stefano Sofia wrote: Given model1<- gam(Y ~ X1, family=poisson) (which is a glm), the regression equation is Log(Y) = 2.132 + 0.00044 X1 In fact from summary(model1), I read summary(model1) Family: poisson Link funct

Re: [R] Novice question about getting data into R

2012-06-21 Thread schmaltz
Dear Petr,   Thank you very much for reply. You cannot read the Chinese characters may be because you don't have install this language. Do you have any idea how solve this problem? Or who can help me? May I install Linux?   Best regards, Ms. Márcia Schmaltz 修安琪 Departamento de Portugu

Re: [R] R crashes with >kud<-kernelUD(data, h="LSCV") script

2012-06-21 Thread R. Michael Weylandt
Hi Amanda, I can't reproduce this without your data set. Would it be possible for you to give us dput(head(data, 20)) if you need further help? Also, if you could supply the output of sessionInfo()? That's often helpful for anything that "crashes" [that term means many things to different people

Re: [R] Function for testing

2012-06-21 Thread R. Michael Weylandt
Hi, this has the distinctive sound of homework, so I hesitate to give too much help, but two things I note immediately. In defining resx / resy (good preallocation!) you probably mean "n" instead of "N". A standard way to check how often a condition occurs is something like: x <- rnorm(50) mean

Re: [R] Distribution and location scale family

2012-06-21 Thread R. Michael Weylandt
This has the distinctive sound of homework and we unfortunately can't help with that. You might want to look at fitdistr in the MASS package though. Best of luck to you though, Michael On Thu, Jun 21, 2012 at 7:10 AM, Noor.v.d.Assem wrote: > Hi, > > For some dataset I have made a histogram, box

[R] Function for testing

2012-06-21 Thread a.b.carter
Hi all, I want to create a sample called x, with length 10 from a N(0,1) distribution. Next to that I want to create a sample called y, with length 10 from a N(0.5 ,1) distribution. Both samples are undergoing a t.test. The outcome must be that I can see how many times for x H0 was rejected. The s

[R] Distribution and location scale family

2012-06-21 Thread Noor.v.d.Assem
Hi, For some dataset I have made a histogram, boxplot en qqplot. http://r.789695.n4.nabble.com/file/n4634093/Naamloos.jpg Investigate the data with the given functions for making QQ-plots and find an appropriate location-scale family for the underlying distribution of this sample. Apart from gi

[R] crosstable and regression for survey data (weighted)

2012-06-21 Thread haps
I have survey data that I am working on. I need to make some multi-way tables and regression analyses on the data. After attaching the data, this is the code I use for tables for four variables (sweight is the weight variable): > a <- xtabs(sweight~research.area + gender + a2n2 + age) > tmp <- fta

Re: [R] Novice question about getting data into R

2012-06-21 Thread Petr PIKAL
Hi I can read the example you provided without much problem. dput(head(test)) structure(list(n = 0:5, X = c(NA, NA, NA, NA, NA, NA), start = c(11185L, 39530L, 40544L, 109684L, 114629L, 118841L), X.1 = c(NA, NA, NA, NA, NA, NA), dur = c(1L, 2L, 1L, 1L, 0L, 1L), X.2 = c(NA, NA, NA, NA, NA, NA),

Re: [R] Lattice: choice of symbol and symbol position in legend

2012-06-21 Thread tsuotu
marcel wrote > > the positioning was 'text' followed by 'symbol' instead of the other way > around. > How did you set symbols before text? I read ?xyplot but still can't figure this out. -- View this message in context: http://r.789695.n4.nabble.com/Lattice-choice-of-symbol-and-symbol-positi

[R] R crashes with >kud<-kernelUD(data, h="LSCV") script

2012-06-21 Thread Amanda Kuepfer
Hi,  I am looking to perform a kernel density analysis in R, following the script that a friend of mine is using successfully. However, unlike for her, when I enter >kud<-kernelUD(data, h="LSCV"), R crashes and closes every time. This does not happen when I perform a different kernel analysis

Re: [R] How to calculate values with percent sign imported from Excel?

2012-06-21 Thread David Winsemius
On Jun 20, 2012, at 10:34 PM, C W wrote: I am a noob. I am familiar with factors, but not familiar with how that relates to "two distinct values". How were you able to tell? Please point me out. Mike The first part of a factor's structure is a vector of integers, the part I copied. The

Re: [R] convert 'character' vector containing mixed formats to 'Date'

2012-06-21 Thread Petr PIKAL
Hi > > Dear all > I have a 'character' vector containing mixed formats (thanks Excel!) > and I'd like to translate it into a default "%Y-%m-%d" Date vector. > x <- c("1/3/2005", "13/04/2004", "2/5/2005", "2/5/2005", "7/5/2007", >"22/04/2004", "21/04/2005", "20080430", "13/05/2003", "20080

Re: [R] convert 'character' vector containing mixed formats to 'Date'

2012-06-21 Thread Duncan Murdoch
On 12-06-21 8:48 AM, Liviu Andronic wrote: Dear all I have a 'character' vector containing mixed formats (thanks Excel!) and I'd like to translate it into a default "%Y-%m-%d" Date vector. x<- c("1/3/2005", "13/04/2004", "2/5/2005", "2/5/2005", "7/5/2007", "22/04/2004", "21/04/2005", "200

Re: [R] convert 'character' vector containing mixed formats to 'Date'

2012-06-21 Thread Liviu Andronic
On Thu, Jun 21, 2012 at 2:48 PM, Liviu Andronic wrote: > The culprit is likely that the 'x' vector is 'character' throughout, > but I'm not sure how to work around. For example, I couldn't figure > how to create an empty 'Date' vector. Regards > I think I managed to crack this by myself. I only n

Re: [R] Odds Ratios in rms package

2012-06-21 Thread Frank Harrell
Peter- for summary.rms, high and low columns are supposed to be the quartiles. Perhaps Sebastian, the original poster, could run age through the ordinary summary function or the describe function and show us the result. Frank Peter Dalgaard-2 wrote > > On Jun 20, 2012, at 21:05 , David Winsemiu

[R] convert 'character' vector containing mixed formats to 'Date'

2012-06-21 Thread Liviu Andronic
Dear all I have a 'character' vector containing mixed formats (thanks Excel!) and I'd like to translate it into a default "%Y-%m-%d" Date vector. x <- c("1/3/2005", "13/04/2004", "2/5/2005", "2/5/2005", "7/5/2007", "22/04/2004", "21/04/2005", "20080430", "13/05/2003", "20080529", NA,

Re: [R] Binary Quadratic Opt?

2012-06-21 Thread Petr Savicky
On Thu, Jun 21, 2012 at 02:46:10AM -0700, khris wrote: > Hi Petr, > > Thanks for the reply. Your reply answers the question perfect. > Unfortunately converting the problem to linear opt would increase the number > of variable making it non solvable. I guess a general approach will be > unfeasible

Re: [R] Writing 'domain specific languages' with R

2012-06-21 Thread Duncan Murdoch
On 12-06-21 7:20 AM, Roberto Brunelli wrote: I would like to port to R the IPAT-S language, kind of a 'domain specific' scripting language for developing quantitative models for medium and long-term sustainability scenarios (www.ipat-s.org). I think that in order to replicate its syntax I need s

Re: [R] Odds Ratios in rms package

2012-06-21 Thread peter dalgaard
On Jun 20, 2012, at 21:05 , David Winsemius wrote: > > On Jun 20, 2012, at 12:12 PM, Sebastian Pölsterl wrote: > >> Hi, >> >> I'm using the rms package to do regression analysis using the lrm >> function. Retrieving odds ratios is possible using summary.rms. However, >> I could not find any in

Re: [R] Edges and Rasters

2012-06-21 Thread riodementa
Lot of thanks Sarah! It works!, and sorry for don`t say that I'm using Windows7. And i have another question. Do you know if it is possible to plot the edge using 2 or more cells? What I'm trying to do is an edge wider, and i don'care lose some of the information inside or outside around the edge.

Re: [R] Reference classes and memory consumption

2012-06-21 Thread Jan Mueller
Dear Martin, thank you for your hints. They were very helpful. Maybe memory.size() is a more reasonable measure of memory consumption? Here's a rough comparison of 10.000 instances of a reference class, an S3 class and a simple vector: Reference Class: 14MB S3 class: 1,76MB Vector: 0.08MB So c

Re: [R] Binary Quadratic Opt?

2012-06-21 Thread khris
Hi Petr, Thanks for the reply. Your reply answers the question perfect. Unfortunately converting the problem to linear opt would increase the number of variable making it non solvable. I guess a general approach will be unfeasible so need to look for specific approach. Appreciate if you have any

Re: [R] Odds Ratios in rms package

2012-06-21 Thread Sebastian Pölsterl
Thanks a lot David, I must have missed this sentence. Best regards, Sebastian Am 20.06.2012 21:05, schrieb David Winsemius: > > On Jun 20, 2012, at 12:12 PM, Sebastian Pölsterl wrote: > >> Hi, >> >> I'm using the rms package to do regression analysis using the lrm >> function. Retrieving odds r

[R] prcomp

2012-06-21 Thread carol white
Hi, If center=T (by default) in invoking prcomp, that is, prcomp (x) where x is a matrix with the observations are in rows and the variables are in column, is this equivalent to scale(t(x),center=T,scale=F) where x is a matrix with the observations are in rows and the variables are in columns?

[R] lme random effects in additive models with interaction

2012-06-21 Thread elifnurdogruoz
Hello, I work with a mixed model with 4 predictor variables Time, Size, Charge, Density and Size, Charge, Density are factors, all with two levels. Hence I want to put their interactions with Time into the model. But, I have two data sets (Replication 1 and 2) and I want that Replication is random

Re: [R] ranking a vector in R

2012-06-21 Thread Prof Brian Ripley
On 21/06/2012 07:24, Petr Savicky wrote: On Thu, Jun 21, 2012 at 12:24:47AM +0200, Jessy wrote: Hello, May someone help me with how in R I can rank a vector from highest to lowest. i.e rank 1 (smallest rank) is given to the highest value instead of the usual way that it get's the highest rank

Re: [R] reshape

2012-06-21 Thread arun
Hi Toby, Since your original intention is to get separate columns for VWC and Tair, this code might be helpful to you if the missing values are similar in other excel sheets. toymelt1<-melt(toy,id=c("year","month","day","hhmm","plot","trt")) #jim's code toymelt1$type <- sub("\\..*$", "", toy

[R] check.k function in mgcv packages

2012-06-21 Thread ywh123
Hi,everyone, I am studying the generalized additive model and employ the package 'mgcv' developed by professor Wood. However,I can not understand the example listed in check.in function. For example, library(mgcv) set.seed(1) dat <- gamSim(1,n=400,scale=2) ## fit a GAM with quite low `k' b<-gam

[R] How can I choose the link function in function 'gam' in MGCV packages?

2012-06-21 Thread ??
Hi,Dear R users, I am studying the generalized additive model and employ the 'mgcv' packages in R.For example,I want to conduct the empirical study.The dependent variable is GDP and the independent variable is foreign direct investment.How can I choose the best link function and the family

Re: [R] ranking a vector in R

2012-06-21 Thread arun
Hi, > dat<-c(5,4,3,12,15) > rank(-dat) [1] 3 4 5 2 1 > rank(dat) [1] 3 2 1 4 5 A.K. - Original Message - From: Jessy To: r-help@r-project.org Cc: Sent: Wednesday, June 20, 2012 6:24 PM Subject: [R] ranking a vector in R Hello, May someone help me with how in R I can rank a vector

Re: [R] ranking a vector in R

2012-06-21 Thread Christian Brechbühler
On Wed, Jun 20, 2012 at 6:24 PM, Jessy wrote: > May someone help me with how in R I can rank a vector from highest to > lowest. i.e rank 1 (smallest rank) is given to the highest value instead > of the usual way that it get's the highest rank. > How about rank(-v), e.g., > > rank(-c(3,1,4,6,5)