[R] statistical tests under serial dependence

2007-09-10 Thread Millo Giovanni
Dear Rosa,

please be more specific. Statistical tests for which hypothesis?

For example, some tests can be made robust using Heteroskedasticity-
*and Autocorrelation-* Consistent (HAC) covariance matrices in package
'sandwich': see
- waldtest{lmtest} for a redundant variables test much like anova().
- linear.hypothesis{car} for general linear hypothesis testing in linear
regression models.

Besides, I'm very ignorant about VIF but I remember there being an
article in R-News some years ago, see
http://cran.r-project.org/doc/Rnews/Rnews_2003-1.pdf.

I hope it helps.
Giovanni

## original message was: ##

--

Message: 21
Date: Sat, 08 Sep 2007 19:25:07 +0100
From: Rosa Trancoso [EMAIL PROTECTED]
Subject: [R] statistical tests under serial dependence
To: r-help@stat.math.ethz.ch
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hello!

I would like to know if there are already programmed statistical tests 
for data under serial dependence, for example, considering the variance 
inflation factor?


Thank you very much
Best regards
Rosa



Giovanni Millo
Research Dept.,
Assicurazioni Generali SpA
Via Machiavelli 4, 
34131 Trieste (Italy)
tel. +39 040 671184 
fax  +39 040 671160
 
Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni ...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] lme with corAR1 errors - can't find AR coefficient in output

2007-05-24 Thread Millo Giovanni
Dear List,

I am using the output of a ML estimation on a random effects model with
first-order autocorrelation to make a further conditional test. My model
is much like this (which reproduces the method on the famous Grunfeld
data, for the econometricians out there it is Table 5.2 in Baltagi):

library(Ecdat)
library(nlme)
data(Grunfeld)
mymod-lme(inv~value+capital,data=Grunfeld,random=~1|firm,correlation=co
rAR1(0,~year|firm))

Embarrassing as it may be, I can find the autoregressive parameter
('Phi', if I get it right) in the printout of summary(mymod) but I am
utterly unable to locate the corresponding element in the lme or
summary.lme objects.

Any help appreciated. This must be something stupid I'm overlooking,
either in str(mymod) or in the help files, but it's a huge problem for
me.

Thanks
Giovanni 

Giovanni Millo
Research Dept.,
Assicurazioni Generali SpA
Via Machiavelli 4, 
34131 Trieste (Italy)
tel. +39 040 671184 
fax  +39 040 671160
 
Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni ...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Modified Sims test

2007-04-10 Thread Millo Giovanni
Dear Chris,

I do not have the references here, but AFAIR:

if x and y are two time series, we say that x does not Granger-cause y
(x ngc y) if the models 

(1) y~y(-1)+y(-2)+...+x(-1)+x(-2)+...

and

(2) y~y(-1)+y(-2)+...

are equivalent, i.e. if past values of x do not help explaining y.
The Granger test is thus the exclusion test for the lagged x in (1) (see
?grangertest).

The Sims test, which is equivalent to the Granger test under certain
circumstances, substitutes (1) with 

(3) y~x(-1)+x(-2)+...+x(+1)+x(+2)+...

We could well consider including this in lmtest one day: I'll speak to
the maintainer. For now, as the current grangertest.default() method is
based on waldtest() and lag(), which last works symmetrically, a quick
hack is straightforward. I am including it for your convenience, but
without any guarantee (my quick hacks don't usually work properly in the
first place).
I suggest you check the results by building up the two test models by
hand and comparing them through waldtest{lmtest}.

HTH
Giovanni

** Original message **

Message: 8
Date: Mon, 9 Apr 2007 08:25:23 -0400
From: Chris Elsaesser [EMAIL PROTECTED]
Subject: [R] Modified Sims test
To: r-help@stat.math.ethz.ch
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain;   charset=us-ascii

Does anyone know of a package that includes the Modified Sims test
[Gewerke, 1983, Sims, 1972]?

This test is used in econometrics and is a kind of alternative to the
Granger test [Granger, 1969], which is in the package lmtest.

Thanks in advance,
chris


Refernces:

Gewerke, J., R. Meese, and W. Dent (1983), Comparing Alternative Tests
of Causality in Temporal Systems: Analytic Results and Experimental
Evidence. Journal of Econometrics, 83, 161-194. 

Granger, C.W.J. (1969), Investigating Causal Relations by Econometric
Methods and Cross-Spectral Methods, Econometrica, 34, 424-438.

Sims, C. (1972), Money, Income and Causality, American Economic
Review, 62, 540-552.


Chris Elsaesser, PhD703.637.9421 (o)
Principal Geospatial Scientist  703.371.7301 (m)
SPADAC Inc.
7921 Jones Branch Dr. Suite 600
McLean, VA 22102



--

Giovanni Millo
Research Dept.,
Assicurazioni Generali SpA
Via Machiavelli 4, 
34131 Trieste (Italy)
tel. +39 040 671184 
fax  +39 040 671160
 
Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni contenute in questo 
messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il 
messaggio in parola Le fosse pervenuto per errore, La invitiamo ad eliminarlo 
senza copiarlo e a non inoltrarlo a terzi, dandocene gentilmente comunicazione. 
Grazie.

Pursuant to Legislative Decree No. 196/2003, you are hereby informed that this 
message contains confidential information intended only for the use of the 
addressee. If you are not the addressee, and have received this message by 
mistake, please delete it and immediately notify us. You may not copy or 
disseminate this message to anyone. Thank you.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Problems with obtaining t-tests of regression

2007-02-21 Thread Millo Giovanni
Guillermo,

I am dropping most of your mail because my answer is very generic.

First, why doesn't it work as you tried it: technically speaking,
coeftest() and the like expect to be feed an lm or a glm object and for
this reason won't accept the result of systemfit(), which is a much
different object. I suppose the same goes for the rest.

Second, what can you do: I'd do at least one step by hand.

a) as you have only one structural equation, maybe the easiest is to get
an lm object equivalent to the 2sls model you need, then apply
coeftest() and the like to this object. The two-step procedure outlined
in any textbook (e.g. Wooldridge, Econometrics of cross section and
panel data, MIT 2002, page 91) *should* produce a suitable object.
Please note: I cannot guarantee, though, that SEs are still appropriate:
see Wooldridge, bottom of page 91.

b) it could be safer to explicitly compute HC SEs by formula 5.34 in
Wooldridge, based on the 2sls residuals you got from systemfit().

c??) Maybe there's a shorter way: I suspect that the following could
work:

- regress Sc on the rest, get Sc_hat
- estimate step2model-lm(lnP~Ag+Ag2+Var+R+D+Sc_hat)

and now I think coeftest(step2model,vcov=vcovHC) should compute exactly
formula (5.34) in Wooldridge, but *please check this out*, as it is only
an intuition!!

Best,
Giovanni

--

Message: 3
Date: Tue, 20 Feb 2007 14:00:56 +0100
From:  Guillermo Juli?n San Mart?n 
[EMAIL PROTECTED]
Subject: [R] Problems with obtaining t-tests of regression
coefficientsapplying consistent standard errors after run
2SLS
estimation. Clearer !
To: r-help@stat.math.ethz.ch
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain

First I have to say I am sorry because I have not been so clear in my
previous e-mails. I will try to explain clearer what it is my problem.

I have the following model:



lnP=Sc+Ag+Ag2+Var+R+D



In this model the variable Sc is endogenous and the rest are all
objective exogenous variables. I verified that Sc is endogenous through
a standard Hausman test. To determine this I defined before a new
instrumental variable, I2. Also I detected through a Breusch Pagan Test
a problem of heteroskedasticity.

With the intention to avoid the problem of the endogenous variable and
the heteroskedasticity I want to apply first the technique 2SLS and then
based in these results I want to obtain the t-tests of the coefficients
applying Heteroskedasticity Consistent Standard Errors (HCSE) or
Huber-White errors.

Like I showed above I have just one structural equation in the model. In
this situation, to apply 2SLS in R until I know there two possible ways:
First to use the function tsls() from package sem, or second, to use the
function systemfit() from package systemfit. I thought that systemfit
was for situations when there are more than one structural equation in
the model. Anyway I probed with the two ways and I obtained similar
results. Below, I show the program lines:
(dropped)
 
Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni ...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] simple parallel computing on single multicore machine

2006-12-01 Thread Millo Giovanni
Dear List,

the advent of multicore machines in the consumer segment makes me wonder
whether it would, at least in principle, be possible to divide a
computational task into more slave R processes running on the different
cores of the same processor, more or less in the way package SNOW would
do on a cluster. I am thinking of simple 'embarassingly parallel'
problems, just like inverting 1000 matrices, estimating 1000 models or
the like.

I have seen some talk here on making R multi-threaded and the like, but
this is much simpler. I am just a curious useR, so don't bother if you
don't have time, but maybe you can point me at some resource, or just
say this is nonsense...

Cheers 
Giovanni

Giovanni Millo
Research Dept.,
Assicurazioni Generali SpA
Via Machiavelli 4, 
34131 Trieste (Italy)
tel. +39 040 671184 
fax  +39 040 671160
 
Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni ...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Obtaining the adjusted r-square given the regression coefficients

2006-01-11 Thread Millo Giovanni
Alexandra,
some additional remarks taken from my past struggles with R2 :^) Without
intercept the definition is indeed problematic, as Bernhard notes.

First, to estimate a model omitting the intercept you simply have to
specify -1 in the model formula (example on an in-built dataset, for
data description see help(mtcars)):

 data(mtcars)
 attach(mtcars)
 mod-lm(mpg~hp+wt+qsec) # with intercept
 summary(mod)

and

 mod0-lm(mpg~hp+wt+qsec-1) # without
 summary(mod0)

The reported R2s are different not only in value (which is obvious) but
also in the definition.
In fact, there are 2 definitions of R2. With reference to the usual
analysis of variance in OLS regression (see e.g. Ch.3 in Greene 2003,
Econometric Analysis, and 3.5.2. in particular), let, in our example,

 SST-sum(mpg^2)  # total sum of squares
 SSR-sum(fitted(mod)^2)  # regression sum of squares
 SSE-sum(resid(mod)^2)   # error sum of squares

where (a) SST=SSR+SSE, as you may readily check, 
then the *uncentered* R2 is defined as

 uR2-SSR/SST

while the *centered* R2 as

 cSST-sum((mpg-mean(mpg))^2)
 cSSR-sum((fitted(mod)-mean(mpg))^2) # as 1) mean(y)=mean(y_hat)
 cSSE-sum(resid(mod)^2)  # as 2) mean(e)=0
 cR2-cSSR/cSST

and (b) cSST=cSSR+cSSE. 

The problem is that the meaning of R2 derives from decompositions (a)
and (b), but while (a) always holds for OLS models, (b) only holds for
models with an intercept (as do (1-2) above, on which it is based). Thus
*centered R2 is meaningless in models without intercept*. People are
used to cR2, though, so R reports cR2 for models with intercept, uR2 for
those without (EViews, e.g., reports cR2 for both). 
Adjusted R2s are the same, adjusted by a factor penalizing for df. See
Greene, who gives
adjR2 = 1-(n-1)/(n-K)(1-R2) for n obs. and K regressors.

Finally, it is of course feasible to calculate the model coefficients on
your own, but it would be inefficient (R has an optimized routine for
OLS, so you'd better use coef(lm(y~X))). Anyway, if you like,

 y-mpg   # just for notational simplicity..
 X-cbind(hp,wt,qsec) # add rep(1,length(hp)) to this data matrix
   # if you want an intercept

 b-solve(crossprod(X),crossprod(X,y))  # the coefficients for mod0
 y_hat-X%*%b  # fitted values for y
 e-y-y_hat# model residuals

from which you can obtain anything you need.

Cheers
Giovanni

Giovanni Millo
Ufficio Studi
Assicurazioni Generali SpA
Via Machiavelli 4, 34131 Trieste (I)
tel. +39 040 671184 
fax  +39 040 671160 

*
Original message:

Date: Wed, 11 Jan 2006 09:16:46 -
From: Pfaff, Bernhard Dr. [EMAIL PROTECTED]
Subject: Re: [R] Obtaining the adjusted r-square given the regression
coefficients
To: 'Alexandra R. M. de Almeida' [EMAIL PROTECTED],
r-help@stat.math.ethz.ch
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=iso-8859-1

Hello Alexandra,

R2 is only defined for regressions with intercept. See a decent
econometrics
textbook for its derivation.

HTH,
Bernhard

-Urspr?ngliche Nachricht-
Von: Alexandra R. M. de Almeida [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 11. Januar 2006 03:48
An: r-help@stat.math.ethz.ch
Betreff: [R] Obtaining the adjusted r-square given the regression
coefficients

Dear list
  
I want to obtain the adjusted r-square given a set of coefficients
(without
the intercept), and I don't know if there is a function that does it.
Exist
I know that if you make a linear regression, you enter the dataset and
have
in summary the adjusted r-square. But this is calculated using the
coefficients that R obtained,and I want other coefficients that i
calculated
separately and differently (without the intercept term too).
I have made a function based in the equations of the book Linear
Regression
Analisys (Wiley Series in probability and mathematical statistics), but
it
doesn't return values between 0 and 1. What is wrong
The functions is given by:

  
adjustedR2-function(Y,X,saM) 
{
 if(is.matrix(Y)==F) (Y-as.matrix(Y))
 if(is.matrix(X)==F) (X-as.matrix(X))
 if(is.matrix(saM)==F) (saM-as.matrix(saM))  
 RX-rent.matrix(X,1)$Rentabilidade.tipo   
 RY-rent.matrix(Y,1)$Rentabilidade.tipo   
 r2m-matrix(0,nrow=ncol(Y),ncol=1)   
 RSS-matrix(0,ncol=ncol(Y),nrow=1)   
 SYY-matrix(0,ncol=ncol(Y),nrow=1)   
 for (i in 1:ncol(RY))
 {
RSS[,i]-(t(RY[,i])%*%RY[,i])-(saM[i,]%*%(t(RX)%*%RX)%*%t(saM)[,i])

SYY[,i]-sum((RY[,i]-mean(RY[,i]))^2)
r2m[i,]-1-(RSS[,i]/SYY[,i])*((nrow(RY))/(nrow(RY)-ncol(saM)-1))
 }
 dimnames(r2m)-list(colnames(Y),c(Adjusted R-square))  
 return(r2m) 
} 

  

  Thanks!
Alexandra



  Alexandra R. Mendes de Almeida

 



-
Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni ...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list

[R] Model frame manipulation

2004-07-06 Thread Millo Giovanni
Dear all,

I am implementing a redundant variables F-test. For that I need to
compute 2 models, restricted and unrestricted, then extracting the
residuals to calculate the test statistic.

I borrowed this elegant solution from the LMtest package to rebuild the
first of the matrices involved (the unrestricted one) on the basis of
model spec. and data

red.var.test-function(formula, red.vars, data = list()) {
  mf - model.frame(formula, data = data)
  y - model.response(mf)
  modelterms - terms(formula, data = data)
  X - model.matrix(modelterms, data = data) # unrestricted model
matrix
  
  n - nrow(X)
  k - ncol(X)
  

...but then I had to resort to this solution of mine to select the
restricted m.m. according to the possibly redundant regressors specified
in the character vector red.vars

  Z-X[,!(dimnames(X)[[2]]%in%red.vars)] # restricted model matrix


and then the rest...

  q-dim(X)[[2]]-dim(Z)[[2]] 

  umod-lm(y~X)
  rmod-lm(y~Z)

  ures-umod$resid
  rres-rmod$resid

  URSS-sum(ures^2)
  RRSS-sum(rres^2)

  test - ((RRSS - URSS)/q) / (URSS / (n-k))
  (...) }

Now to my question: the above works just fine when the names in red.vars
are *exactly* those of regressors in the model frame, e.g. if I am
taking logs of one variable, say, a, in model mod-lm(d ~ log(a) + b +
c), testing joint redundancy of a and b I have to write

red.var.test(mod, c(log(a),b))

Is there a generic way to restrict the model matrix, so as to write only
the names of regressors involved without having to bother about the
transformations, such as

red.var.test(mod, c(a,b))

maybe in the style of the first rows?

Thank you in advance for your insights
Giovanni

Giovanni Millo
RD Dept.
Assicurazioni Generali SpA
Trieste, Italy
Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni contenute in questo 
messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il messaggio in 
parola Le fosse pervenuto per errore, La invitiamo ad eliminarlo senza copiarlo e a 
non inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.BRBRPursuant 
to Legislative Decree No. 196/2003, you are hereby informed that this message contains 
confidential information intended only for the use of the addressee. If you are not 
the addressee, and have received this message by mistake, please delete it and 
immediately notify us. You may not copy or disseminate this message to anyone. Thank 
you.
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] LM omitted variables test

2004-03-24 Thread Millo Giovanni
Dear all,

Does anybody know whether the (general) Lagrange Multiplier testing
framework for restrictions on linear models has been implemented in some
package?

My goal is to test for omitted variables, i.e. restrictions of the kind
beta_i=0, in the specification of an econometric model.

There are some particular implementations in this fashion in the lmtest
package (e,g, the bgtest() function, where the lagged residuals are
taken as the omitted variable); before trying to adapt that code, I
would like to check out if there are ready-to-use solutions available. 

Thanks in advance
Giovanni

Giovanni Millo
Research Dept.
Assicurazioni Generali SpA

Ai sensi del D.Lgs.196/2003 si precisa che le informazioni contenute in questo 
messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il messaggio in 
parola Le fosse pervenuto per errore, La invitiamo ad eliminarlo senza copiarlo e a 
non inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.BRBRPursuant 
to Legislative Decree No. 196/2003, you are hereby informed that this message contains 
confidential information intended only for the use of the addressee. If you are not 
the addressee, and have received this message by mistake, please delete it and 
immediately notify us. You may not copy or disseminate this message to anyone. Thank 
you.
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Data for use in maps()

2004-02-16 Thread Millo Giovanni
Dear all,

I am interested in plotting maps visualizing spatial statistics in an
aggregated fashion, according to administrative boundaries. 
More specifically, I have fitted a cross-section model on data regarding
Italian counties (province, for Italian readers) and I would like to
visualize residual behavior on a map, in order to have a first
assessment of their spatial autocorrelation. I would also make some EDA
on the spatial patterns (if any) of the regressors.

I have found the maps package (and related) and would be able to do what
I want, e.g., for the USA, essentially by
map(state,fill=T,col=color)
where color is dependent on the statistic of interest, but I still lack
a data file for counties' boundaries in Italy. Does anybody know where
to find one? Is there any convenient tool for converting from other
formats? I would like to do everything in R if possible.

Thanks in advance

Giovanni Millo
RD Dept.
Assicurazioni Generali SpA
Trieste, Italy
Ai sensi del D.Lgs.196/2003 si precisa che le informazioni contenute in questo 
messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il messaggio in 
parola Le fosse pervenuto per errore, La invitiamo ad eliminarlo senza copiarlo e a 
non inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.BRBRPursuant 
to Legislative Decree No. 196/2003, you are hereby informed that this message contains 
confidential information intended only for the use of the addressee. If you are not 
the addressee, and have received this message by mistake, please delete it and 
immediately notify us. You may not copy or disseminate this message to anyone. Thank 
you.
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Re: presentation of software

2003-10-29 Thread Millo Giovanni
Dear Jason, 
see this on page 20 (article by Simon Jackman)
http://web.polmeth.ufl.edu/tpm/TPM11N2.pdf
I bet it will help you in organizing your talk (I have done something similar 
recently). 

Cheers
Giovanni

Giovanni Millo
Research Dept.
Assicurazioni Generali SpA
+39 040 671184

Original message:
Date: Tue, 28 Oct 2003 11:01:05 -0500
From: Owen, Jason [EMAIL PROTECTED]
Subject: [R] presentation of software
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain

Hello,

I am considering giving a talk at my university
on R to (mostly) academics.  There wouldn't be any
statisticians, but professors from mathematics,
psychology, economics, etc. who do use some statistical
software in teaching and/or research, and have an acquaintance
with procedures and graphics used in statistics.  Has anyone
given such a talk to a similar audience?  If so, I would be
interested in seeing what you talked about.  Please
send me your talk, outline, or whatever materials you
have.  I want to design an R is the way -type talk.

Jason

Ai sensi della Legge 675/96 si precisa che le informazioni contenute in questo 
messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il messaggio in 
parola Le fosse pervenuto per errore, la preghiamo di eliminarlo senza copiarlo e di 
non inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.BRBRThis 
message, for the law 675/96, may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this for the addressee, you must 
not use, copy, disclose or take any action based on this message or any information 
herein. If you have received this message in error, please advise the sender 
immediately by reply e-mail and delete this message. Thank you for your cooperation.
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] estimating probit models

2003-10-23 Thread Millo Giovanni
Dear all,
I am looking for a convenient way to model a binary choice variable in R.
Would you suggest glm() with family=binomial(link=probit))? Is there something more 
focused on that kind of analysis? Or am I plainly wrong?
Cheers and thanx for your answers
Giovanni

Giovanni Millo
RD Dept.
Assicurazioni Generali SpA
Ai sensi della Legge 675/96 si precisa che le informazioni contenute in questo 
messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il messaggio in 
parola Le fosse pervenuto per errore, la preghiamo di eliminarlo senza copiarlo e di 
non inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.BRBRThis 
message, for the law 675/96, may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this for the addressee, you must 
not use, copy, disclose or take any action based on this message or any information 
herein. If you have received this message in error, please advise the sender 
immediately by reply e-mail and delete this message. Thank you for your cooperation.
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] loops in Sweave

2003-09-23 Thread Millo Giovanni
Dear all,

I was wondering whether there is a way to make loops in Sweave, i.e. for example to:
1) calculate a parameter, say, a=length(b)
2) according to that, add #a# chapters to the document, each including some repetitive 
analysis, each time done on a particular subset of the data indexed by the elements of 
1:a.
This would be of great help for repeating exploratory data analyses on, say, 
questionaries when the number of questions changes without having to change the Sweave 
.snw file.

Many thanx for your answers

Giovanni Millo
RD Dept.
Assicurazioni Generali SpA
Trieste, Italy



Ai sensi della Legge 675/96 si precisa che le informazioni contenute in questo 
messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il messaggio in 
parola Le fosse pervenuto per errore, la preghiamo di eliminarlo senza copiarlo e di 
non inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.BRBRThis 
message, for the law 675/96, may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this for the addressee, you must 
not use, copy, disclose or take any action based on this message or any information 
herein. If you have received this message in error, please advise the sender 
immediately by reply e-mail and delete this message. Thank you for your cooperation.
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help