[R] How to request AIC information from lm object?

2006-06-09 Thread Michael
Can lm return AIC information? Thanks a lot! [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] How to request AIC information from lm object?

2006-06-09 Thread Christian Ritz
Hi Michael, use: extractAIC to get AIC from an lm object: y - rnorm(10) extractAIC(lm(y~1)) Christian __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] How to request AIC information from lm object?

2006-06-09 Thread ronggui
You can use AIC to get what you want. #example from lm help page ctl - c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt - c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group - gl(2,10,20, labels=c(Ctl,Trt)) weight - c(ctl, trt) anova(lm.D9 - lm(weight ~

Re: [R] [Fwd: R 2.20 Windows XP anaolgue of Splus unix() command ?]

2006-06-09 Thread ronggui
In my windows XP there is no read command as well,so the _ unix(read stuff)_ will not wor as what _system_ function does is to pass the 'read stuff' command argument to the system command. I guess the read command to specific to some Unix OS. Hope this helps. 2006/6/9, [EMAIL PROTECTED]

Re: [R] X'W in Matrix

2006-06-09 Thread Douglas Bates
On 6/9/06, Rafael A. Irizarry [EMAIL PROTECTED] wrote: Hi! I have used the Matrix package (Version: 0.995-10) successfully to obtain the OLS solution for a problem where the design matrix X is 44000x6000. X is very sparse (about 8 non-zeros elements). Now I want to do WLS: (X'WX)^-1X'Wy

[R] script for multi linear regression

2006-06-09 Thread Wagner Costa
Hi, I am trying to write a function in R that receives one array (y) and one list of arrays (mylist.of.array) with one or more arrays I need get y in function of the arrays in mylist.of.array . I am a newbie in R so I tryed the line bellow, that obviosly does not work g-lm(y~ mylist.of.array)

Re: [R] Re-binning histogram data

2006-06-09 Thread Chris Evans
François Pinard sent the following at 09/06/2006 00:53: [Berton Gunter] I would argue that histograms are outdated relics and that density plots (whatever your favorite flavor is) should **always** be used instead these days. When a now retired researcher paid us a visit, I showed him

Re: [R] make check errors for R-2.3.1

2006-06-09 Thread Paul Roebuck
On Thu, 8 Jun 2006, Luo Weijun wrote: I tried to build R-2.3.1 from source under Mac OS X 10.4.6. (I am doing so because only this way I can get the 64-bit version of R) The configure and make steps look fine. But I got errors when I did make check-all, here is the message: running code

Re: [R] script for multi linear regression

2006-06-09 Thread jim holtman
g - lapply(x, function(z) lm(y ~ z)) On 6/9/06, Wagner Costa [EMAIL PROTECTED] wrote: Hi, I am trying to write a function in R that receives one array (y) and one list of arrays (mylist.of.array) with one or more arrays I need get y in function of the arrays in mylist.of.array . I am a

[R] HTML nsmall vector format problem

2006-06-09 Thread john seers \(IFR\)
Hello All I am having a bit of trouble formatting my HTML with the desired number of digits after the decimal place. Am I doing something wrong/misunderstanding or is it a bug? Looking at the example supplied with ?HTML.data.frame: HTML(iris[1:2,1:2],nsmall=c(3,1),file=) Gives html

[R] barplot dataframes w/ varying dimensions

2006-06-09 Thread Albert Vilella
Hi all, I would like to do a barplot of a dataframe like this one: alfa beta gamma delta qwert 56.5 58.5 56.5 58.5 asdfg 73.0 73.0 43.0 73.0 zxcvb 63.0 63.0 43.0 63.0 yuiop 63.0 63.0 43.0 63.0 with the labels of the rows and columns. I would like to have something

Re: [R] HTML nsmall vector format problem

2006-06-09 Thread tshort
John, I don't think nsmall uses a vector. Try the following with format (which HTML.data.frame uses): format(iris[1:2,1:2],nsmall=c(3,1)) Sepal.Length Sepal.Width 15.100 3.500 24.900 3.000 It looks like you'll have to do a format column by column with a loop. -

[R] appending arrays

2006-06-09 Thread antonio rodriguez
Hi All, I have 2 arrays: dim(a1) [1] 3 23 23 dim(a2) [1] 3 23 23 And I want a new array, to say, a3, where: dim(a3) [1] 6 23 23 where the first dimension is supposed to be (months) so the resultating array would start in jan and finish in june. Best regards, Antonio

Re: [R] barplot dataframes w/ varying dimensions

2006-06-09 Thread Marc Schwartz
On Fri, 2006-06-09 at 06:05 -0500, Marc Schwartz wrote: On Fri, 2006-06-09 at 11:26 +0100, Albert Vilella wrote: Hi all, I would like to do a barplot of a dataframe like this one: alfa beta gamma delta qwert 56.5 58.5 56.5 58.5 asdfg 73.0 73.0 43.0 73.0 zxcvb

Re: [R] barplot dataframes w/ varying dimensions

2006-06-09 Thread Marc Schwartz
On Fri, 2006-06-09 at 11:26 +0100, Albert Vilella wrote: Hi all, I would like to do a barplot of a dataframe like this one: alfa beta gamma delta qwert 56.5 58.5 56.5 58.5 asdfg 73.0 73.0 43.0 73.0 zxcvb 63.0 63.0 43.0 63.0 yuiop 63.0 63.0 43.0 63.0 with

[R] appending arrays

2006-06-09 Thread antonio rodriguez
Hi All, I have 2 arrays: dim(a1) [1] 3 23 23 dim(a2) [1] 3 23 23 And I want a new array, to say, a3, where: dim(a3) [1] 6 23 23 where the first dimension is supposed to be (months) so the resultating array would start in jan and finish in june. Best regards, Antonio -- = Por favor,

Re: [R] HTML nsmall vector format problem

2006-06-09 Thread john seers \(IFR\)
Hi Tom Thanks for the reply. I see what you are saying - that format does not format using an nsmall vector, though the documentation (of HTML.data.frame) and the example suggest nsmall uses a vector. Even if I went through and changed the columns with a loop the HTML.data.frame would

Re: [R] barplot dataframes w/ varying dimensions

2006-06-09 Thread Petr Pikal
Hi something like tab alfa beta gamma delta qwert 56.5 58.5 56.5 58.5 asdfg 73.0 73.0 43.0 73.0 zxcvb 63.0 63.0 43.0 63.0 yuiop 63.0 63.0 43.0 63.0 barplot(as.matrix(tab), beside=T, legend.text=T) HTH Petr On 9 Jun 2006 at 11:26, Albert Vilella wrote: From:

Re: [R] HTML nsmall vector format problem

2006-06-09 Thread Short, Tom
John, you can use format ahead of time (this converts to character columns, so HTML won't reformat), and then use HTML: z=format(iris[1:2,1:2],nsmall=3) z[,2]=format(iris[1:2,2],nsmall=1) HTML(z,file=) - Tom -Original Message- From: john seers (IFR) [mailto:[EMAIL PROTECTED]

Re: [R] appending arrays

2006-06-09 Thread Ben Bolker
antonio rodriguez antonio.raju at gmail.com writes: I have 2 arrays: dim(a1) [1] 3 23 23 dim(a2) [1] 3 23 23 And I want a new array, to say, a3, where: dim(a3) [1] 6 23 23 You can (1) figure out how to transpose the arrays (?aperm), put them together with c(), and re-array()

[R] deal with R.package panel

2006-06-09 Thread Pavel Khomski
hello! my question conserns with use of panel package (written by R.C.Gentlman) (unfortunately the manual and help sites are very short) 1. is it possible to do analysis just without a(ny) covariate? i suggest do it by introducing a covariate with level=0 in all obervations, this because of

Re: [R] Re-binning histogram data

2006-06-09 Thread Duncan Murdoch
On 6/8/2006 11:51 AM, Berton Gunter wrote: I would argue that histograms are outdated relics and that density plots (whatever your favorite flavor is) should **always** be used instead these days. But my favourite density plot is a histogram! I agree that computational complexity should weigh

[R] sqlSave() and rownames=TRUE makes my Rgui crash

2006-06-09 Thread Lapointe, Pierre
Hello, I created a table in MySQL with this command CREATE TABLE example (pk INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(pk), id VARCHAR(30),col1 VARCHAR(30),col2 VARCHAR(30)) ### In R, I can connect to this table: library(DBI) library(RODBC) chan - odbcConnect(MySQL51, uid=root, pwd=xxx) first

Re: [R] Re-binning histogram data

2006-06-09 Thread roger koenker
On Jun 9, 2006, at 7:38 AM, Duncan Murdoch wrote: Now, if you were to suggest that the stem() function is a bizarre simulation of a stone-age tool on a modern computer, I might agree. But as a stone-age (blackboard) tool it is unsurpassed. It is the only bright spot in the usually

Re: [R] HTML nsmall vector format problem

2006-06-09 Thread john seers \(IFR\)
Hi Tom Excellent! Exactly what I need. I see what you mean now. Thanks very much for your help. John --- John Seers Institute of Food Research Norwich Research Park Colney Norwich NR4 7UA tel +44 (0)1603 251497 fax +44 (0)1603 507723 e-mail [EMAIL PROTECTED]

[R] Date calculation

2006-06-09 Thread stat stat
Dear all R users, Suppose I have a data frame data like this: 5/2/2006 36560 5/3/2006 36538 5/4/2006 36452 5/5/2006 36510 5/8/2006 36485 5/9/2006 36502 5/10/2006 36584 5/11/200636571 Now I want to create a for loop like this: date =

[R] Rotate values on Y axis

2006-06-09 Thread d d [EMAIL PROTECTED] ac uk
Hi, I have been working through one of the examples on the FAQ about rotating the labels on the x axis, I need to do the same but for the y axis. I have managed to change some of the code, but I am still not getting there, there is still something wrong. My syntax is as follows: par(mar =

[R] generate random data

2006-06-09 Thread hugues
Dear R-Help, As with the rpois() function to generate random data from a poisson distribution, I need to generate random data from a quasi distribution with var=mu^2. Does anyone known how to do this? Thanks in advance, Hugues SANTIN-JANIN. [EMAIL PROTECTED] [[alternative HTML

Re: [R] sqlSave() and rownames=TRUE makes my Rgui crash

2006-06-09 Thread Duncan Murdoch
On 6/9/2006 8:51 AM, Lapointe, Pierre wrote: Hello, I created a table in MySQL with this command CREATE TABLE example (pk INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(pk), id VARCHAR(30),col1 VARCHAR(30),col2 VARCHAR(30)) ### In R, I can connect to this table: library(DBI)

Re: [R] Rotate values on Y axis

2006-06-09 Thread Marc Schwartz
On Fri, 2006-06-09 at 14:13 +0100, d d [EMAIL PROTECTED] ac uk wrote: Hi, I have been working through one of the examples on the FAQ about rotating the labels on the x axis, I need to do the same but for the y axis. I have managed to change some of the code, but I am still not getting

Re: [R] sqlSave() and rownames=TRUE makes my Rgui crash

2006-06-09 Thread Lapointe, Pierre
On 6/9/2006 8:51 AM, Lapointe, Pierre wrote: Hello, I created a table in MySQL with this command CREATE TABLE example (pk INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(pk), id VARCHAR(30),col1 VARCHAR(30),col2 VARCHAR(30)) ### In R, I can connect to this table: library(DBI)

Re: [R] Date calculation

2006-06-09 Thread Jacques VESLOT
test V1V2 1 5/2/2006 36560 2 5/3/2006 36538 3 5/4/2006 36452 4 5/5/2006 36510 5 5/8/2006 36485 6 5/9/2006 36502 7 5/10/2006 36584 8 5/11/2006 36571 dates - strptime(test$V1, %d/%m/%Y) --- Jacques VESLOT CNRS

Re: [R] Date calculation

2006-06-09 Thread Gabor Grothendieck
Try this: Lines - 5/2/2006 36560 5/3/2006 36538 5/4/2006 36452 5/5/2006 36510 5/8/2006 36485 5/9/2006 36502 5/10/2006 36584 5/11/200636571 DF - read.table(textConnection(Lines), as.is = TRUE) fmt - %m/%d/%Y DF[,1] - as.Date(DF[,1], fmt) date -

Re: [R] sqlSave() and rownames=TRUE makes my Rgui crash

2006-06-09 Thread Duncan Murdoch
On 6/9/2006 9:42 AM, Lapointe, Pierre wrote: On 6/9/2006 8:51 AM, Lapointe, Pierre wrote: Hello, I created a table in MySQL with this command CREATE TABLE example (pk INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(pk), id VARCHAR(30),col1 VARCHAR(30),col2 VARCHAR(30)) ### In R, I can

[R] binomial lmer and fixed effects

2006-06-09 Thread Martin Henry H. Stevens
Hi Folks, I think I have searched exhaustively, including, of course R-help (D. Bates, S. Graves, and others) and but I remain uncertain about testing fixed effects with lmer(..., family=binomial). I gather that mcmcsamp does not work with Do we rely exclusively on z values of model

Re: [R] sqlSave() and rownames=TRUE makes my Rgui crash

2006-06-09 Thread Lapointe, Pierre
On 6/9/2006 9:42 AM, Lapointe, Pierre wrote: On 6/9/2006 8:51 AM, Lapointe, Pierre wrote: Hello, I created a table in MySQL with this command CREATE TABLE example (pk INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(pk), id VARCHAR(30),col1 VARCHAR(30),col2 VARCHAR(30)) ### In R, I can connect

Re: [R] [Fwd: R 2.20 Windows XP anaolgue of Splus unix() command ?]

2006-06-09 Thread Dave Armstrong
Mark, I don't know how many of these files you have, so this may not be a viable solution, but what if you changed the function wait to be something like the following: wait - function() par(ask=T) for(i in 1:100){ plot(rnorm(100) ~ rnorm(100)) wait() } So, in general, this is not a solution

Re: [R] binomial lmer and fixed effects

2006-06-09 Thread Dimitris Rizopoulos
AFAIK likelihood ratio tests are preferable, especially when you're interested in testing several fixed-effects simultaneously. However, since in GLMMs the likelihood cannot be calculated explicitly one could wonder how does this affect LRTs. Adaptive Gaussian quadrature is know to provide the

[R] Mod function?

2006-06-09 Thread Kerpel, John
Hi Folks! I need to execute a piece of R code inside a loop, say, every fourth time my counter increases (it increases by 1 unit each time.) Is there any sort of mod function in R to do this? Or is this done some other way? Many thanks! Best, john [[alternative HTML

[R] How add degree character in axis?

2006-06-09 Thread fernando espindola
Hi user R, I am try to put degree character in axis x, but don't make this. I have the next code: plot(mot[,5], time1,xlim=c(-45,-10),type=l,yaxt=n,ylab=,col=1,lwd=2,xlab=,xaxt=n) The range of value in axis-x is -45 to -10, this values represents the longitudes positions in space. I try

[R] Saving dns2.plot as a jpg image

2006-06-09 Thread Martin Heller
Hello, I am using R 2.2.1 with sn 0.4.0 and am trying to save a dns2.plot as a jpg file. Here is the latest version of the code I have tried: x - seq(0,200,length=200) y - seq(0, 35, length=200) jpeg(filename = C:/fig1.jpg, width = 5, height = 4,pointsize = 12, quality = 100, bg = white, res =

[R] reverse variables

2006-06-09 Thread David Hajage
Hello useRs, Is there a way to reverse values of 2 variables (like with the language Python) ? : a - 1 b - 2 a, b - b, a More specifically, I have a data frame : famnum generation germain1 germain2 fa mo ptpn1 ptpn2 drb11 drb12 1 2 200 201 101 102 1 1

Re: [R] apologies if you aready received this ?

2006-06-09 Thread Thomas Lumley
On Thu, 8 Jun 2006, [EMAIL PROTECTED] wrote: Hi Everyone : As I mentioned earlier, I am taking a lot of Splus code and turning into R and I've run into another stumbling block that I have not been able to figure out. I did plotting in a loop when I was using Splus on unix and the way I

[R] Postscript output encoding on Windows

2006-06-09 Thread Jamie Lawrence
With R 2.3.1 on Windows, I've noticed that it defaults to the WinAsci.enc encoding, which throws up an error when viewed with the default install of GhostScript/GSView (versions 8.51/4.7 respectively). I didn't have this problem prior to upgrading to 2.3.1 as I can view all my old PS graphs

Re: [R] reverse variables

2006-06-09 Thread Gabor Grothendieck
There is a function here: http://tolstoy.newcastle.edu.au/R/help/04/06/1430.html that will facilitate this sort of construct: a - 1; b - 2 list[b,a] - list(a,b) a; b # 2 1 On 6/9/06, David Hajage [EMAIL PROTECTED] wrote: Hello useRs, Is there a way to reverse values of 2 variables (like

[R] How can i add a color bar with base package

2006-06-09 Thread Yves Magliulo
Hi, I'm trying to find this for 3 hours now so i come here to find any help. How can I add a color bar to show the color scales to what is generated by image(), similar to the one in figures generated by filled.contour() using only the base package although i know there is solution with

Re: [R] deal with R.package panel

2006-06-09 Thread Robert Gentleman
Hi, There should be a 20 page pdf document in the doc directory, distributed with the package. That answers most of these questions. Also, please read the posting guide so that you give enough information to actually have some chance of answering your questions, best wishes Robert

Re: [R] Re-binning histogram data

2006-06-09 Thread Berton Gunter
Charles: To be fair ... both histograms and densityplots are nonparametric density estimators whose appearance and effectiveness are dependent on various parameters. Neither are immune from misleading due to a poor choice of the parameters. For histograms they are the bin boundaries; for kde's

Re: [R] Saving dns2.plot as a jpg image

2006-06-09 Thread Larry Howe
You don't say what OS you are using, or whether you are getting any messages or errors. http://www.R-project.org/posting-guide.html Larry Howe On Friday June 9 2006 11:00, Martin Heller wrote: Hello, I am using R 2.2.1 with sn 0.4.0 and am trying to save a dns2.plot as a jpg file. Here is

[R] glm with negative binomial family

2006-06-09 Thread Elizabeth Rainwater
I am analysing parasite egg count data and am having trouble with glm with a negative binomial family. In my first data set, 55% of the 3000 cases have a zero count, and the non-zero counts range from 94 to 145,781. Eventually, I want to run bic.glm, so I need to be able to use glm(family=

Re: [R] deal with R.package panel

2006-06-09 Thread Robert Gentleman
I just realized that the pdf on CRAN is corrupt, a new package has been uploaded and will percolate through over the next few days, one supposes. Robert Gentleman wrote: Hi, There should be a 20 page pdf document in the doc directory, distributed with the package. That answers most of

Re: [R] Postscript output encoding on Windows

2006-06-09 Thread Prof Brian Ripley
It is WinAnsi, not WinAsci, and that may well be your problem. Vanilla R 2.3.1 uses WinAnsi (I have just re-checked), so there is `something strange about my installation'. On Fri, 9 Jun 2006, Jamie Lawrence wrote: With R 2.3.1 on Windows, I've noticed that it defaults to the WinAsci.enc

Re: [R] glm with negative binomial family

2006-06-09 Thread Prof Brian Ripley
Did you consult the help page for neg.bin? Details: These are not intended to be called by the user. Some are for compatibility with earlier versions of MASS (the book). The book discusses the family negative.binomial() on p.206, and it is that which glm.nb uses. On Fri, 9 Jun

[R] quantile() with weights

2006-06-09 Thread Wouter
Hi list, I'm looking for a way to calculate quantiles (such as in quantile()), but with the ability to assign a different weight to each member of the sample vector. It is possible to write it out completely, but maybe there is a dedicated function out somewhere... cheers Wouter

Re: [R] X'W in Matrix

2006-06-09 Thread Rafael A Irizarry
Doug, I did mean wX = crossprod(X, W). sorry about that. Thanks for the suggestions and for the *very* useful package. Im still smiling about inverting a 6000x6000 matrix in one second with on line of R code. Best wishes, -r Douglas Bates wrote: On 6/9/06, Rafael A. Irizarry [EMAIL

Re: [R] How add degree character in axis?

2006-06-09 Thread Roger D. Peng
Take a look at ?plotmath. -roger fernando espindola wrote: Hi user R, I am try to put degree character in axis x, but don't make this. I have the next code: plot(mot[,5], time1,xlim=c(-45,-10),type=l,yaxt=n,ylab=,col=1,lwd=2,xlab=,xaxt=n) The range of value in axis-x is -45 to

[R] date.mdy in date package

2006-06-09 Thread Brian Scholl
I'm having a problem with output from date.mdy in the date package. Goal: to take a long vector of dates of the form 01/22/99 and extract values month=01, day=22, year=1999. I am providing the vector of class dates in the attached file to date.mdy:

Re: [R] quantile() with weights

2006-06-09 Thread Sundar Dorai-Raj
Wouter wrote: Hi list, I'm looking for a way to calculate quantiles (such as in quantile()), but with the ability to assign a different weight to each member of the sample vector. It is possible to write it out completely, but maybe there is a dedicated function out somewhere...

Re: [R] quantile() with weights

2006-06-09 Thread Sundar Dorai-Raj
Wouter wrote: Hi list, I'm looking for a way to calculate quantiles (such as in quantile()), but with the ability to assign a different weight to each member of the sample vector. It is possible to write it out completely, but maybe there is a dedicated function out somewhere...

[R] function parameters - testing

2006-06-09 Thread Larry Howe
Hello, I am trying to test a function argument to see if it is or is not a useful number. However I cannot seem to find a test that works. For example f = function(x) { + print(exists(x)) + print(is.null(x)) + } rm(x) f(z) [1] TRUE Error in print(is.null(x)) : Object z not found exists

Re: [R] function parameters - testing

2006-06-09 Thread Sundar Dorai-Raj
Larry Howe wrote: Hello, I am trying to test a function argument to see if it is or is not a useful number. However I cannot seem to find a test that works. For example f = function(x) { + print(exists(x)) + print(is.null(x)) + } rm(x) f(z) [1] TRUE Error in

Re: [R] How add degree character in axis?

2006-06-09 Thread Marc Schwartz (via MN)
On Fri, 2006-06-09 at 11:01 +, fernando espindola wrote: Hi user R, I am try to put degree character in axis x, but don't make this. I have the next code: plot(mot[,5], time1,xlim=c(-45,-10),type=l,yaxt=n,ylab=,col=1,lwd=2,xlab=,xaxt=n) The range of value in axis-x is -45 to

Re: [R] glm with negative binomial family

2006-06-09 Thread Elizabeth Rainwater
Many thanks to Dr Ripley, who told me to use negative.binomial instead of neg.bin, and to Dr Lancelot, who pointed toward the excellent aod. My models are now converging and the output I am getting seems reasonable. Cheers, Elizabeth On 6/9/06, Prof Brian Ripley [EMAIL PROTECTED] wrote: Did you

Re: [R] function parameters - testing

2006-06-09 Thread Gabor Grothendieck
x exists within the function f so the first print is TRUE; however, exists does not try to evaluate it. is.null does try to evaluate it and so at that point it discovers the error. Perhaps you want this: f - function(x) if (exists(deparse(substitute(x print(is.null(x)) else print(none) if

[R] question about using ancova in R to do variable selection

2006-06-09 Thread James Anderson
Hi, I have a microarray data which has about 1 genes and 15 measurements. The 15 measurements contain 6 control, 3 low dose, 3 medium dose, 3 high dose. If I treat the dose level as a continuous variable, how can I use ANCOVA to do gene selection? (I mean to select those genes that

[R] seeing the code that is called inside a function

2006-06-09 Thread markleeds
this is probably a bad question but if you type a function name( the function is from a package ) at an R prompt and you see that the main work of the function is done by a fortran call (.Fortran ), is it possible to see the fortran code ? i am using windows xp and R-2.20 but i doubt that

Re: [R] seeing the code that is called inside a function

2006-06-09 Thread Gabor Grothendieck
1. Google for: CRAN mypkg where the package is called mypkg and then download and 2. unpack the .tar.gz from there: tar xfvz mypkg_0.1-1.tar.gz (replace with correct filename) On 6/9/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: this is probably a bad question but if you type a function

[R] interaction terms in regression analysis

2006-06-09 Thread John S. Walker
G'day, My problem is I'm not sure how to extract effect sizes from a nonlinear regression model with a significant interaction term. My data sets are multiple measurements of force response to an agonist with two superimposed treatments each having two levels. This is very similar to the

Re: [R] function parameters - testing

2006-06-09 Thread Larry Howe
On Friday June 9 2006 16:06, Sundar Dorai-Raj wrote: Larry Howe wrote: This works because x exists in the function f. Perhaps you want this instead? f - function(x) { print(deparse(substitute(x))) print(exists(deparse(substitute(x print(is.null(x)) invisible() } Your

[R] Quantile Regressions/Multi-stage complex survey design

2006-06-09 Thread Neil KM
Hello, I am utilizing linear quantile regression models to analyze health survey data. The survey (NHANES) is a multi-stage complex survey and I want to incorporate survey sampling weights in generating my quantile estimates. To my knowledge, this is currently not possible in SAS or STATA. Is

[R] multiple return values and optimization

2006-06-09 Thread paul sorenson
I have a function (masheff) which returns a value which I can optimize no problem, eg: optimize(masheff, c(15,30), maximum=TRUE, m_gd=5.13, v_tot=41, e_c=1.0) I would like masheff() to return multiple values say as a list with named elements like so: v = masheff(...) v$eff v$extract etc Is

Re: [R] multiple return values and optimization

2006-06-09 Thread Gabor Grothendieck
optimize will preserve attributes so try this: f - function(x) structure(x^2, cubed = x^3) optimize(f, c(-1, 1)) On 6/9/06, paul sorenson [EMAIL PROTECTED] wrote: I have a function (masheff) which returns a value which I can optimize no problem, eg: optimize(masheff, c(15,30), maximum=TRUE,

[R] Regex engine types

2006-06-09 Thread Patrick Connolly
version _ platform x86_64-unknown-linux-gnu arch x86_64 os linux-gnu system x86_64, linux-gnu status major2 minor2.1 year 2005

[R] Math symbols for labels in Perspective plots

2006-06-09 Thread Cal Stats
Hi .. I would like to have math symbols in perspective plots i tried : persp(x,y,z,xlab=expression(phi)) but it plots it as phi. Thanks. Harsh __ [[alternative HTML version deleted]]

Re: [R] Regex engine types

2006-06-09 Thread Gabor Grothendieck
I get the same thing on Version 2.3.1 Patched (2006-06-04 r38279) but on R version 2.2.1, 2005-12-20 it gives character(0), as expected, so there is some change between versions of R. I am on Windows XP. On 6/9/06, Patrick Connolly [EMAIL PROTECTED] wrote: version _ platform