similar to: for loops and counters

Displaying 20 results from an estimated 4000 matches similar to: "for loops and counters"

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
1999 Jun 23
1
Influence.measures
I am using rw0641 with Windows 98. To list just the influential repetitiones that result from "influence.measures", I am using the input result <- lm(y~x) and the code from the example in the help for "influence.measures" INFLM <- function(result){ inflm <- influence.measures(result) which(apply(inflm$is.inf,1,any)) } It works fine up to now with the
1999 Jul 14
3
vector of NA indices
I have a vector Pes with 600 elements some of which are NA's. How can I form a vector of the indices of the NA's. for(i in 1:600) if(is.na(Pes[i])) print(i) prints the indices of the NA's but I can't figure out how to put the results in a vector. Thank you very much. Peter B. -- Peter B. Mandeville mandevip at deimos.tc.uaslp.mx Jefe del Depto. de
1999 Jul 14
1
How to cite
I am updating my lab manual in Spanish. How should I cite your supplements to Venables and Ripley 1997 and the scripts. Thank you very much Peter B. -- Peter B. Mandeville mandevip at deimos.tc.uaslp.mx Jefe del Depto. de Inform?tica y Bioestad?stica rpe1531 at pasteur.fmed.uaslp.mx Facultad de Medicine Tel: 48 26-23-45 ext. 232
1999 Jun 29
1
manova
I am using rw0641 with Windows 98. In the help for aov it states that the formula can sepecify multiple responses for a "maov". The help doesn't give an example, Venables and Ripley 1997:381 doesn't either. It isn't mentioned in the scripts nor in the section R Complements nor in Rnotes. I tried aov(c(y1,y2,y3)~x) which seemed reasonable to me but doesn't work. How
2001 Jan 09
1
Chambers and Hastie Data Sets
Is there any place where the Chambers and Hastie 1993 Statistical Models in S data sets can be found? Thank you very much. Peter B. -- Peter B. Mandeville mandevip at deimos.tc.uaslp.mx Jefe del Depto. de Inform?tica y Bioestad?stica rpe1531 at pasteur.fmed.uaslp.mx Facultad de Medicine Tel: 48 26-23-45 ext. 232 Universidad Aut?noma de San
2001 Jan 17
1
panel argument in coplot
How can I add a least squares line to each panel in coplot? Thank you very much. Peter B. -- Peter B. Mandeville mandevip at deimos.tc.uaslp.mx Jefe del Depto. de Inform?tica y Bioestad?stica rpe1531 at pasteur.fmed.uaslp.mx Facultad de Medicine Tel: 48 26-23-45 ext. 232 Universidad Aut?noma de San Luis Potos? Fax: 48 28-23-52 Av.
2001 Jun 15
1
contrasts in lm and lme
I am using RW 1.2.3. on an IBM PC 300GL. Using the data bp.dat which accompanies Helen Brown and Robin Prescott 1999 Applied Mixed Models in Medicine. Statistics in Practice. John Wiley & Sons, Inc., New York, NY, USA which is also found at www.med.ed.ac.uk/phs/mixed. The data file was opened and initialized with > dat <- read.table("bp.dat") >
1999 Jul 01
1
lme
I am using rw0641. In my continuing quest to understand repeated measures analysis, I again return to lme. I exported the Potthoff and Roy data Orthodont.dat from S-PLUS 4.5 to avoid capture errors and ran the examples in the R help. I imported the data.frame with data <- read.table("Orthodont.dat",header=T) attach(data) and created the objects Orthodont.fit1 <-
2000 Jul 05
1
Tukey.aov with split-plot designs
I am using R 1.1 with Redhat 6.2 and RW 1.001 with Win98 (the upkey doesn't work on my IBM either as has been previously reported by others). The function aov doesn't return either the residuals or the residual degrees of freedom for split-plot designs. If you use the following code from Baron and Li's "Notes on the use of R for psycology experiments and questionnaires"
2000 Jul 11
3
postscript()
I am using RedHat 6.1, the R1.1.0 binary download, and an HP Deskjet 692C. For some time I have been trying unsuccessfully to integrate R postscript graphics in LaTex. I consulted the Bug Tracking System. In the preamble of the LaTex file (test.tex) I have placed the line \usepackage{graphicx,color} and I use \begin{figure}[htbp] \begin{center} \includegraphics[height=4in]{graphic1.ps}
1999 Jun 07
0
How to superimpose a histogram and density plot
NCSS has a nice plot of the histogram and density plot superimposed. The S-PLUS 4 Guide to Statistics on page 45 suggests the following code for a general purpose density plot for a vector named data iqd <- summary(data)[5]-summary(data)[2] plot(density(data,width=2*iqd),xlab="x",ylab="",type="l") Is it possible to superimpose the density plot on a histogram
1999 Jul 23
2
rw0642
Among other computers, I am using rw0642 on an IBM 300GL with 32MB RAM and Windows98. 1. If after opening rw0642 the first command is to help such as "? par", when the help window is closed by clicking X in the upper right corner of the help window the following message is shown This program has performed an illegal operation and will be shut down. If the problem persists contact the
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
2004 Aug 30
3
D'agostino test
Hi, Does anyone know if the D'agostino test is available with R ? Alex
2007 Oct 29
6
covariance matrix of the regression coefficients
Greetings, Cohen, Cohen, West, and Aiken 2003 (Applied Multiple Regression-Correlation Analysis for the Behavioral Sciences, Third Edition) on page 273 state the covariance matrix of the regression coefficients is provided by standard programs for multiple regression, including SAS, SPSS, and SYSTAT. How can it be calculated with R. Thank you very much. pbm Peter B. Mandeville cel:
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.
1998 Jul 13
1
R-beta: R-beta Win95 glm
When will a new version of R for Windows 95 be available with the fixes for glm? Peter B. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at
1998 Jul 13
1
R-beta: R-beta Win95 glm
When will a new version of R for Windows 95 be available with the fixes for glm? Peter B. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at
1998 Jul 14
1
R-beta: R-beta Win95 read.table
For dat <- read.table("c:\claims.dat",header=T) R version 0.62 Beta (june 9, 1998)for Windows 95 reports Error: "scan" can't open file but dat <- read.table("c:\\claims.dat",header=T) works. Peter B. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read