Displaying 20 results from an estimated 10000 matches similar to: "R-1.9.0 Beta print.power.htest problem?"
2007 Aug 29
2
a new-bie question about obtaining certain value from the print out
Hi everyone,
I am quite new to R.
my command is
t.test(c(1:5,7:11), y=c(1:10),alternative = c("two.sided"), paired = TRUE)
The output is
Paired t-test
data: c(1:5, 7:11) and c(1:10)
t = 3, df = 9, p-value = 0.01496
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
0.1229738 0.8770262
sample estimates:
mean of the differences
2005 Mar 13
1
Use of htest class for different tests
Hello!
First of all I must appologize if this has been raised previously, but
search provided by Robert King at the University of Newcastle seems to
be down these days. Additionally let me know if such a question should
be sent to R-help.
I did a contribution to function hwe.hardy in package 'gap' during the
weekend. That functions performs Hardy-Weinberg equilibrium test using
MCMC. The
2011 Dec 15
1
printing all htest class members
Hello,
I've posted a question about this subject yesterday, but since there was no
R code to comment,
no one did.
I'm trying to have the print method for class 'htest' print some extra
information common in some test, like the time series linearity related
tests. Many of them have an 'order' parameter, representing a lag or
embedding dimension, and it would be a nice
2009 Jun 02
1
getting elements out of list automatically
o <- (structure(list(sand.silt = structure(list(statistic =
structure(185, .Names = "W"),
parameter = NULL, p.value = 0.0478835773838087, null.value =
structure(0, .Names = "location shift"),
alternative = "two.sided", method = "Wilcoxon rank sum test with
continuity correction",
data.name = ".column by site"), .Names =
2003 Sep 03
0
Updated power.t.test
Greetings,
I've tried to update the power.t.test function to allow for different sample sizes and sample variances in the case of a two-sample t test. I'd gladly update
the corresponding help page if the code is to replace the current power.t.test function. The modified power.t.test code is included below.
The changes are as follows:
- Added three new arguments to the function
*
2008 Jul 05
0
Problem solved: extracting values from a "by" function
Hi
I just discovered the answer thanks to a previous thread from Peter Daalgart
The command is:
sapply(test, "[[", "statistic")
Cheers, Daniel
----- Original Message -----
To: r-help at r-project.org
Subject: extracting values from a "by" function
Date: Sun, 6 Jul 2008 05:59:04 +0800
Hello,
I am trying to extract t and pvalues from a 1000 ttests using the
2008 Jul 05
0
extracting values from a "by" function
Hello,
I am trying to extract t and pvalues from a 1000 ttests using the by-function but everythinhg I tried did not work. Unfortunately googling "by" is not very helpful. Any help will be very appreciated.
Cheers,
Danile Stall
*creating a data set
library(MASS)
dataset <- mvrnorm(160, mu, Sigma)
dataset <- as.data.frame(dataset)
dataset$GROUP <- rep(1:10, each=16)
data.uni
2010 Aug 09
2
How to extract the conf.level out of t.test() data
Good afternoon everybody,
I'm writing a little function to visualise hypothesis testing. Therefore
I need to extract the confidence level of a t-test. Here a little example:
x <- str(t.test(1:10)
gives
List of 9
$ statistic : Named num 5.74
..- attr(*, "names")= chr "t"
$ parameter : Named num 9
..- attr(*, "names")= chr
2008 Jun 23
0
Documentation about htest?
Hello
I saw in many packages and functions a class "htest". I wanted to study
it and maybe use for a package instead of writing new classes, but did
not find any documentation about this class in the official manuals. Are
there some information available about it? How can I see how to use it?
As a second question, I also implemented some tests with bootstraped
distribution. Is the
2004 May 20
2
Get Slot from a Class
Hello, everyone,
I don't quite understand the following message:
> TTT <- t.test(1:10, y=c(7:20))
> class(TTT)
[1] "htest"
> TTT@p.value
Error: Trying to get slot "p.value" from an object whose class ("htest") is not defined
> TTT$p.value
[1] 1.855282e-05
Why the message says the class of TTT is not defined while class(TTT) gets
2019 Feb 23
1
Return/print standard error in t.test()
>>>>> peter dalgaard
>>>>> on Fri, 22 Feb 2019 12:38:14 +0100 writes:
> It's not a problem per se to put additional information
> into class htest objects (hey, it's S3 after all...) and
> there is a precedent in chisq.test which returns $observed
> and $expected.
It seems the consent is to simply return the SE but *not*
2003 May 20
2
what.is(object)
hi: still experimenting. is there a function that tells me what an S
object is, or how it is constructed?
s <- cor.test ( x, y );
s$estimate$name = 'correlation' ; <- try to rename 'cor' to
'correlation' fails. obviously, name is not a part here.
s$newfield = c("another info field", 3.2 ) ; <- this is not congruous
so
what.is(s) #tells
2008 Jan 09
3
likelihood from test result
Is there any automatic mechanism for extracting a likelihood or test
statistic distribution (PDF or CDF) from an object of class "htest" or
from another object of a general class encoding a hypothesis test
result?
I would like to have a function that takes "x", an object of class
"htest", as its only argument and that returns the likelihood or test
statistic
2011 Jun 20
1
requesting a mentor for R development
I'd like to learn the process of revising R functions & packages and
then submitting proposed patches to the R Core team. Would someone be
willing to mentor me through one example?
For starters, consider an example. I'd like to revise the t.test
function to return the stderr value to the user. We only need to
change the "rval" in the third-from-the end line of
2011 Oct 03
2
extracting p-values in scientific notation
Dear all
How does print.htest display the p-value in scientific notation?
> (x <- cor.test(iris[[1]], iris[[3]]))
Pearson's product-moment correlation
data: iris[[1]] and iris[[3]]
t = 21.65, df = 148, p-value < 2.2e-16
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.8270 0.9055
sample estimates:
cor
0.8718
Above the p-value comes
1997 Aug 21
2
R-alpha: new class for chisquare tests?
I sort of asked this before, but perhaps not explicitly enough.
In my ctest collection, there are several chisquare-based tests. For
some of them, it may be useful to also return information on expected
(and observed) counts. The question is, how should this be done. Of
course, there is no problem adding the corresponding components to the
list returned by the functions. However, as these are
2004 Feb 26
2
package 'stats' needs import directive for 1.9.0?
I maintain the Irregular Time Series (its) package on CRAN. I am currently
testing a release. Under 1.8.1 I am able to define a S4 generic 'start' as
follows:
if(!isGeneric("start")) {setGeneric("start", useAsDefault=start)}
Under 1.9.0, Rcmd check generates an error, as 'start' is not recognised.
If I use the NAMESPACE directive IMPORT, all is well:
2004 Apr 13
1
lattice problem in R-1.9.0
Hi all,
I just installed R-1.9.0 on Windows 2000 from binaries. Yesterday, on
R-1.8.1 I ran a script that looked like:
library(lattice)
tmp <- expand.grid(A = 1:3, B = letters[1:2])
tmp$z <- runif(NROW(tmp))
trellis.device(png, file = "x1081.png", theme = col.whitebg)
xyplot(z ~ A | B, data = tmp,
panel = function(x, y, i) {
panel.xyplot(x, y)
2019 Feb 21
5
Return/print standard error in t.test()
Dear Thomas,
it is, unfortunately, not that simple. t.test() returns an object of class "htest" and not all such objects have standard errors. I'm not entirely sure what the point is since it's easy to compute the standard error of the difference from the information in the object (adapting an example from ?t.test):
> (res <- t.test(1:10, y = c(7:20)))
Welch Two Sample
2008 Oct 16
2
Saving results of Kruskal Walis test
Hello,
I am running Kruskal-Walis test in R. When I try to save results using
write.table it gives me the following error :
Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors =
stringsAsFactors) :
cannot coerce class "htest" into a data.frame
The overall code is as follows :
>data_file = read.table("~/DATA.dir/data_file.txt", header=T)