similar to: How to recover t-statistics?

Displaying 20 results from an estimated 2000 matches similar to: "How to recover t-statistics?"

2003 Sep 25
2
allShortestPath function in e1071 package
Hi All, I am using the allShortestPath function based on Floyd's algorithm in e1071 package. It runs great when I have less than 5000 nodes. But when I tried to work on more than 5000 nodes, I ran into memory problem. The problem I really want to solve has 10000-15000 nodes. Does anybody know how to deal with this problem? Are there any other packages in R that can handle this problem?
2005 Sep 21
3
Multiple density plots on 1 graph
I want to overlay 50 denisty plots on a single plot. For each plot there are 10,000 data points and i want the empirical density of the data. I have not been able to find an easy way to achieve this (I have scoured the manula and website so sorry if I missed it!), does anyone have any suggestions? Thankyou.
2017 Jun 18
0
R_using non linear regression with constraints
I've seen a number of problems like this over the years. The fact that the singular values of the Jacobian have a ration larger than the usual convergence tolerances can mean the codes stop well before the best fit. That is the "numerical analyst" view. David and Jeff have given geometric and statistical arguments. All views are useful, but it takes some time to sort them all out and
2017 Jun 18
3
R_using non linear regression with constraints
I am not as expert as John, but I thought it worth pointing out that the variable substitution technique gives up one set of constraints for another (b=0 in this case). I also find that plots help me see what is going on, so here is my reproducible example (note inclusion of library calls for completeness). Note that NONE of the optimizers mentioned so far appear to be finding the true best
2003 Dec 10
3
expressing functions
# Why does expressing one function require(ctest) t.test # return only function (x, ...) UseMethod("t.test") <environment: namespace:ctest> # but expressing another function shapiro.test # returns more complete code? function (x) { DNAME <- deparse(substitute(x)) x <- sort(x[complete.cases(x)]) n <- length(x) if (n < 3 || n > 5000)
2010 May 24
2
adding one line to a plot
Hello! I am running a very simple mini Monte-Carlo below using the function tstatistic (right below this sentence): tstatistic = function(x,y){ m=length(x) n=length(y) sp=sqrt( ((m-1)*sd(x)^2 + (n-1)*sd(y)^2)/(m+n-2) ) t=(mean(x)-mean(y))/(sp*sqrt(1/m+1/n)) return(t) } alpha=.1; m=10; n=10 # sets alpha, m, n - for run 1 N=10000 # sets the number of simulations n.reject=0 # counter of num.
2017 Jun 18
3
R_using non linear regression with constraints
https://cran.r-project.org/web/views/Optimization.html (Cran's optimization task view -- as always, you should search before posting) In general, nonlinear optimization with nonlinear constraints is hard, and the strategy used here (multiplying by a*b < 1000) may not work -- it introduces a discontinuity into the objective function, so gradient based methods may in particular be
2017 Jun 18
0
R_using non linear regression with constraints
I ran the following script. I satisfied the constraint by making a*b a single parameter, which isn't always possible. I also ran nlxb() from nlsr package, and this gives singular values of the Jacobian. In the unconstrained case, the svs are pretty awful, and I wouldn't trust the results as a model, though the minimum is probably OK. The constrained result has a much larger sum of squares.
2004 Feb 17
10
How to write efficient R code
I have been lurking in this list a while and searching in the archives to find out how one learns to write fast R code. One solution seems to be to write part of the code not in R but in C. However after finding a benchmark article (http://www.sciviews.org/other/benchmark.htm) I have been more interested in making the R code itself more efficient. I would like to find more info about this. I have
2017 Jun 18
2
R_using non linear regression with constraints
I am using nlsLM {minpack.lm} to find the values of parameters a and b of function myfun which give the best fit for the data set, mydata. mydata=data.frame(x=c(0,5,9,13,17,20),y = c(0,11,20,29,38,45)) myfun=function(a,b,r,t){ prd=a*b*(1-exp(-b*r*t)) return(prd)} and using nlsLM myfit=nlsLM(y~myfun(a,b,r=2,t=x),data=mydata,start=list(a=2000,b=0.05), lower = c(1000,0),
2017 Jun 18
0
R_using non linear regression with constraints
> On Jun 18, 2017, at 6:24 AM, Manoranjan Muthusamy <ranjanmano167 at gmail.com> wrote: > > I am using nlsLM {minpack.lm} to find the values of parameters a and b of > function myfun which give the best fit for the data set, mydata. > > mydata=data.frame(x=c(0,5,9,13,17,20),y = c(0,11,20,29,38,45)) > > myfun=function(a,b,r,t){ > prd=a*b*(1-exp(-b*r*t)) >
2020 Oct 17
2
??? is to nls() as abline() is to lm() ?
I'm drawing a fitted normal distribution over a histogram. The use case is trivial (fitting normal distributions on densities) but I want to extend it to other fitting scenarios. What has stumped me so far is how to take the list that is returned by nls() and use it for curve(). I realize that I can easily do all of this with a few intermediate steps for any specific case. But I had expected
2012 Aug 25
2
Standard deviation from MANOVA??
Hi, I have problem getting the standard deviation from the manova output. I have used the manova function: myfit <- manova(cbind(y1, y2) ~ x1 + x2 + x3, data=mydata) . I tried to get the predicted values and their standard deviation by using: predict(myfit, type="response", se.fit=TRUE) But the problem is that I don't get the standard deviation values, I only
2005 Apr 05
2
Stats Question: Single data item versus Sample from Norma l Distribution
Here's one possibility, assuming muhat and sigmahat are estimtes of mu and sigma from N iid draws of N(mu, sigma^2): tStat <- abs(x - muhat) / sigmahat pValue <- pt(tStat, df=N, lower=TRUE) I'm not quite sure what df tStat should have (exercise for math stat), but given fairly large N, that should make little difference. Andy > From: Ross Clement > > Hi. I have a
2020 Oct 17
0
??? is to nls() as abline() is to lm() ?
I haven't followed your example closely, but can't you use the predict() method for this? To draw a curve, the function that will be used in curve() sets up a newdata dataframe and passes it to predict(fit, newdata= ...) to get predictions at those locations. Duncan Murdoch On 17/10/2020 5:27 a.m., Boris Steipe wrote: > I'm drawing a fitted normal distribution over a
2003 Oct 23
3
List of lm objects
Hi R-Helpers: I?m trying to fit the same linear model to a bunch of variables in a data frame, so I was trying to adapt the codes John Fox, Spencer Graves and Peter Dalgaard proposed and discused yesterday on this e-mail list: for (y in df[, 3:5]) { mod = lm(y ~ Trt*Dose, data = x, contrasts = list(Trt = contr.sum, Dose = contr.sum)) Anova(mod, type = "III") } ## by John Fox or for
2006 Jul 16
2
Matrices given to pt? [was: [R] for loops and counters]
Hi, people. I was a bit intrigued by the message quoted below. Indeed, if pt() is given a matrix, it returns a matrix. Should this feature be documented? ?pt speaks about "a vector of quantiles", and says nothing about the type of what it returns. The same might presumably apply to other distribution-related functions. ----- Forwarded message from Martyn Plummer <plummer at
2004 Feb 14
6
Beginner's question about t.test()
Dear All, I am doing some exercise in statistics textbook on comparison of two experimental means. Is it possible to use t.test() do t-test when I have only two means, sample size, two standard deviations ? (no raw data). Thanks. Pramote
1999 Oct 05
2
for loops and counters
I am trying to assign values to a vector (pvalue). Similar code works in C but not in R. What am I doing wrong? r <- pvalue <- 0 for(i in (1:(k-1))){ for(j in (i+1):k){ r <- r+1 tstat <- (means[i]-means[j])/rms pvalue[r] <- 2*(1-pt(abs(tstat),df)) } } Thank you. Peter B. -- Peter B. Mandeville mandevip at deimos.tc.uaslp.mx Jefe del
2008 Feb 24
1
what missed ----- CART
Hi all, Can anyone who is familar with CART tell me what I missed in my tree code? library (MASS) myfit <- tree (y ~ x1 + x2 + x3 + x4 ) # tree.screens () # useless plot(myfit); text (myfit, all= TRUE, cex=0.5, pretty=0) # tile.tree (myfit, fgl$type) # useless # close.screen (all= TRUE) # useless My current tree plot resulted from above code shows as: