Displaying 20 results from an estimated 100 matches similar to: "t-stat Curve"
2008 Jul 20
4
drawing segments through points with pch=1
Please excuse me for asking such basic questions:
Here is my code
> y=c(1.21,0.51,0.14,1.62,-0.8,0.72,-1.71,0.84,0.02,-0.12)
> ybar=mean(y)
> ll=length(y);
> ybarv=rep(ybar,ll)
> x=1:ll
> plot(x,ybarv,pch=1)
> segments(x[1],ybar,x[ll],ybar)
What I get is a collection of small circles, with a segment "on top"
of the circles, which is almost what I want. But I
2010 Nov 16
2
Vectors out of lists?
Hello there
I have a list, Y, and each component of that list is a real-valued function
(that is, Y[[i]](u) returns a number).
I was wishing to build the mean function and the first thing I thought of
was
Ybar<-function(u){
mean(Y[[1:n]](u))
}
but obviously this doesn't work, since Y[[1:n]] is not allowed at all.
Any elegant suggestions? I really would like to avoid something like
2008 Jul 20
3
asp and ylim
#See David Williams' book "Weighing the odds", p286
y <- c(1.21, 0.51, 0.14, 1.62, -0.8,
0.72, -1.71, 0.84, 0.02, -0.12)
ybar <- mean(y)
ylength <- length(y)
ybarv <- rep(ybar, ylength)
x <- 1:ylength
plot(x,y,asp=1,xlab="position",ylab="ybar",type="n",ylim=c(-1,1))
segments(x[1], ybar, x[ylength], ybar)
segments(x,ybarv,x,y)
2011 Jun 03
2
Y error bars, dates on the X-axis
Dear forum,
Does anyone know any functions for plotting vertical error bars, if the
x-axis variable is a date?
I can produce a pretty plot with dates on the x-axis, if I don't want to
include error bars. I can also produce a nice plot with error bars, if I
just use Julian days for the x-axis, but I'd much rather have the actual
dates.
I have tried writing my own function, plotCI
2008 Sep 06
2
Hopefully an easy error bar question
Hi im trying to add error bars to my barplots, there very basic, i have a few grapghs where the y variable is different but on all the X variable is Age (Adult and Juvenile) however this is split into two levels so i have males and females, so my graph basically has four bars on it.
I know how to add eror bars for instance when there is only one level eg lookng at the diffrence between male and
2007 Sep 25
2
Need help with function writing
Hello:
If anyone could guide me with this I would greatly appreciate it. Thanking you in advance for your assistance.
Using a 3-level input factor alternative so that a function(below) can compute both a two-sided and one-sided p-values. Making the two-sided test the default. And produce output information about which alternative was tested. Where would I place the ifelse statement?
2000 Jul 08
1
iteration scheme
Dear friends.
On p 95 in 3. ed. MASS a zero-truncated Poisson distribution is analyzed. I
understand the probability distribution and expected mean. The Newton
iteration scheme is
Lam(m+1)=Lam(m)-[Lam(m)-Ybar(1-exp(-Lam(m))]/[1-Ybar*exp(-Lam(m)], and I
suppose the latter part should be f(Lam(m))/f ' (Lam(m)) and f(Lam(m)) is
Lam(m)/(1-exp(-Lam(m)), right ? But then
f ' (Lam(m)) is
2002 May 09
4
Rsquared in summary(lm)
Hello,
I'm doing some linear regression:
>lm<-lm(osas~alp,data)
>summary(lm)
However, the Rsquared in the output of summary() is not the same as the
"standard" Rsquared calculated by spreadsheets, and outlined in
statistical guidebooks, being SSR/SSTO. The output says "multiple
Rsquared", but it is no multiple regression...
What's the difference?
Thanks,
2012 Jul 18
1
Regression Identity
Hi,
I see a lot of folks verify the regression identity SST = SSE + SSR
numerically, but I cannot seem to find a proof. I wonder if any folks on
this list could guide me to a mathematical proof of this fact.
Thanks.
David.
--
View this message in context: http://r.789695.n4.nabble.com/Regression-Identity-tp4636829.html
Sent from the R help mailing list archive at Nabble.com.
2002 May 11
2
Bug on Mac version of lm()?
Dear Mac users,
Hi, as you might have probably read the thread of
"[R] Rsquared in summary(lm)" on May 10, it seems that Mac version of
lm() seem to be working incorrectly.
I enclose the script to produce the result both for lm() and manual
calculation for a simple regression. Could you run the script and
report with the version of R, so I don't have to go through every
builds
2007 Sep 24
1
hypothesis testing
This was sent to me by someone on the R-list ( I don't know her ) but I
don't have time to look at this right now so I told her I would send
it to the R-list because she said it keeps getting bounced when she
sends it.
#=======================================================================
====================================================================
I am a bit confused with
2007 Nov 07
1
Homework help: t test hypothesis testing with summarized data?
Is this how a t hypothesis test is done when I don't have the actual
data, but just the summarized statistics:
> #Homework 9.2.6 [1]
> n<-31
> xbar<-3.10
> s_x<-1.469
> m<-57
> ybar<-2.43
> s_y<-1.35
> s_pooled<- (((n-1)*s_x^2) + ((m-1)*s_y^2)) / (n + m - 2)
> s_pooled
[1] 1.939521
> t_obs <- (xbar - ybar) / (s_pooled * (sqrt(1/n + 1/m)))
2008 Sep 30
1
Using sub to get captions in barplots
All,
I've been using "sub" (subtitle) instead of "main" such that captions are
below figures produced by xyplot. This works fine and captions are on a
single line. However, when I try this for bar plots with error bars
(altering the error.bars function form Crawley's The R Book, see below), the
captions are split on more than 1 line. Is there a way to get the
2010 Jul 18
2
loop troubles
Hi all, I appreciate the help this list has given me before. I have a
question which has been perplexing me. I have been working on doing a
Bayesian calculating inserting studies sequentially after using a
non-informative prior to get a meta-analysis type result. I created a
function using three iterations of this, my code is below. I insert prior
mean and precision (I add precision manually
2012 Oct 25
2
error bars
Hello R-help,
I am using R version 2.15.1.
I upgraded from R version 2.13 a few months back.
Previously, I was able to plot error bars on an xy scatter plot using the errbar function:
errbar(RAEthylene$TIME,RAEthylene$AVE,RAEthylene$AVE+RAEthylene$STD,RAEthylene$AVE-RAEthylene$STD,add = TRUE,lty=2,pch=17);
Today, I went to update my plot.
However, in R version 2.15.1 I get error code
2007 Sep 03
1
how to compute cross correlation
Hello R Users,
How to compute cross correlation between two time series. Data is in ASCII
format. I am using R on windows.
Many thanks,
Regards,
Yogesh
[[alternative HTML version deleted]]
2007 Mar 28
2
Suggestion for memory optimization and as.double() with friends
Hi,
when doing as.double() on an object that is already a double, the
object seems to be copied internally, doubling the memory requirement.
See example below. Same for as.character() etc. Is this intended?
Example:
% R --vanilla
> x <- double(1e7)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 234019 6.3 467875 12.5 350000 9.4
Vcells 10103774 77.1
2008 Nov 03
2
Calculating R2 for a unit slope regression
Does anyone know of a literature reference, or a piece of code that can help me calculate the amount of variation explained (R2 value), in a regression constrained to have a slope of 1 and an intercept of 0?
Thanks!
Sebastian
J. Sebastián Tello
Department of Biological Sciences
285 Life Sciences Building
Louisiana State University
Baton Rouge, LA, 70803
(225) 578-4284 (office and lab.)
2005 Feb 16
2
R: ridge regression
hi all
a technical question for those bright statisticians.
my question involves ridge regression.
definition:
n=sample size of a data set
X is the matrix of data with , say p variables
Y is the y matrix i.e the response variable
Z(i,j) = ( X(i,j)- xbar(j) / [ (n-1)^0.5* std(x(j))]
Y_new(i)=( Y(i)- ybar(j) ) / [ (n-1)^0.5* std(Y(i))] (note that i have
scaled the Y matrix as well)
k is
2009 Oct 21
1
How do I vectorize this loop....
Basically I need to use the following data to calculate a squared error for
each Sample based on the expected Survival for the zone.
Basically, this code has Live/Dead for each sample, and I need to calculate
the square error based on the Expected Mean (ie, Survival). The code looks
up the expectation for each zone and applies for each sample in the zone
using a loop:
Data1 <-