Re: [R] p-value from GEE why factor 2*pnorm?

2007-06-12 Thread Carmen Meier
Benilton Carvalho schrieb: Well, AFAIK, the definition of a p-value is the probability of observing something at least as extreme as the observed data. If you observed z, and Z follows a std-normal p-value = P( Z -abs(z) ) + P( Z abs(z) ) = 2*P ( Z abs(z) ) = 2*pnorm(z,

Re: [R] p-value from GEE why factor 2*pnorm?

2007-06-11 Thread Carmen Meier
I got an answer for the other question (thank you) But there is another question (I am afraid this is a basic question ...) In this tread there is a hint hwo to calculate the p-vlue of an GEE: _http://finzi.psych.upenn.edu/R/Rhelp02a/archive/74150.html_ Then, get the P values using a normal

Re: [R] p-value from GEE why factor 2*pnorm?

2007-06-11 Thread Carmen Meier
Benilton Carvalho schrieb: the recommendation was to use lower.tail=FALSE. b O but then the results are significant and this does not match the observation. The results are matching the observations if the formula is

[R] pnorm how to decide lower-tail true or false

2007-06-08 Thread Carmen Meier
Hi to all, maybe the last question was not clear enough. I did not found any hints how to decide whether it should use lower.tail or not. As it is an extra R-feature ( written in http://finzi.psych.upenn.edu/R/Rhelp02a/archive/66250.html ) I do not find anything about it in any statistical books

[R] where is the NIR dataset?

2007-01-10 Thread Carmen Meier
I did just the download of the pls package, but the NIR dataset is not available require(pls) [1] TRUE data(NIR) Warning message: data set 'NIR' not found in: data(NIR) is there another package with the dataset for the examples? With regards Carmen

Re: [R] ks.test greater and less

2006-12-17 Thread Carmen Meier
Prof Brian Ripley schrieb: On Sat, 16 Dec 2006, R. Villegas wrote: 2006/12/15, Carmen Meier [EMAIL PROTECTED]: Hello r-group I have a question to the ks.test. I would expect different values for less and greater between data1 and data2. Does anybody could explain my point

Re: [R] ks.test greater and less

2006-12-16 Thread Carmen Meier
R. Villegas schrieb: 2 data1-c(8,12,43,70) data2- c(70,43,12,8) is the same for ks.test, isn't it? Yes, it's the same. Wich version of R have you?. 2.4.0 Carmen __ R-help@stat.math.ethz.ch mailing list

[R] ks.test greater and less

2006-12-15 Thread Carmen Meier
Hello r-group I have a question to the ks.test. I would expect different values for less and greater between data1 and data2. Does anybody could explain my point of misunderstanding the function? data1-c(8,12,43,70) data2- c(70,43,12,8) ks.test(data1,pnorm) ks.test(data1,pnorm,alternative

[R] bind data.frames seperately

2006-12-05 Thread Carmen Meier
Hi to all, I would like to bind data1 and data2 (both are coming from an Excel sheet) but only the data rows using rbind will cause double names and value. but I need only add the data.rows and the rest of the names and values should be NA value.1=c(a,b,c,d,5:54) # building similar

[R] error using environment(f) - NULL

2006-12-02 Thread Carmen Meier
Hi To all, I found in the tread http://finzi.psych.upenn.edu/R/Rhelp02a/archive/46740.html the reply for / y - 3 / / f - function(x) y / / environment(f) - NULL / / f(1) /but this example (R 2.4.0) will cause an error: The use of the NULL environment is not longer possible (translated) The

Re: [R] writing function with ,... )

2006-12-01 Thread Carmen Meier
Thanks, a lot I was not able to find it the hole day ... Carmen Phil Spector schrieb: Carmen - You certainly can write functions that use ..., but you need to extract the arguments that the dots represent with list(). Here's a modified version of your function that may help explain how

[R] writing function with ,... )

2006-11-30 Thread Carmen Meier
Hi to all I did not found the right hints for functions with the dot-dot-dot argument. Is it possible to write own functions with the tree dots and if yes what's wrong with the following example? test - function(x, ...) { print (x) if (exists(y))print(y) if (exists(z))print(z) } test(4,y=2)

[R] String question

2006-11-29 Thread Carmen Meier
Hi to all I would to determinate whether bits is a binary code and I would to find out the which bit is set to 1 bits -00110110 I found to detect whether there are only numbers all.digits(bits) but is there any function to detect whether there are only 0 and 1 in the string And how could I get

Re: [R] don't put line in plot

2006-11-24 Thread Carmen Meier
fernando espindola schrieb: Hi R-user, I have a problem when try to run the next code: plot(prueba$IC, type=l) but plot with type=p, there not problem, I don't know what is the problem?? Anybody can help me normally there is no problem with type=l maybe you should send a

Re: [R] axis command and excel time format

2006-11-10 Thread Carmen Meier
Carmen, Gabor has already given you the detail you ask for, but might try the following plot to see what is going wrong: plot(times(tt), x, type='l') This does not give you the EXACT control of the axis you asked for, but this simple plot command gives you a fairly nice result. It

[R] Question about error message - or is it a bug?

2006-11-10 Thread Carmen Meier
Hi to all ... the same code, but another question. I changed only the type='n' to type='l' and debugged the function xy.coords. with type = 'l' : there are the correct values of x and y inside the function xy.coords but the y value is filled with NA seems that the length is matching now because

[R] axis command and excel time format

2006-11-08 Thread Carmen Meier
Hi to all, I have some problems to get the times-scale to the x-axis the times are coming from an excel sheet f. e [1] 0:01:00 0:02:00 0:03:00 0:04:00 0:05:00 0:06:00 0:07:00 [8] 0:08:00 0:09:00 0:10:00 0:11:00 0:12:00 0:13:00 0:14:00 [15] 0:15:00 0:16:00 0:17:00 0:18:00 0:19:00 0:20:00 0:21:00

Re: [R] axis command and excel time format

2006-11-08 Thread Carmen Meier
Thank you for your reply Gabor, sure, the manually written axis works fine in any configuration. but I would prefer an automatic input. That means that I would like to use the datafield[1] for the minimum time and the datafield[max] (means the last one) for the maximum time. divided into x

Re: [R] axis command and excel time format

2006-11-08 Thread Carmen Meier
Gabor Grothendieck schrieb: Is the problem how to produce an axis with a given minimum tick, maximum tick and given number of ticks? In that case try this yes but ... ;-) I started with an plain R gui library(zoo) library(chron) # input data # z is from original example mn - times(23:00:00) mx

Re: [R] axis command and excel time format

2006-11-08 Thread Carmen Meier
Gabor Grothendieck schrieb: My understanding is that the main point of your post was how to get times on the X axis. hopefully at this point its clear how to do that and you can come up with some algorithm to put whatever points you want on. That´s right thank you Here is a slight

Re: [R] axis command and excel time format

2006-11-08 Thread Carmen Meier
Yes this one works, but (sorry) in the OP there was a plot without data to define the range So I tried to use your working suggestion in that manner: library(zoo) library(chron) time - c(2:25:00,2:26:00,2:27:00,2:28:00,2:29:00,2:30:00,2:31:00,

Re: [R] axis command and excel time format

2006-11-08 Thread Carmen Meier
Gabor Grothendieck schrieb: Your code plots x which has nothing to do with xt. The same result if you change xt to x: 02:25 at the origin nothing else - I do not know why #-- your suggestion mn - times(min_time) mx - times(max_time) n - 12 t - times(seq(mn, mx, length =

Re: [R] axis command and excel time format

2006-11-08 Thread Carmen Meier
Gabor Grothendieck schrieb: Please provide a complete self contained example. I can't follow the partial code below; however, its likely you are plotting one thing and creating axes using another so there is no reason it should come out right. You are right .. seems to be that it was too