Displaying 20 results from an estimated 32 matches for "2.00000".
Did you mean:
0.00000
2020 May 12
4
S3 method dispatch for methods in local environments
Dear All,
In R 3.6.3 (and earlier), method dispatch used to work for methods stored in local environments that are attached to the search path. For example:
myfun <- function(y) {
out <- list(y=y)
class(out) <- "myclass"
return(out)
}
print.myclass <- function(x, ...) print(formatC(x$y, format="f", digits=5))
myfun(1:4)
# prints: [1]
2003 Jan 13
2
replace NA´s
hey
what should I do to replace in a data frame NA?s with zeroes?
Thanks in advance
Juan Pablo
2005 Mar 22
1
error with polr()
Dear Sir,
I get an error message when I use polr() in MASS package.
My data is "ord.dat". I made "y" a factor.
y y1 y2 x lx
1 0 0 0 3.2e-02 -1.49485
2 0 0 0 3.2e-02 -1.49485
3 0 0 0 1.0e-01 -1.00000
4 0 0 0 1.0e-01 -1.00000
5 0 0 0 3.2e-01 -0.49485
6 0 0 0 3.2e-01 -0.49485
7 1 1 0 1.0e+00 0.00000
8 0 0 0 1.0e+00 0.00000
9 1 1 0
2012 Jan 31
4
problem in fitting model in NLS function
Dear R users,
I am struggling to fit expo-linear equation to my data using "nls" function. I am always getting error message as i highlighted below in yellow color:
Theexpo-linear equation which i am interested to fit my data:
response_variable = (c/r)*log(1+exp(r*(Day-tt))), where "Day" is time-variable
my response variable
rl <-
2011 Aug 06
1
help with predict for cr model using rms package
Dear list,
I'm currently trying to use the rms package to get predicted ordinal
responses from a conditional ratio model. As you will see below, my
model seems to fit well to the data, however, I'm having trouble
getting predicted mean (or fitted) ordinal response values using the
predict function. I have a feeling I'm missing something simple,
however I haven't been able to
2024 Feb 27
4
converting MATLAB -> R | element-wise operation
So, trying to convert a very long, somewhat technical bit of lin alg
MATLAB code to R. Most of it working, but raninto a stumbling block that
is probaably simple enough for someone to explain.
Basically, trying to 'line up' MATLAB results from an element-wise
division of a matrix by a vector with R output.
Here is a simplified version of the MATLAB code I'm translating:
NN = [1,
2012 Nov 23
6
Summary statistics for matrix columns
Hi,
is there a way I can calculate a summary statistics for a columns matrix
let say we have this matrix
x <- matrix(sample(1:8000),nrow=100)
colnames(x)<- paste("Col",1:ncol(x),sep="")
if I used summary
summary(x)
i get the output for each column but I need the output to be in matrix with
rownames and all the columns beside it
this how I want it
2017 Jun 26
2
Classic fail-safe N
Hi all,
I was conducting a meta-analysis of single proportions(i.e. without a
control group) using the metafor package. When I performed a classic
fail-safe N, I noticed that the result (the number of missing studies that
would bring p-value to the alpha, to be exact)was different than that I got
in Comprehensive Meta-Analysis Version 2.0. I wonder why R and CMA got
different results.
*Below is
2020 May 12
0
S3 method dispatch for methods in local environments
Dear Wolfgang,
I think this new behaviour is related to the following R 4.0.0 NEWS item:
> S3 method lookup now by default skips the elements of the search path between the global and base environments.
Your environment "myenv" is attached at position 2 of the search() path
and thus now skipped in S3 method lookup.
I have just noticed that
2006 Jul 13
3
set the bahavior that R deal with missing values?
Dear Rusers,
The default behavior in R when performing a regression model with missing
values is to exclude any case that contains a
missing value? How could i set the bahavior that R deal with missing values?
e.g.:
exclude cases listwise
exclude cases pairwise
replace with mean
Thanks very much!
--
Kind Regards,
Zhi Jie,Zhang ,PHD
Department of Epidemiology
School of Public Health
Fudan
2012 Nov 07
1
error message no lines available in input
Dear all,
a program that worked well for weeks today gave me consistently the error
message
no lines available in input
referring to the lines
for (i in (0:(timeintervals-1)))
{ j=subjectquantity+6+i*(subjectquantity+7)
print (j)
results<-read.table(file, header=F, skip=j, nrows=subjectquantity)
timeintervals have been specified as argument as 12
subjectquantity as 9
the file it should
2006 Oct 27
1
(no subject)
Hi,
I have generated a profile likelihood for a parameter (x) and am
trying to get 95% confidence limits by calculating the two points
where the log likelihood (LogL) is 2 units less than the maximum
LogL. I would like to do this by linear interpolation and so I have
been trying to use the function approxfun which allows me to get a
function to calculate LogL for any value of x within
2006 Dec 09
2
Floating point maths in R
Hi,
I am not sure if this is just me using R (R-2.3.1 and R-2.4.0) in the
wrong way or if there is a more serious bug. I was having problems
getting some calculations to add up so I ran the following tests:
> (2.34567 - 2.00000) == 0.34567 <------- should be true
[1] FALSE
> (2.23-2.00) == 0.23 <------- should be true
[1] FALSE
> 4-2==2
[1] TRUE
> (4-2)==2
[1] TRUE
>
2017 Jun 26
0
Classic fail-safe N
I would suggest to post this to the (recently created) R-sig-meta-analysis mailing list. See:
https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
Best,
Wolfgang
>-----Original Message-----
>From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Naike Wang
>Sent: Monday, June 26, 2017 08:32
>To: R-help at r-project.org
>Subject: [R] Classic fail-safe N
>
2024 Feb 27
2
[External] converting MATLAB -> R | element-wise operation
> t(t(NN)/lambda)
[,1] [,2] [,3]
[1,] 0.5 0.6666667 0.75
[2,] 2.0 1.6666667 1.50
>
R matrices are column-based. MATLAB matrices are row-based.
> On Feb 27, 2024, at 14:54, Evan Cooch <evan.cooch at gmail.com> wrote:
>
> So, trying to convert a very long, somewhat technical bit of lin alg
> MATLAB code to R. Most of it working, but raninto a stumbling block
2008 Feb 07
1
Don't understand removing constant on 1-way ANOVA
I am playing with the a 1-way anova with and without the "-1" option.
I have a simple cooked up example below but it behaves the same on a more
complex real example.
From what I can tell:
1) the estimated means of the different levels are correctly estimated
either way (although reported as means with the -1 and as contrasts without
the -1 as expected)
2) the residuals are
2024 Feb 27
2
converting MATLAB -> R | element-wise operation
Why anything but sweep?
The fundamental data type in Matlab is a matrix... they don't have vectors, they have Nx1 matrices and 1xM matrices.
Vectors don't have any concept of "row" vs. "column". Straight division is always elementwise with recycling as needed, and matrices are really vectors in row-major order:
1 2 3
4 5 6
is really
1 4 2 5 3 6
and when you do
2012 Nov 23
2
Data frame manipulation
Hello,
I have a table that was constructed in a wrong way (dput data on bottom -
wrong data-frame):
Local Mês Dia Colonia X6h X7h X8h X9h X10h X11h
X12h X13h X14h X15h X16h X17h
1 Conceição Junho 1 3 2.16137 2.20412 2.08991 1.72428 1.69897
1.62325 1.44716 1.51851 1.43136 1.47712 1.51851 1.04139
2 Conceição Junho 2 3 2.46538 2.13672
2006 Nov 13
0
Confidence intervals for relative risk
Wolfgang,
It is common to handle relative risk problems using Poisson regression.
In your example you have 8 events out of 508 tries, and 0/500 in the second
data set.
> tdata <- data.frame(y=c(8,0), n=c(508,500), group=1:0)
> fit <- glm(y ~ group + offset(log(n)), data=tdata, family=poisson)
Because of the zero, the standard beta/se(beta) confidence intervals don't
work.
2007 Jan 04
0
A question on REML in R
Hello, everyone, I'm using R to deal with a REML problem. I found "lmer" is
the right function for this. But I got stuck because I couldn't interpret
the result. I'm attaching a short example of my executing log. Please have a
look and give me some advice on it. Thanks a lot!
Plot Block Treatment Data
1 1 2 7.8
2 1 1