similar to: Floating point maths in R

Displaying 19 results from an estimated 19 matches similar to: "Floating point maths in R"

2009 Aug 12
1
what is the difference between the two logistic models?
Hi All, I have data with 400 individuals and the following information Grade: pass or fail coded as 1 for pass and 0 for fail Sex: male or female ( coded as 1 for male and 2 for female ) Age Teaching.method : can be 1,2,3 I want to fit a logistic regression where the outcome if (1=pass or 0 for fail) and the rest of the variables are the regressors. My question is that I am not sure
2013 Apr 11
2
Read the data from a text file and reshape the data
I have a data set for different time intervals. The data has three comment lines before data for each time interval. For each time interval there are 500 data points. I want to change the dataset such that I have the following format: t1 t2 t3 ................ 0.00208 0.00417 0.00625 ................. a1 a2 a3 ...................
2005 Mar 15
1
question on xyplot
Dear All: In the attached file, I have 3 group patients, and there are 5 in each group (the groups are decided by the prefix of the idno). I want draw a repeat measurement comparison figure. My goal is to list 5 patients from same group on one horizontal line. But xyplot sounds pick them randomly (or I was confused?). Could you please help me modify the following code to accomplish this?
2011 Aug 29
1
MuMIn Problem getting adjusted Confidence intervals
Hello R users I'm using MuMIn but for some reason I'm not getting the adjusted confidence interval and uncoditional SE whe I use model.avg(). I took into consideration the steps provided by Grueber et al (2011) Multimodel inference in ecology and evolution: challenges and solutions in JEB. I created a global model to see if malaria prevalence (binomial distribution) is related to any
2005 Mar 16
2
how to draw xyplot figure like figure 4.18 of MASS (4th) ?
Dear All: Could you please tell me how I can draw figure formatted like figure 4.18 of MASS (4th) with the attached data set? Thanks Zhongming Yang --------------------------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sample.txt Url: https://stat.ethz.ch/pipermail/r-help/attachments/20050316/abfdb85e/sample.txt
2007 Feb 10
2
error using user-defined link function with mixed models (LMER)
Greetings, everyone. I've been trying to analyze bird nest survival data using generalized linear mixed models (because we documented several consecutive nesting attempts by the same individuals; i.e. repeated measures data) and have been unable to persuade the various GLMM models to work with my user-defined link function. Actually, glmmPQL seems to work, but as I want to evaluate a suite of
2006 Feb 12
1
floor and ceiling can't handle more than 15 decimal places (PR#8590)
Full_Name: Ben Phalan Version: 2.2.1 OS: Win XP Submission from: (NULL) (131.111.111.231) I have noticed that floor returns the wrong number when there are more than 15 decimal places: > floor(6.999999999999999) [1] 6 > floor(6.9999999999999999) [1] 7 There is a similar problem with ceiling, so this may apply to all/most rounding functions? > ceiling (2.000000000000001) [1] 3 >
2006 Feb 12
0
floor and ceiling can't handle more than 15 decimal pla (PR#8591)
On 12-Feb-06 benphalan at gmail.com wrote: > Full_Name: Ben Phalan > Version: 2.2.1 > OS: Win XP > Submission from: (NULL) (131.111.111.231) > > > I have noticed that floor returns the wrong number when there are more > than 15 > decimal places: > >> floor(6.999999999999999) > [1] 6 >> floor(6.9999999999999999) > [1] 7 > > There is a
2006 Jun 06
4
pls help me regarding Maths round up function.....
Hi, I have some values on my webpage displaying like 1.22333333333 2.33333344444 2.33377777777 etc. Here I want to display values upto 2 decimal places correct. i.e, 1.22333333333 should be dislayed as 1.22 2.33333344444 should be dislayed as 2.33 2.33777777777 should be dislayed as 2.34 & so on.... How to do this in ruby????? Is there any function??? Thanx in advance. Prash --
2007 Jul 23
1
maths characters in labels & ylab padding
I have checked out the help files, but cannot find details on how to use maths characters in ylab. Instead of m^2, I would like the 2 in superscript, if possible. I would also like to place more padding on the label so that the label is not obscured by the horizontal numbers. y <- 1:10 x <- rnorm(10,50000,2000) plot(x ~ y, ylab = 'Y Label (m^2)', las = 1, type =
2009 Mar 24
2
Legend containing maths symbol and values of variables
I need to have the maths symbol for >= in the legend, and to substitute threshold variable with its value. Somehow, various attempts weren't successful. Please help. threshold <- 0.5 plot(NA, xlab="", ylab="", main="", axes=F, xlim=c(0,1), ylim=c(0,1), xaxs="i", yaxs="i") legend(x=0, y=1, fill=c("orange", "white",
2011 Apr 11
1
simple maths question
Hi Mrs & Ms "R", A simple maths question that I am trying to resolve with R: I need to calculate the SE from a pvalue and it's beta... How to do this...? Thank you very much and best regards! Georg Ehret, Geneva, Switzerland. [[alternative HTML version deleted]]
2008 Feb 18
2
Number of digits of a value for problem 7.31 RFAQ
Hello dear R users! I did not find a function which gives information about the number of digits of a value shown by R. Do you know one? I need it to solve the problem (see RFAQ 7.31)that 0.2==0.2+0.1-0.1 FALSE The solution suggested in RFAQ is to use isTRUE(all.equal(0.2,0.2+0.1-0.1)) But if I want to compare inequality: 0.2<=0.2 +0.1-0.1 TRUE but 0.2<=0.2 +0.1-0.1 FALSE bad! but in
2008 Aug 25
2
maths not working (can't get this)
I''ve got a few problems with this...Hopefully it''s cleaer what I''m trying to do (work out and display two prices, one discounted / one full). Be grateful for answers... The total price and discounted price are not calculated correctly and the duration is not coming through to the output page. --------------- class Course < ActiveRecord::Base has_one :enquiry
2000 Apr 17
3
Maths in R documentation (PR#523)
The document R-exts contains the following example of using mathematics in R documentation. \deqn{p(x) = {\lambda^x\ \frac{e^{-\lambda}}{x!}} {p(x) = lambda^x exp(-lambda)/x!} There is a syntax error in there, but that's not my point. The problem is that using "R CMD Rd2dvi" I find that putting the alternate forms of the equation on top of each other doesn't work.
2012 Nov 09
1
CCA with Vegan - Plot problem
Hi, I've just started using R and am having some problems with CCA using vegan. I'm looking at abundance p/m2 (hence decimals) vs environmental variables and have been using http://ecology.msu.montana.edu/labdsv/R/labs/lab12/lab12.html to guide me through. My organism data looks like this: Sample "Species_1" "Species_2" "Species_3" etc Sample_1
2004 Aug 13
5
simtest for Dunnett's test
Hi! I use simtest fonction of multcomp package to compile a Dunnett's test. I have 10 treatments and one control group, so i create a matrix with: m<-matrix(0,10,11) m[1,1]<--1 m[1,2]<-1 m[2,1]<--1 m[2,3]<-1 m[3,1]<--1 m[3,4]<-1 m[4,1]<--1 m[4,5]<-1 m[5,1]<--1 m[5,6]<-1 m[6,1]<--1 m[6,7]<-1 m[7,1]<--1 m[7,8]<-1 m[8,1]<--1 m[8,9]<-1
2002 Jul 03
0
poly.transform in R
Dear all, I am trying to transform polynomial coefficients from orthogonal form to the standard power basis. There's poly.transform in S-plus. Does anybody know how to do that in R ? I've found question about that in the archives of R-help but no real answer. Example : I'm doing polynomial regression of percentage of one insect in a community on altitude, precipitations,
2011 Aug 20
0
help with nls fitting
Dear all, I'm trying to fit the following function slope_pp3_mrna = ( (k3 * v3_K_d *p1^v3_h) / ( (v3_Kd^v3_h) + p2^v3_h ) ) * ( 1/(1 + (p2/v4_Kd)^v4_h) ) - pp3_mrna to this experimental data in the datafraeme "Data_pp3_mrna" (see it at the end of this e-mail) I'm using the nls function in the following code. IN the last step of the fit