Re: [R] how to do interpolation

2007-09-04 Thread gyadav

HI Yogesh


you can also try regularizing the time series by imputation etc. etc.


---
  Regards,
Gaurav Yadav (mobile: +919821286118)
Assistant Manager, CCIL, Mumbai (India)
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
Profile: http://www.linkedin.com/in/gydec25
  Keep in touch and keep mailing :-)
slow or fast, little or too much




Yogesh Tiwari [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
09/04/2007 04:04 PM

To
r-help@stat.math.ethz.ch
cc

Subject
[R] how to do interpolation






Hello R Users,

How to make a variable equidistance with time i.e. how to interpolate a
variable if it is not sampled at equal time interval.

Many thanks,

Regards,
Yogesh

 [[alternative HTML version deleted]]

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] ADF test

2007-08-16 Thread gyadav

Hi Megh

i hope you have confused with 'what is my NULL hypothesis' ?
i suggest you to take any ideal dataset about which you know that whether 
it is stationary or not ? apply the test to know what is the NULL 
hypothesis 
used in any software :)
usually in many softwares the NULL hypothesis is in negative sense. Please 
everybody comment on this :)

hoping that you series is return series and not price series :). Thus 
applying adf test for your series :)
my test show that your series is not stationary at all as my correlalogram 
comes as follows. 
1
0.998283718
0.997582959
0.99703921
0.99665648
0.996548006
0.99647617
0.995925698
0.995317271
0.994746317
0.994727781
0.99508777
0.99501576
0.99437404
0.993338292
0.992684933
0.992310313

@@@ m
Although if i assume that your series is a price series and defining 
return = 100*ln(pt/pt-1). Returns become as follows
0
-0.201816416
0.201816416
0
0.201409937
0
0
0
0
0.201005093
0
0
0
0
0.200601873
0
0.200200267
0.199800266
0
-0.199800266
0.199800266
0
0
0
0.199401861
-0.199401861
0.199401861
0
0.199005041
0
0
0
0
0.198609797
0
0
0
0
0
0.19821612
0
0.197824001
0
0
0.19743343
0
0
0
0.197044399
-0.197044399
0.197044399
0
0.196656897
0.196270917
0
-0.196270917
0.196270917
0
0
0
0
0
0
0
0.195886449
0
0
0
0
0
0
0.195503484
0
0
0
0.195122013
0.194742028
0
0
0
0
0.194363521
0
0
0
-0.194363521
0.194363521
0
0
0.193986482
0
0
0
0
0
0
0
0
0
0
0.193610903
0
0
0
0
0.193236775
0
0
0
0
0.192864091
0
0.192492841
0
0
0
0
0.192123018
0
0
0
0
0
0.191754613
0
0.191387618
0
0
0
0.191022026
0
0
0.190657827
-0.190657827
0
0.190657827
0.190295015
0
0
0
0
0
0
0.18993358
0
-0.18993358
0.18993358
0
0.189573516
0.189214815
0
0
0
0.188857469
0
0
0.18850147
0
0
0.18814681
0
0.187793482
0
then the value of autocorrelations i.e. correlalogram comes as approx 
1
0.089252308
0.058227292
0.017934984
0.025264591
-0.014925678
-0.004668544
0.014890995
0.001625333
0.010669589
-0.010587179
-0.03000206
-0.011863654
0.00772247
0.024272208
-0.019521244
-0.035998575
-0.061608877
-0.048401231
-0.008594859

which show that the values are quite likely to make series stationary :)

 data[1:10,]
 V1 V2
1  4.96  0.000
2  4.95 -0.2018164
3  4.96  0.2018164
4  4.96  0.000
5  4.97  0.2014099
6  4.97  0.000
7  4.97  0.000
8  4.97  0.000
9  4.97  0.000
10 4.98  0.2010051
 adf.test(data[,1])

Augmented Dickey-Fuller Test

data:  data[, 1] 
Dickey-Fuller = -1.1052, Lag order = 5, p-value = 0.9188
alternative hypothesis: stationary 

 adf.test(data[,2])

Augmented Dickey-Fuller Test

data:  data[, 2] 
Dickey-Fuller = -6.2265, Lag order = 5, p-value = 0.01
alternative hypothesis: stationary 

Warning message:
p-value smaller than printed p-value in: adf.test(data[, 2]) 
 

this explains everything clearly :)
your NULL hypothesis is Series is not stationary - hence hypothesis in 
negative sense

prooved by taking ideal data

 data1-rnorm(1) #normal data
 adf.test(data1)

Augmented Dickey-Fuller Test

data:  data1 
Dickey-Fuller = -21.2118, Lag order = 21, p-value = 0.01
alternative hypothesis: stationary 

Warning message:
p-value smaller than printed p-value in: adf.test(data1) 
 

HTH




Megh Dal [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
08/16/2007 04:27 PM

To
r-help@stat.math.ethz.ch
cc

Subject
[R] ADF test






Hi all,
 
  Hope you people do not feel irritated for repeatedly sending mail on 
Time series.
 
  Here I got another problem on the same, and hope I would get some answer 
from you.
 
  I have following dataset:
 
  data[,1]
  [1] 4.96 4.95 4.96 4.96 4.97 4.97 4.97 4.97 4.97 4.98 4.98 4.98 4.98 
4.98 4.99 4.99 5.00 5.01
 [19] 5.01 5.00 5.01 5.01 5.01 5.01 5.02 5.01 5.02 5.02 5.03 5.03 5.03 
5.03 5.03 5.04 5.04 5.04
 [37] 5.04 5.04 5.04 5.05 5.05 5.06 5.06 5.06 5.07 5.07 5.07 5.07 5.08 
5.07 5.08 5.08 5.09 5.10
 [55] 5.10 5.09 5.10 5.10 5.10 5.10 5.10 5.10 5.10 5.10 5.11 5.11 5.11 
5.11 5.11 5.11 5.11 5.12
 [73] 5.12 5.12 5.12 5.13 5.14 5.14 5.14 5.14 5.14 5.15 5.15 5.15 5.15 
5.14 5.15 5.15 5.15 5.16
 [91] 5.16 5.16 5.16 5.16 5.16 5.16 5.16 5.16 5.16 5.16 5.17 5.17 5.17 
5.17 5.17 5.18 5.18 5.18
[109] 5.18 5.18 5.19 5.19 5.20 5.20 5.20 5.20 5.20 5.21 5.21 5.21 5.21 
5.21 5.21 5.22 5.22 5.23
[127] 5.23 5.23 5.23 5.24 5.24 5.24 5.25 5.24 5.24 5.25 5.26 5.26 5.26 
5.26 5.26 5.26 5.26 5.27
[145] 5.27 5.26 5.27 5.27 5.28 5.29 5.29 5.29 5.29 5.30 5.30 5.30 5.31 
5.31 5.31 5.32 5.32 5.33
[163] 5.33

 
  Now I want to conduct a test for stationarity using ADF test :
 
   adf.test((data[,1]), stationary,  0)
  Augmented Dickey-Fuller Test
  data:  (data[, 1]) 
Dickey-Fuller = -3.7351, Lag order = 0, p-value = 0.02394
alternative hypothesis: stationary 

  But surprisingly it leads towards rejestion of NULL [p-value is less 
than 0.05], i.e. indicates a possible stationary series. However ploting a 
graph of actual data set it doesn't seem so.
 
  Am I making any mistakes ? Can anyone give me any suggestion?
 
  Regards,
  Megh

Re: [R] Slack variable in OR

2007-08-14 Thread gyadav

hi Amir

please see inline answers



Amir Safari [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
08/14/2007 02:37 PM

To
R-help@stat.math.ethz.ch
cc

Subject
[R] Slack variable in OR






 
 
 Hi dear R users,
 
@@@ although i have not understood your problemos clearly whatever i can 
help, i will tell

  Is it basically correct that a problem is ( linearly on nonlinearly ) 
modeled so that the slack variable is bounded by an upper bound ? 
 
  If so, how it can be handled and coded practically ?
 
  for example:
 
  x1+ x2 = b   so   x1 + x2 + s=b
 
  s=b- x1 - x2
 
  b- x1 - x2 = upper value
@@@ i assume that x1 and x2 are = 0, which is usually the case
@@@ then in that case if both x1=x2=0 then x3=50  which is its meximum 
value 
  But algorithms can not calculate b- x1 - x2 , because the matrices are 
not compatible. Or how can it be well coded ?
 @@@ where are the matrices i am just asking :-) 
  Thank you so much.
  Amir

 
-
Boardwalk for $500? In 2007? Ha! 

 [[alternative HTML version deleted]]

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] pakages

2007-08-14 Thread gyadav

please give details of the system, OS, etc which version of R you are 
using, how you are installing the packages

etc etc


---
  Regards,
Gaurav Yadav (mobile: +919821286118)
Assistant Manager, CCIL, Mumbai (India)
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
Profile: http://www.linkedin.com/in/gydec25
  Keep in touch and keep mailing :-)
slow or fast, little or too much




Safaa Najla [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
08/14/2007 04:29 PM

To
R-help@stat.math.ethz.ch
cc

Subject
[R] pakages






Good Morning
i am in doctorate.
i want to ask for the packages of R,
i tried to install it, but it appears  not found. each time i have to 
delete and install again the programme R.
Are there another method for installing the package?
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] State Space Modelling

2007-08-13 Thread gyadav

try help.search(state space) you will get pointer where you want to go


cm.state(CreditMetrics)   Computation of state space
dlmLL(dlm)Log likelihood evaluation for a 
state space model
SS(dse1)  State Space Models
balanceMittnik(dse1)  Balance a state space model
estSSMittnik(dse1)Estimate a State Space Model
estSSfromVARX(dse1)   Estimate a state space TSmodel 
using VAR estimation
l.SS(dse1)Evaluate a state space TSmodel
nstates(dse1) State Dimension of a State Space 
Model
toSS(dse1)Convert to State Space Model
toSSChol(dse1)Convert to Non-Innovation State 
Space Model
toSSinnov(dse1)   Convert to State Space 
Innovations Model
generateSSmodel(dse2) Randomly generate a state space 
model
ets(forecast) Exponential smoothing state 
space model
SS(sspir) Representation of Gaussian State 
Space Model
kfilter(sspir)Kalman filter for Gaussian state 
space model
recursion(sspir)  Simulate from a Gaussian state 
space model
smoother(sspir)   Kalman smoother for Gaussian 
state space model
ssm(sspir)Define state-space model in a 
glm-style call.
sspir(sspir)  State Space Models in R


and 
 RSiteSearch(state space)
http://search.r-project.org/cgi-bin/namazu.cgi?query=state+spacemax=20result=normalsort=scoreidxname=Rhelp02aidxname=functionsidxname=docs


post your code of S Plus, i feel there are many who can help you in this 
regards

HTH




Bernardo Ribeiro [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
08/14/2007 06:57 AM

To
r-help@stat.math.ethz.ch
cc

Subject
[R] State Space Modelling






Hey all,

I am trying to work under a State Space form, but I didn't get the help
exactly.
Have anyone eles used this functions?

I was used to work with S-PLUS, but I have some codes I need to adpt.

Thanks alot,

Bernardo

 [[alternative HTML version deleted]]

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] cointegration analysis

2007-08-09 Thread gyadav

i got this error, i dont remember what was the cause, but what i did work 
around was that see the example in the manual pages of the ca.po... etc 
and try to make your date in the same format. also just see whether the 
functions will take so many columns as a parameter. I have not checked it. 
Lastly see whether the data what you are using is not having any missing 
values or number in 'text' format


HTH



Dorina LAZAR [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
08/08/2007 10:15 PM

To
r-help@stat.math.ethz.ch
cc

Subject
[R] cointegration analysis







Hello,

I tried to use urca package (R) for cointegration analysis. The data
matrix to be investigated for cointegration contains 8 columns
(variables). Both procedures, Phillips  Ouliaris test and Johansen's
procedures give errors (error in evaluating the argument 'object' in
selecting a method for function 'summary' respectiv too many
variables, critical values cannot be computed”). What can I do?

With regards,

Dorina LAZAR
Department of Statistics, Forecasting, Mathematics
Babes Bolyai University, Faculty of Economic Science
Teodor Mihali 58-60, 400591 Cluj-Napoca, Romania

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:

This message and any attachments with it (the message) are confidential and 
intended
solely for the addressees. Unauthorized reading, copying, dissemination, 
distribution or
disclosure either whole or partial, is prohibited. If you receive this message 
in error,
please delete it and immediately notify the sender. Communicating through email 
is not
secure and capable of interception, corruption and delays. Anyone communicating 
with The
Clearing Corporation of India Limited (CCIL) by email accepts the risks 
involved and their
consequences. The internet can not guarantee the integrity of this message. 
CCIL shall
(will) not therefore be liable for the message if modified. The recipient 
should check this
email and any attachments for the presence of viruses. CCIL accepts no 
liability for any
damage caused by any virus transmitted by this email.

[[alternative HTML version deleted]]

__
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] cointegration analysis

2007-08-09 Thread gyadav

regrets
typo error - please read 'date' as 'data'


---
  Regards,
Gaurav Yadav (mobile: +919821286118)
Assistant Manager, CCIL, Mumbai (India)
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
Profile: http://www.linkedin.com/in/gydec25
  Keep in touch and keep mailing :-)
slow or fast, little or too much




[EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
08/09/2007 11:49 AM

To
Dorina LAZAR [EMAIL PROTECTED]
cc
r-help@stat.math.ethz.ch, [EMAIL PROTECTED]
Subject
Re: [R] cointegration analysis







i got this error, i dont remember what was the cause, but what i did work 
around was that see the example in the manual pages of the ca.po... etc 
and try to make your date in the same format. also just see whether the 
functions will take so many columns as a parameter. I have not checked it. 

Lastly see whether the data what you are using is not having any missing 
values or number in 'text' format


HTH



Dorina LAZAR [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
08/08/2007 10:15 PM

To
r-help@stat.math.ethz.ch
cc

Subject
[R] cointegration analysis







Hello,

I tried to use urca package (R) for cointegration analysis. The data
matrix to be investigated for cointegration contains 8 columns
(variables). Both procedures, Phillips  Ouliaris test and Johansen's
procedures give errors (error in evaluating the argument 'object' in
selecting a method for function 'summary' respectiv too many
variables, critical values cannot be computed”). What can I do?

With regards,

Dorina LAZAR
Department of Statistics, Forecasting, Mathematics
Babes Bolyai University, Faculty of Economic Science
Teodor Mihali 58-60, 400591 Cluj-Napoca, Romania

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:

This message and any attachments with it (the message) are confidential 
and intended
solely for the addressees. Unauthorized reading, copying, dissemination, 
distribution or
disclosure either whole or partial, is prohibited. If you receive this 
message in error,
please delete it and immediately notify the sender. Communicating through 
email is not
secure and capable of interception, corruption and delays. Anyone 
communicating with The
Clearing Corporation of India Limited (CCIL) by email accepts the risks 
involved and their
consequences. The internet can not guarantee the integrity of this 
message. CCIL shall
(will) not therefore be liable for the message if modified. The recipient 
should check this
email and any attachments for the presence of viruses. CCIL accepts no 
liability for any
damage caused by any virus transmitted by this email.

 [[alternative HTML version deleted]]

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:

This message and any attachments with it (the message) are confidential and 
intended
solely for the addressees. Unauthorized reading, copying, dissemination, 
distribution or
disclosure either whole or partial, is prohibited. If you receive this message 
in error,
please delete it and immediately notify the sender. Communicating through email 
is not
secure and capable of interception, corruption and delays. Anyone communicating 
with The
Clearing Corporation of India Limited (CCIL) by email accepts the risks 
involved and their
consequences. The internet can not guarantee the integrity of this message. 
CCIL shall
(will) not therefore be liable for the message if modified. The recipient 
should check this
email and any attachments for the presence of viruses. CCIL accepts no 
liability for any
damage caused by any virus transmitted by this email.

[[alternative HTML version deleted]]

__
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] help with ROC curve

2007-07-31 Thread gyadav

Hi Ritesh,

may be i can help, but yeah i will try  ? you can reach help to ROCR 
package by 
help.search(ROCR)

What is the structure of your data ? can you give some sample i.e. few 
lines of your dataset ?

To build ROC curve using only PSA(variable) alone of the original cohort
against the ROC of the Model of the original cohort.
what do you intend to do, please clarify more ? it sounds like you have 
been given tutorial, or you are working this for corporate ?

:) cheers





Rithesh M. Mohan [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
07/30/2007 01:06 PM

To
r-help@stat.math.ethz.ch
cc

Subject
[R] help with ROC curve






Hi 

 

I'm new to stats and R, so can you please help me or guide me building
ROC curve in an elaborate way with codes

I loaded ROCR package, but I'm not sure how to use it. 

 

Requirement

To build ROC curve using only PSA(variable) alone of the original cohort
against the ROC of the Model of the original cohort.

 

It would be really great if you could help me with this. 

 

Thanks 

Rithesh M Mohan

 


 [[alternative HTML version deleted]]

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] ROC curve in R

2007-07-30 Thread gyadav

Hi Ritesh
***please note Ritesh always mark a copy to the R-help mailing list :) ***

Please visit this link to get help in R
http://rocr.bioinf.mpi-sb.mpg.de/ROCR_Talk_Tobias_Sing.ppt#384,8,Examples 
(2/8): Precision/recall curves

futher :) what do you mean by PSA and cohort :) after some googling i got 
this

co·hort(khôrt)
n.
1. A group or band of people.
2. A companion or associate.
3. A generational group as defined in demographics, statistics, or market 
research: The cohort of people aged 30 to 39 . . . were more 
conservative American Demographics.
4. 
a. One of the 10 divisions of a Roman legion, consisting of 300 to 600 
men.
b. A group of soldiers.

and for PSA i got  Prostate-specific antigen. A substance produced by the 
prostate that may be found in an increased amount in the blood of men who 
have prostate cancer, benign prostatic hyperplasia, or infection or 
inflammation of the prostate.

Now please clarify what you want to model :) please dont take it otherwise 
i am not from biology field. Please clarify :)


Regards,

Gaurav Yadav
+++
Assistant Manager, CCIL, Mumbai (India)
Mob: +919821286118 Email: [EMAIL PROTECTED]
Bhagavad Gita:  Man is made by his Belief, as He believes, so He is



Rithesh M. Mohan [EMAIL PROTECTED] 
07/30/2007 01:30 PM

To
[EMAIL PROTECTED]
cc

Subject
Re: [R] ROC curve in R






Hi Gaurav,
 
Need your help, I’m relatively new to R or even stats, so can you please 
give me step by step details to get ROC curve in R.
 
Requirement.
 
To build ROC curve using only PSA(variable) alone of the original cohort 
against the ROC of the Model of the original cohort.
 


It would be really great if you could help me with this. 


 
Thanks and Regards
Rithesh



DISCLAIMER AND CONFIDENTIALITY CAUTION:

This message and any attachments with it (the message) are confidential and 
intended
solely for the addressees. Unauthorized reading, copying, dissemination, 
distribution or
disclosure either whole or partial, is prohibited. If you receive this message 
in error,
please delete it and immediately notify the sender. Communicating through email 
is not
secure and capable of interception, corruption and delays. Anyone communicating 
with The
Clearing Corporation of India Limited (CCIL) by email accepts the risks 
involved and their
consequences. The internet can not guarantee the integrity of this message. 
CCIL shall
(will) not therefore be liable for the message if modified. The recipient 
should check this
email and any attachments for the presence of viruses. CCIL accepts no 
liability for any
damage caused by any virus transmitted by this email.

[[alternative HTML version deleted]]

__
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] ROC curve in R

2007-07-30 Thread gyadav

Hi Ritesh,

 what i understad of ROC analysis will be coming in other mail :) 
excellent introduction can be found at 
http://www.csee.usf.edu/~candamo/site/papers/ROCintro.pdf

http://rocr.bioinf.mpi-sb.mpg.de/

take this zip file :)
http://rocr.bioinf.mpi-sb.mpg.de/ROCR_1.0-2.zip
also ROCR and analogue R manual :) they are having good examples :)

please read it in english with the papers given above then it would be 
really easy to interpret ROC curve.
Just try to grasp a simple thing that what is on x axis and what is on y 
axis, further whether the values are in ascending or descending order.
accordingly try to visualize how the ROC space has be analogly divided to 
give digital classification :)

code starts here and taken from manual of 
nanalogue
library(analogue)

## continue the example from roc()
example(roc)

## draw the ROC curve
plot(swap.roc, 1)

## draw the four default diagnostic plots
opar - par(mfrow = c(2,2))
plot(swap.roc)
par(opar)


#end of code snippet###



R software working session##

 
 ## draw the ROC curve
 plot(swap.roc, 1)
 
 ## draw the four default diagnostic plots
 opar - par(mfrow = c(2,2))
 plot(swap.roc)
 par(opar)
 ## continue the example from roc()
 example(roc)

roc ## continue the example from join()
roc example(join)

join ## load the example data
join data(swapdiat)

join data(swappH)

join data(rlgh)

join ## process so common set of columns for training and test
join ## number of training set samples
join n.train - nrow(swapdiat)

join ## merge training and test set on columns
join dat - join(swapdiat, rlgh, verbose = TRUE)

Summary:

Rows Cols
Data set 1:  167  277
Data set 2:  101  139
Merged:  268  277


join ## convert to proportions
join dat - dat / 100

join ## subset data back into training and test sets
join swapdiat - dat[1:n.train, ]

join rlgh - dat[(n.train+1):nrow(dat), ]

roc ## fit the MAT model using the squared chord distance measure
roc swap.mat - mat(swapdiat, swappH, method = SQchord)

roc ## fit the ROC curve to the SWAP diatom data using the MAT results
roc ## Generate a grouping for the SWAP lakes
roc clust - hclust(as.dist(swap.mat$Dij), method = ward)

roc grps - cutree(clust, 12)

roc ## fit the ROC curve
roc swap.roc - roc(swap.mat, groups = grps)

roc swap.roc

ROC curve of dissimilarities

Optimal Dissimilarity = 0.894 

AUC = 0.889, p-value:  2.22e-16
No. within: 1214   No. outside: 12647 

 
 ## draw the ROC curve
 plot(swap.roc, 1)
 
 ## draw the four default diagnostic plots
 opar - par(mfrow = c(2,2))
 plot(swap.roc)
 par(opar)
 


##end of demonstration session#



Sorry Gaurav,
 
I’ll make sure I mark a copy to r-help also.
 
As I have told, I’m new to R and even to statistics, so it will take some 
time for me to learn it.
 
Just help me get a simple ROC curve, please give an example of your own 
and explain the steps, no mater if its biology or any other field, I just 
need to get the logic behind it.
 
Thanks  Regards
Rithesh M Mohan
 
 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 30, 2007 4:28 PM
To: Rithesh M. Mohan
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] ROC curve in R
 

Hi Ritesh 
***please note Ritesh always mark a copy to the R-help mailing list :) *** 


Please visit this link to get help in R 
http://rocr.bioinf.mpi-sb.mpg.de/ROCR_Talk_Tobias_Sing.ppt#384,8,Examples 
(2/8): Precision/recall curves 

futher :) what do you mean by PSA and cohort :) after some googling i got 
this 

co·hort(khôrt) 
n. 
1. A group or band of people. 
2. A companion or associate. 
3. A generational group as defined in demographics, statistics, or market 
research: The cohort of people aged 30 to 39 . . . were more 
conservative American Demographics. 
4. 
a. One of the 10 divisions of a Roman legion, consisting of 300 to 600 
men. 
b. A group of soldiers. 

and for PSA i got  Prostate-specific antigen. A substance produced by the 
prostate that may be found in an increased amount in the blood of men who 
have prostate cancer, benign prostatic hyperplasia, or infection or 
inflammation of the prostate. 

Now please clarify what you want to model :) please dont take it otherwise 
i am not from biology field. Please clarify :) 


Regards,

Gaurav Yadav
+++
Assistant Manager, CCIL, Mumbai (India)
Mob: +919821286118 Email: [EMAIL PROTECTED]
Bhagavad Gita:  Man is made by his Belief, as He believes, so He is 


Rithesh M. Mohan [EMAIL PROTECTED] 
07/30/2007 01:30 PM 


To
[EMAIL PROTECTED] 
cc
 
Subject
Re: [R] ROC curve in R
 


 
 




Hi Gaurav, 
  
Need your help, I’m relatively new to R or even stats, so can you please 
give me step by step details to get ROC curve in R. 
  
Requirement. 
  
To build ROC curve using only PSA(variable) alone of the original cohort 
against the ROC of the Model of the original cohort. 
  


It would be 

Re: [R] ROC curve in R

2007-07-26 Thread gyadav

http://search.r-project.org/cgi-bin/namazu.cgi?query=ROCmax=20result=normalsort=scoreidxname=Rhelp02aidxname=functionsidxname=docs

there is a lot of help try help.search(ROC curve) gave
Help files with alias or concept or title matching 'ROC curve' using fuzzy 
matching:



granulo(ade4) Granulometric Curves
plot.roc(analogue)Plot ROC curves and associated 
diagnostics
roc(analogue) ROC curve analysis
colAUC(caTools)   Column-wise Area Under ROC Curve 
(AUC)
DProc(DPpackage)  Semiparametric Bayesian ROC 
curve analysis
cv.enet(elasticnet)   Computes K-fold cross-validated 
error curve for elastic net
ROC(Epi)  Function to compute and draw 
ROC-curves.
lroc(epicalc) ROC curve
cv.lars(lars) Computes K-fold cross-validated 
error curve for lars
roc.demo(TeachingDemos)   Demonstrate ROC curves by 
interactively building one

HTH
see the help and examples those will suffice

Type 'help(FOO, package = PKG)' to inspect entry 'FOO(PKG) TITLE'.



Regards,

Gaurav Yadav
+++
Assistant Manager, CCIL, Mumbai (India)
Mob: +919821286118 Email: [EMAIL PROTECTED]
Bhagavad Gita:  Man is made by his Belief, as He believes, so He is



Rithesh M. Mohan [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
07/26/2007 11:26 AM

To
R-help@stat.math.ethz.ch
cc

Subject
[R] ROC curve in R






Hi,

 

I need to build ROC curve in R, can you please provide data steps / code
or guide me through it.

 

Thanks and Regards

Rithesh M Mohan


 [[alternative HTML version deleted]]

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Regarding Bivariate normal distribution.

2007-07-25 Thread gyadav

Hi Arun

i hope you will fin this document useful :)
http://www.geocities.com/~mikemclaughlin/math_stat/Dists/Compendium.pdf

no they cannot be found uniquely. as rightly pointed by Mr. Wolfgang, that 
there will be infinite pairs for each x you can get correspoinding y

above document will be of use :)


Regards,

Gaurav Yadav
+++
Assistant Manager, CCIL, Mumbai (India)
Mob: +919821286118 Email: [EMAIL PROTECTED]
Bhagavad Gita:  Man is made by his Belief, as He believes, so He is



Arun Kumar Saha [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
07/25/2007 12:27 PM

To
r-help@stat.math.ethz.ch R-help@stat.math.ethz.ch
cc

Subject
[R] Regarding Bivariate normal distribution.






Dear all R gurus,

My question is related to statistics rather directly to R. Suppose
(X,Y) has a bivariate normal distrubution. I want to find two values
of X and Y say x, and y respectively, such that:

P[Xx, Yy] = 0.05

My questions are :

1. Can x and y be uniquely found?
2. If it is, how I can find them using R

Your help will be highly appreciated.

Thanks and regards,

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] R and Copula

2007-07-18 Thread gyadav

hi meeryana,

may be this time nobnody is responding. but dont worry you will get a lot 
of help eventually, so always post a copy to the mailing list.
The reason is there are a lot many newbies, although i am also not so old 
enough, who have even the simplest questions but are hesitant to ask.
the objective of the list is to help, and thus feel free to ask, stand and 
contribute :-) i hope you will understand not today then tomorrow as you 
will get associated with the mailing list more closely. Personally i have 
found friends here. Further, never post a mail with a loose subject and 
secondly try to maintain the thread i.e. reply to the mail which you want 
to reply(for more details refer to the posting guide) :-) that would 
really help. 

Yes now regarding your question :-) 

Step1 : List of all packages can be found at this link :-)
http://cran.r-project.org/src/contrib/PACKAGES.html
Step2: Click on the package you want to install :-) 
http://cran.r-project.org/src/contrib/Descriptions/copula.html
Step3: Then download the binary of your Operating system. If windows then 
download corresponding zip file.
for copula it is
 http://cran.r-project.org/bin/windows/contrib/r-release/copula_0.5-3.zip
save zip file on your system
Step4 Open your R rpogram
Step5: Goto Packages - Install packages from Local Zip file
Step6: Select your package zip file which you want to install
Step7: Sit back and relax
Step8: load the library using library(LibraryName) on R prompt

There are alternate ways of installing the package directly from R prompt. 
It didn't worked for me a long time back, so  i always adopt this method.
Somebody on the list may help you in this regards :-)

bye and learn
Join and stand with Open Source and R community
Cheers and Chiao, Welcome
-gaurav



dear Mr. Yadav,

I want to thank for help, 
and for that you are only who is willing to help,
but I have one question:
because I'm new with R project also, I think I should install a package 
for copula.
I have only installed R program.
How should I install this package? And is it what I have also to do with 
credit metrics, Value at Risk, matix and the other formulas, I mean 
install packages.

I hope that you have a little time for me and my problem, and I hope I'm 
not disturbing you.
thank you for all you can do for me 

and 

best regards,

Mirjana




gyadav wrote:
 
 
 hi
 
 see the code below i hope this will make your understanding of copulas 
 better
 this code plots two normal distribution and their joint distribution 
 N[0,2]  N[0,4]
 
 HTH
 
 ##code
 library(copula)
 ###copy in two parts in R#
 
 ##PART A##
 ## construct a bivariate distribution whose marginals
 ## are normal and Normal respectively, coupled
 ## together via a normal copula
 op - par(mfrow = c(2, 2), # 2 x 2 pictures on one plot
   pty = s)   # square plotting region,
# independent of device size
 
 x - mvdc(normalCopula(0.75), c(norm, norm),
 list(list(mean = 0, sd =2),list(mean = 0, sd =4)))
 x.samp - rmvdc(x, 1)
 par(mfrow=c(2,3))
 hist(x.samp[,1],xlab=Normal)
 hist(x.samp[,2],xlab=Normal)
 plot(x.samp[,2],x.samp[,1],pch=21,xlab=Normal,ylab=Normal)
 
 plot(dmvdc(x, x.samp))
 plot(pmvdc(x, x.samp))
 
 ## At end of plotting, reset to previous settings:
 
 
 ###PART B###
 par(op)
 for (i in seq(1:360)){
 persp(x, dmvdc, xlim = c(-4, 4), ylim=c(0, 1),theta=i)
 }
 
 
 Regards,
 
 Gaurav Yadav
 +++
 Assistant Manager, CCIL, Mumbai (India)
 Mob: +919821286118 Email: [EMAIL PROTECTED]
 Bhagavad Gita:  Man is made by his Belief, as He believes, so He is
 
 
 
 copula [EMAIL PROTECTED] 
 Sent by: [EMAIL PROTECTED]
 07/17/2007 12:53 PM
 
 To
 r-help@stat.math.ethz.ch
 cc
 
 Subject
 Re: [R] R and Copula
 
 
 
 
 
 
 
 it would be great when somebody will help me
 thanks
 
 
 copula wrote:
 
 hi,
 first I want to say that I'm new here, and new with copula and R.
 
 That is the reason why I'm writing, if somebody can help me. 
 
 I have to make an example of Copula. 
 On internet I've found this forum and that copula can calculate with R.
 
 Can somebody help me with the thing how can I start and where can read
 about these stuffs.
 
 Thank to all who can help!
 
 
 
 
 
 -- 
 View this message in context: 
 http://www.nabble.com/R-and-Copula-tf4085867.html#a11644534
 Sent from the R help mailing list archive at Nabble.com.
 
 __
 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.
 
 
 
 

 DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message

Re: [R] R and Copula

2007-07-17 Thread gyadav

hi

see the code below i hope this will make your understanding of copulas 
better
this code plots two normal distribution and their joint distribution 
N[0,2]  N[0,4]

HTH

##code
library(copula)
###copy in two parts in R#

##PART A##
## construct a bivariate distribution whose marginals
## are normal and Normal respectively, coupled
## together via a normal copula
op - par(mfrow = c(2, 2), # 2 x 2 pictures on one plot
  pty = s)   # square plotting region,
   # independent of device size

x - mvdc(normalCopula(0.75), c(norm, norm),
list(list(mean = 0, sd =2),list(mean = 0, sd =4)))
x.samp - rmvdc(x, 1)
par(mfrow=c(2,3))
hist(x.samp[,1],xlab=Normal)
hist(x.samp[,2],xlab=Normal)
plot(x.samp[,2],x.samp[,1],pch=21,xlab=Normal,ylab=Normal)

plot(dmvdc(x, x.samp))
plot(pmvdc(x, x.samp))

## At end of plotting, reset to previous settings:


###PART B###
par(op)
for (i in seq(1:360)){
persp(x, dmvdc, xlim = c(-4, 4), ylim=c(0, 1),theta=i)
}


Regards,

Gaurav Yadav
+++
Assistant Manager, CCIL, Mumbai (India)
Mob: +919821286118 Email: [EMAIL PROTECTED]
Bhagavad Gita:  Man is made by his Belief, as He believes, so He is



copula [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
07/17/2007 12:53 PM

To
r-help@stat.math.ethz.ch
cc

Subject
Re: [R] R and Copula







it would be great when somebody will help me
thanks


copula wrote:
 
 hi,
 first I want to say that I'm new here, and new with copula and R.
 
 That is the reason why I'm writing, if somebody can help me. 
 
 I have to make an example of Copula. 
 On internet I've found this forum and that copula can calculate with R.
 
 Can somebody help me with the thing how can I start and where can read
 about these stuffs.
 
 Thank to all who can help!
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/R-and-Copula-tf4085867.html#a11644534
Sent from the R help mailing list archive at Nabble.com.

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] R and Copula

2007-07-17 Thread gyadav

sorry forgot to add that the code sent in previous mail is basically 
modified code which is given in manual of copula package


Regards,

Gaurav Yadav
+++
Assistant Manager, CCIL, Mumbai (India)
Mob: +919821286118 Email: [EMAIL PROTECTED]
Bhagavad Gita:  Man is made by his Belief, as He believes, so He is



copula [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
07/17/2007 12:53 PM

To
r-help@stat.math.ethz.ch
cc

Subject
Re: [R] R and Copula







it would be great when somebody will help me
thanks


copula wrote:
 
 hi,
 first I want to say that I'm new here, and new with copula and R.
 
 That is the reason why I'm writing, if somebody can help me. 
 
 I have to make an example of Copula. 
 On internet I've found this forum and that copula can calculate with R.
 
 Can somebody help me with the thing how can I start and where can read
 about these stuffs.
 
 Thank to all who can help!
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/R-and-Copula-tf4085867.html#a11644534
Sent from the R help mailing list archive at Nabble.com.

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Help in ARIMA

2007-06-19 Thread gyadav

Hi Roshan

see inline for answer







waiting time. Can I do this using any of the models used in R?
/* i feel this sounds more or less like a queueing model. Try 
searching M/M/1 queueing model on internet.
Further, i feel look at poission distribution may also be helpful. It was 
Long Long time back, more than a decade, when i used GPSS software as i 
cannot see anything susbstantial in 
help.search(queue)/help.search(queueingmodel)to model queues. i would 
be of little help in remembering all those, but i would exten help to 
whaever extent i can. */
Particularly forecast...Can I used ARIMA or ARMA for this? ...The 
problem
/***
i doubt but may regularizing the series by either transformations and then 
imputing it may turn irregular series into a time series. but the 
possibilities are bleak. **/

Particularly forecast...Can I used ARIMA or ARMA for this? ...The 
problem
is I don't think I'm dealing with time series because the measurements of
waiting times (at a particular state i.e. job submission) ain't done at
regular intervals. Could anyone please suggest a model for this?

Thanking you,
RS

 [[alternative HTML version deleted]]

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Conditional Sums for Index creation

2007-05-14 Thread gyadav

Hello

My dear friend the problem is not very heavy its very light, but you 
have to assume somethings.
as you say that any new stock can come anytime and go anytime, further, 
any time NA can come .

both statements are so close that it would be nearly impossible to know 
which one is NA (of before the start of series and which one is end of 
series ) and 
which one is NA of series of genuine data which is missing for one day or 
two.

There can be n number of workarounds depending on the propersties of 
dataset.
for e.g.


1.
Given that genuine data is not having not more than two NA consequtively
Work around : Check for past two days that NAs are there or not
Flaw: Will be a lagged kind of computation

2. 
Given that series will have continuously NAs 
Work around : you can go for checking for whole of the past data whether 
there was any number or all NAs
Flaw : Based on backward looking hence will never know that new stock has 
come or not.
e,g, stock may have come but the observation was not recorded hence NA

etc etc

clarify more of your stand, do you get information before hand that today 
stock will get added or deleted.
meaning any exogenous information which will help to optimize it




Regards,

Gaurav Yadav
+++
Assistant Manager, CCIL, Mumbai (India)
Mob: +919821286118 Email: [EMAIL PROTECTED]
Bhagavad Gita:  Man is made by his belief, as He believes, so He is





Patnaik, Tirthankar  [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
05/14/2007 11:53 AM

To
r-help@stat.math.ethz.ch
cc

Subject
[R] Conditional Sums for Index creation






Hi,
 Apologies for the long mail. I have a data.frame with 
columns of
price/mcap data for a portfolio of stocks, and the date. To get the
total value of the portfolio on a daily basis, I calculate rowSums of
the data.frame. 

 set.seed(1)
 ab - matrix(round(runif(100)*100),nrow=20,ncol=5)
 ab[1:5,4:5] - NA
 ab[6:10,5] - NA
 ac - as.data.frame(ifelse(ab = 7,NA,ab))
 ac
   V1 V2 V3 V4 V5
1  27 93 82 NA NA
2  37 21 65 NA NA
3  57 65 78 NA NA
4  91 13 55 NA NA
5  20 27 53 NA NA
6  90 39 79 26 NA
7  94 NA NA 48 NA
8  66 38 48 77 NA
9  63 87 73  8 NA
10 NA 34 69 88 NA
11 21 48 48 34 24
12 18 60 86 84 NA
13 69 49 44 35 64
14 38 19 24 33 88
15 77 83 NA 48 78
16 50 67 10 89 80
17 72 79 32 86 46
18 99 11 52 39 41
19 38 72 66 78 81
20 78 41 41 96 60
 

Here the rows 1:20 are dates (also in my data.frame). 

Since some of the prices have NA, the rowSums is made to ignore these
entries. 

 rowSums(ac,na.rm=TRUE)
  1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18
19  20 
202 123 200 159 100 234 142 229 231 191 175 248 261 202 286 296 315 242
335 316 
 

Stocks are being added to the portfolio too. So from date=6 (or row=6)
we have the 4th stock V4, and from date=11, we have the 5th stock V5. My
problem is that I need to calculate the rowSums for row=6 (When a new
stock was added), _with_ and _without_ the new stock. So my answer for
row=6 would be 234 for the plain row-sum, and 234 - 26 = 208 for the
original set of stocks (without V4). Similarly, my answer for row=11
would be 175 for the plain sum, and 175 - 24 = 151 for the original sum
(without V5). 

Basically I'm interested in finding out the value of the portfolio with
and without the new stock for the purposes of creating an index. It's
possible that some stocks my get dropped later, in which case there
would be an NA series starting for say V1 at row=18 and so on. In that
case, the aim would be to find the sum at row=18 with and without the
value of V1. 

Is there any way I can get the sum over columns, deleting specific
colums? To get the columns that are NA in any row, I tried (shown for
the first 12 rows):

 apply(ac[1:12,],1,function(y)which(is.na(y)))

Which correctly gives 

$`1`
V4 V5 
 4  5 

$`2`
V4 V5 
 4  5 

$`3`
V4 V5 
 4  5 

$`4`
V4 V5 
 4  5 

$`5`
V4 V5 
 4  5 

$`6`
V5 
 5 

$`7`
V2 V3 V5 
 2  3  5 

$`8`
V5 
 5 

$`9`
V5 
 5 

$`10`
V1 V5 
 1  5 

$`11`
integer(0)

$`12`
V5 
 5 

 

But now I'm stuck. I don't how to use this list of indices at each row
to exclude my columns. 

Any pointers please? Would such an exercise be easier if I use a
time-series based object, like a zoo.


TIA and best,
-Tir

Tirthankar Patnaik
India Strategy
Citigroup Investment Research
+91-22-6631 9887

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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, 

Re: [R] Conditional Sums for Index creation

2007-05-14 Thread gyadav

Hi Tirthankar

this will help you

ind is a matrix which indicates the start of any new stock.
ind[i,j] means that in j + 1 column all the values from 1st row to i - 1 
row are all NAs.



 x
  V2 V3 V4 V5 V6
 [1,] 27 93 82 NA NA
 [2,] 37 21 65 NA NA
 [3,] 57 65 78 NA NA
 [4,] 91 13 55 NA NA
 [5,] 20 27 53 NA NA
 [6,] 90 39 79 26 NA
 [7,] 94 NA NA 48 NA
 [8,] 66 38 48 77 NA
 [9,] 63 87 73  8 NA
[10,] NA 34 69 88 NA
[11,] 21 48 48 34 24
[12,] 18 60 86 84 NA
[13,] 69 49 44 35 64
[14,] 38 19 24 33 88
[15,] 77 83 NA 48 78
[16,] 50 67 10 89 80
[17,] 72 79 32 86 46
[18,] 99 11 52 39 41
[19,] 38 72 66 78 81
[20,] 78 41 41 96 60
 
 for ( j in 1:length(x[1,]) - 1) {
+ for ( i in 2:length(x[,1])) {
+ indicator-TRUE
+ for (k in 1: i - 1){
+ indicator - indicator  is.na(x[k,j+1])
+ }
+ ind[i,j]-indicator
+ 
+ }
+ }
 ind
  V2 V3 V4 V5 V6
 [1,] NA NA NA NA NA
 [2,]  0  0 NA NA  0
 [3,]  0  0 NA NA  0
 [4,]  0  0 NA NA  0
 [5,]  0  0 NA NA  0
 [6,]  0  0 NA NA  0
 [7,]  0  0  0 NA  0
 [8,]  0  0  0 NA  0
 [9,]  0  0  0 NA  0
[10,]  0  0  0 NA  0
[11,]  0  0  0 NA  0
[12,]  0  0  0  0  0
[13,]  0  0  0  0  0
[14,]  0  0  0  0  0
[15,]  0  0  0  0  0
[16,]  0  0  0  0  0
[17,]  0  0  0  0  0
[18,]  0  0  0  0  0
[19,]  0  0  0  0  0
[20,]  0  0  0  0  0
 


Regards,

Gaurav Yadav
+++
Assistant Manager, CCIL, Mumbai (India)
Mob: +919821286118 Email: [EMAIL PROTECTED]
Bhagavad Gita:  Man is made by his Belief, as He believes, so He is



Patnaik, Tirthankar  [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
05/14/2007 11:53 AM

To
r-help@stat.math.ethz.ch
cc

Subject
[R] Conditional Sums for Index creation






Hi,
 Apologies for the long mail. I have a data.frame with 
columns of
price/mcap data for a portfolio of stocks, and the date. To get the
total value of the portfolio on a daily basis, I calculate rowSums of
the data.frame. 

 set.seed(1)
 ab - matrix(round(runif(100)*100),nrow=20,ncol=5)
 ab[1:5,4:5] - NA
 ab[6:10,5] - NA
 ac - as.data.frame(ifelse(ab = 7,NA,ab))
 ac
   V1 V2 V3 V4 V5
1  27 93 82 NA NA
2  37 21 65 NA NA
3  57 65 78 NA NA
4  91 13 55 NA NA
5  20 27 53 NA NA
6  90 39 79 26 NA
7  94 NA NA 48 NA
8  66 38 48 77 NA
9  63 87 73  8 NA
10 NA 34 69 88 NA
11 21 48 48 34 24
12 18 60 86 84 NA
13 69 49 44 35 64
14 38 19 24 33 88
15 77 83 NA 48 78
16 50 67 10 89 80
17 72 79 32 86 46
18 99 11 52 39 41
19 38 72 66 78 81
20 78 41 41 96 60
 

Here the rows 1:20 are dates (also in my data.frame). 

Since some of the prices have NA, the rowSums is made to ignore these
entries. 

 rowSums(ac,na.rm=TRUE)
  1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18
19  20 
202 123 200 159 100 234 142 229 231 191 175 248 261 202 286 296 315 242
335 316 
 

Stocks are being added to the portfolio too. So from date=6 (or row=6)
we have the 4th stock V4, and from date=11, we have the 5th stock V5. My
problem is that I need to calculate the rowSums for row=6 (When a new
stock was added), _with_ and _without_ the new stock. So my answer for
row=6 would be 234 for the plain row-sum, and 234 - 26 = 208 for the
original set of stocks (without V4). Similarly, my answer for row=11
would be 175 for the plain sum, and 175 - 24 = 151 for the original sum
(without V5). 

Basically I'm interested in finding out the value of the portfolio with
and without the new stock for the purposes of creating an index. It's
possible that some stocks my get dropped later, in which case there
would be an NA series starting for say V1 at row=18 and so on. In that
case, the aim would be to find the sum at row=18 with and without the
value of V1. 

Is there any way I can get the sum over columns, deleting specific
colums? To get the columns that are NA in any row, I tried (shown for
the first 12 rows):

 apply(ac[1:12,],1,function(y)which(is.na(y)))

Which correctly gives 

$`1`
V4 V5 
 4  5 

$`2`
V4 V5 
 4  5 

$`3`
V4 V5 
 4  5 

$`4`
V4 V5 
 4  5 

$`5`
V4 V5 
 4  5 

$`6`
V5 
 5 

$`7`
V2 V3 V5 
 2  3  5 

$`8`
V5 
 5 

$`9`
V5 
 5 

$`10`
V1 V5 
 1  5 

$`11`
integer(0)

$`12`
V5 
 5 

 

But now I'm stuck. I don't how to use this list of indices at each row
to exclude my columns. 

Any pointers please? Would such an exercise be easier if I use a
time-series based object, like a zoo.


TIA and best,
-Tir

Tirthankar Patnaik
India Strategy
Citigroup Investment Research
+91-22-6631 9887

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide 

Re: [R] Value at Risk

2007-05-11 Thread gyadav

reply is inline





Hello Gaurav,

The function:

 VaR(tstock[,2],alpha=0.01) # gives the same VaR as above with historical 
simulation
VaR 
-2.86 

but i tried this function for normal distribution: 

 VaR.norm (tstock[,2],p=0.99)$VaR
Error in VaR.norm(tstock[, 2], p = 0.99) : 
Negative value in parameter 'ydat'
@@@ if you have seen the help manual then you mus have got that you dont 
need to give the retun series.
R is trying to calucate the logarithm of a negative number which is why it 
is throwing you error.
try this instead
 XXX-VaR.norm(stock$ESPA.STOCK.EUROPE,p=0.01)
 XXX$VaR
[1] -3.11079
 

I dont understand the way with the normal distribution :( Maybe you can 
help me a littble bit. 
Cheers :-)

KR,
Alin Soare

2007/5/11, [EMAIL PROTECTED] [EMAIL PROTECTED]: 

reply is inline 

-  Regards,

 \\\|///
  \\   --   //
   (  o   o  )
oOOo-(_)-oOOo
|
| Gaurav Yadav
| Assistant Manager, CCIL, Mumbai (India)
| Mob: +919821286118 Email: [EMAIL PROTECTED]
| Man is made by his belief, as He believes, so He is.
|   --- Bhagavad Gita 
|___Oooo
oooO(  )
(  )   )   /
 \   ((_/
   \_ )


Hello Mr. Gaurav Yadav,
Hi Soare, 
1. I want to calculate the 99%VaR/1 day for the stock fonds, after sorting 
the values the 5th or 6th value is it?
In Historical simulation it is the 5th value.. because it tells you to 
be more cautious that a higher loss 'may' be there, secondly VaR only 
shows the possibility and not the maximum loss which you can incur :-) 
cheers
2. How do I calculate it under normal distribution aproximation? 
Well there is also a normal method or variance - covariance method which 
assumes normal distribution :-) 
if you want to incorporate recency effect then you can also see boudhouks 
method 

try this  paper which will give you very good understanding of various 
methods of VaR 

http://papers.ssrn.com/sol3/papers.cfm?abstract_id=51420#PaperDownload 




++
apply(tstock,2,function(x) VaR(x,alpha=0.01)) # are these the right VaR's
for the stockfonds?
@@@ you can yourself see it, you have around 579 observation and 1% of it 
mean 5.79th observation 
Thus if you become risk averse then you take the 5th smallest value and 
otherwise 6th value. 
So just sort the returns in ascending order and then see the 5th and the 
6th values 


 sorted_espa_stock_europe-sort(tstock[,2]) 
 sorted_espa_stock_europe[5] 
[1] -2.86 
 sorted_espa_stock_europe[6] 
[1] -2.74 
 

your code gives -2.86 thus you can get the rest :-) cheers 



DISCLAIMER AND CONFIDENTIALITY CAUTION:

This message and any attachments with it (the message) are confidential 
and intended
solely for the addressees. Unauthorized reading, copying, dissemination, 
distribution or
disclosure either whole or partial, is prohibited. If you receive this 
message in error,
please delete it and immediately notify the sender. Communicating through 
email is not
secure and capable of interception, corruption and delays. Anyone 
communicating with The
Clearing Corporation of India Limited (CCIL) by email accepts the risks 
involved and their
consequences. The internet can not guarantee the integrity of this 
message. CCIL shall
(will) not therefore be liable for the message if modified. The recipient 
should check this
email and any attachments for the presence of viruses. CCIL accepts no 
liability for any
damage caused by any virus transmitted by this email.




DISCLAIMER AND CONFIDENTIALITY CAUTION:

This message and any attachments with it (the message) are confidential and 
intended
solely for the addressees. Unauthorized reading, copying, dissemination, 
distribution or
disclosure either whole or partial, is prohibited. If you receive this message 
in error,
please delete it and immediately notify the sender. Communicating through email 
is not
secure and capable of interception, corruption and delays. Anyone communicating 
with The
Clearing Corporation of India Limited (CCIL) by email accepts the risks 
involved and their
consequences. The internet can not guarantee the integrity of this message. 
CCIL shall
(will) not therefore be liable for the message if modified. The recipient 
should check this
email and any attachments for the presence of viruses. CCIL accepts no 
liability for any
damage caused by any virus transmitted by this email.
[[alternative HTML version deleted]]

__
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] Value at Risk

2007-05-11 Thread gyadav

Hi Saore

***Please always mark a copy to the R-help list, it may be helpfull to 
many, you have forgotten twice***
*** Do Reply to all with history ***
 :-) cheers




YOU ARE THE BEST :)

I have some problems understanding R, but R and I will be friends in the 
future hehe :)

I have another problem with investing in one of this stockfonds.
Lets say I would invest in the europe stockfonds on 2.5.2006 1000 dollar. 
What would be the 99%VaR/1 day under historical simulation? The same as 
above?
@@@ So what do you think, -2.86 number means Lets investigate

suppose you have invested 1000, one way to realize is 
100*ln(Tommorow/Todays) = -2.86 (out return) where Todays = 1000
hence Tommorow = 1000*exp(-2.86/100) = 971.8051 , therefore Loss = 1000 - 
971.8051 = 28.19489

I hope this would make your understanding much better and clear about VaR 
:-) 
HTH

KR,
Alin

2007/5/11, [EMAIL PROTECTED] [EMAIL PROTECTED]:

reply is inline 





Hello Gaurav,

The function:

 VaR(tstock[,2],alpha=0.01) # gives the same VaR as above with historical 
simulation
VaR 
-2.86 

but i tried this function for normal distribution: 

 VaR.norm (tstock[,2],p=0.99)$VaR
Error in VaR.norm(tstock[, 2], p = 0.99) : 
   Negative value in parameter 'ydat'
@@@ if you have seen the help manual then you mus have got that you dont 
need to give the retun series. 
R is trying to calucate the logarithm of a negative number which is why it 
is throwing you error. 
try this instead 
 XXX-VaR.norm(stock$ESPA.STOCK.EUROPE,p=0.01) 
 XXX$VaR 
[1] -3.11079 
 

I dont understand the way with the normal distribution :( Maybe you can 
help me a littble bit. 
Cheers :-)

KR,
Alin Soare

2007/5/11, [EMAIL PROTECTED] [EMAIL PROTECTED]: 

reply is inline 

-  Regards,

\\\|///
 \\   --   //
  (  o   o  )
oOOo-(_)-oOOo
|
| Gaurav Yadav
| Assistant Manager, CCIL, Mumbai (India)
| Mob: +919821286118 Email: [EMAIL PROTECTED] 
| Man is made by his belief, as He believes, so He is.
|   --- Bhagavad Gita 
|___Oooo
   oooO(  )
   (  )   )   /
\   ((_/
  \_ )


Hello Mr. Gaurav Yadav,
Hi Soare, 
1. I want to calculate the 99%VaR/1 day for the stock fonds, after sorting 
the values the 5th or 6th value is it?
In Historical simulation it is the 5th value.. because it tells you to 
be more cautious that a higher loss 'may' be there, secondly VaR only 
shows the possibility and not the maximum loss which you can incur :-) 
cheers
2. How do I calculate it under normal distribution aproximation? 
Well there is also a normal method or variance - covariance method which 
assumes normal distribution :-) 
if you want to incorporate recency effect then you can also see boudhouks 
method 

try this  paper which will give you very good understanding of various 
methods of VaR 

http://papers.ssrn.com/sol3/papers.cfm?abstract_id=51420#PaperDownload 




++
apply(tstock,2,function(x) VaR(x,alpha=0.01)) # are these the right VaR's
for the stockfonds?
@@@ you can yourself see it, you have around 579 observation and 1% of it 
mean 5.79th observation 
Thus if you become risk averse then you take the 5th smallest value and 
otherwise 6th value. 
So just sort the returns in ascending order and then see the 5th and the 
6th values 


 sorted_espa_stock_europe-sort(tstock[,2]) 
 sorted_espa_stock_europe[5] 
[1] -2.86 
 sorted_espa_stock_europe[6] 
[1] -2.74 
 

your code gives -2.86 thus you can get the rest :-) cheers 


DISCLAIMER AND CONFIDENTIALITY CAUTION:

This message and any attachments with it (the message) are confidential 
and intended
solely for the addressees. Unauthorized reading, copying, dissemination, 
distribution or
disclosure either whole or partial, is prohibited. If you receive this 
message in error,
please delete it and immediately notify the sender. Communicating through 
email is not
secure and capable of interception, corruption and delays. Anyone 
communicating with The
Clearing Corporation of India Limited (CCIL) by email accepts the risks 
involved and their
consequences. The internet can not guarantee the integrity of this 
message. CCIL shall
(will) not therefore be liable for the message if modified. The recipient 
should check this
email and any attachments for the presence of viruses. CCIL accepts no 
liability for any
damage caused by any virus transmitted by this email.



DISCLAIMER AND CONFIDENTIALITY CAUTION:

This message and any attachments with it (the message) are confidential 
and intended
solely for the addressees. Unauthorized reading, copying, dissemination, 
distribution or
disclosure either whole or partial, is prohibited. If you receive this 
message in error,
please delete it and immediately notify the sender. 

Re: [R] Value at Risk

2007-05-10 Thread gyadav

reply is inline

-  Regards,

  \\\|///
   \\   --   //
(  o   o  )
oOOo-(_)-oOOo
|
| Gaurav Yadav
| Assistant Manager, CCIL, Mumbai (India)
| Mob: +919821286118 Email: [EMAIL PROTECTED]
| Man is made by his belief, as He believes, so He is.
|   --- Bhagavad Gita 
|___Oooo
 oooO(  )
 (  )   )   /
  \   ((_/
\_ )



++
apply(tstock,2,function(x) VaR(x,alpha=0.01)) # are these the right VaR's
for the stockfonds?
@@@ you can yourself see it, you have around 579 observation and 1% of it 
mean 5.79th observation
Thus if you become risk averse then you take the 5th smallest value and 
otherwise 6th value.
So just sort the returns in ascending order and then see the 5th and the 
6th values


 sorted_espa_stock_europe-sort(tstock[,2])
 sorted_espa_stock_europe[5]
[1] -2.86
 sorted_espa_stock_europe[6]
[1] -2.74
 

your code gives -2.86 thus you can get the rest :-) cheers

.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Getting the last day of the month.

2007-05-10 Thread gyadav

http://finzi.psych.upenn.edu/R/library/fCalendar/html/3D-TimeDateSpecDates.html

try this also RSiteSearch(last day of the month) to get more pointers


-  Regards,

  \\\|///
   \\   --   //
(  o   o  )
oOOo-(_)-oOOo
|
| Gaurav Yadav
| Assistant Manager, CCIL, Mumbai (India)
| Mob: +919821286118 Email: [EMAIL PROTECTED]
| Man is made by his belief, as He believes, so He is.
|   --- Bhagavad Gita 
|___Oooo
 oooO(  )
 (  )   )   /
  \   ((_/
\_ )




Patnaik, Tirthankar  [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
05/10/2007 07:12 PM

To
r-help@stat.math.ethz.ch
cc

Subject
[R] Getting the last day of the month.






Hi,
 Given a date, how do I get the last date of that month? I 
have
data in the form MM, that I've read as a date using

 x$Date -
as.Date(ISOdate(substr(x$YearEnd,1,4),substr(x$YearEnd,5,6),1))

But this gives the first day of the month. To get the last day of the
month, I tried 

 as.Date(as.yearmon(x$Date,frac=0))

But I don't get the last day of the month here. (Tried frac=1 too.)

I then add a month to the date, substract one day from the resultant
date. But this wouldn't work for December.

 x$YearEnd
 [1] 200203 200303 200403 200503 200603 200603 200312 200503 200603
200203 200303
[12] 200403 200503 200512 200612 200203 200303 200403 200503 200603
 
 x$Date - as.Date(ISOdate(substr(x$YearEnd,1,4),
+ as.integer(substr(x$YearEnd,5,6))+1,
+ 1))-1
 x$Date
 [1] 2002-03-31 2003-03-31 2004-03-31 2005-03-31 2006-03-31
2006-03-31
 [7] NA   2005-03-31 2006-03-31 2002-03-31 2003-03-31
2004-03-31
[13] 2005-03-31 NA   NA   2002-03-31 2003-03-31
2004-03-31
[19] 2005-03-31 2006-03-31

So I add a year, and set the month to 1 in a quick function.

 GetEOM - function(mm=200406){
 year - as.integer(substr(mm,1,4))
 month - as.integer(substr(mm,5,6))
 if (month==12){
 date - as.Date(ISOdate(year+1,1,1))-1
 }else{
 date - 
as.Date(ISOdate(year,month+1,1))-1
 }
 print(date)
}

x$Date - as.vector(sapply(x$YearEnd,GetEOM))

str(x$Date)


Is there a simpler way to do this please?


TIA and best,
-Tir

Tirthankar Patnaik
India Strategy
Citigroup Investment Research
+91-22-6631 9887

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] regarding SsfPack in Ox

2007-05-09 Thread gyadav

Hi All R Users,

I have a code in Ox language using its SSF Pack. Is there any similar 
package in R which provides all the same functionality.

Any pointers would be helpful to me.

Thanks in adv

-  Regards,

  \\\|///
   \\   --   //
(  o   o  )
oOOo-(_)-oOOo
|
| Gaurav Yadav
| Assistant Manager, CCIL, Mumbai (India)
| Mob: +919821286118 Email: [EMAIL PROTECTED]
| Man is made by his belief, as He believes, so He is.
|   --- Bhagavad Gita 
|___Oooo
 oooO(  )
 (  )   )   /
  \   ((_/
\_ )



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] statistics/correlation question NOT R question

2007-05-09 Thread gyadav

Hi Horace and Mark

@@@ i myself know that this may be of little help but then also i am going 
with this. Secondly the in the solution by Horace if corr(x, y) is beta 
then 
it implies that var(x) = var(y). Is that you want Mark. Well what i did i 
am writing it down hereas under, may be its wrong.Please comment

var(y_t) = var(beta * x_t) + e_t)
= var(y_t) = beta * var(x_t) + var(e_t) + cov(beta * x_t , e_t)
as cov(beta * x_t , e_t) = 0 hence
var(y_t) = beta * var(x_t) + var(e_t)(i)

then 

corr(x_t, y_t) = beta = cov(x_t, y_t)/ (sigma_x * sigma_y) 
 (ii)

further E[y_t] = beta * E[x_t] + E[e_t].as E[e_t] = 0 hence

beta = E[y_t] / E[x_t](iii)

Now what to do ???





Mark, I suppose you make the usual assumptions, ie. E[x]=0, 
E[x*epsilon]=0, the correlation is just simply,

corr(x,y) = beta * ( var(x) / var(y) )

And you could get var(y) from var(x) and var(epsilon).

HTH.

Horace




This is not an R question but if anyone can help me, it's much
appreciated.

Suppose I have a series ( stationary ) y_t and a series x_t ( stationary
)and x_t has variance sigma^2_x and epsilon is normal 
(0, sigma^2_epsilon )

and the two series have the relation

  y_t = Beta*x_t + epsilon

My question is if there are particular values that sigma^2_x and
sigma^2_epsilon have to take in order for corr(x_t,y_t) to equal Beta ?

I attempted to figure this out using two different methods and in one
case I end up involving sigma^2_epsilon and in the other I don't
and I'm not sure if either method is correct. I think I need to use
results form the conditional bivariate normal but i'm really not sure.
Also, it's not a homework problem because I am too old to have homework.
Thanks for any insights/solutions.


This is not an offer (or solicitation of an offer) to buy/se...{{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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Removing a list of Objects

2007-05-09 Thread gyadav

try this 

rm(list=ls(pat=C243.Daily)


 ls(pat=.)
 [1] .chutes  .densityplot 
.densityplot.default .densityplot.formula
 [5] .eda .eda.ts .fancy.stripchart 
.freqpoly 
 [9] .hist.and.boxplot.lag .lm   
.median.test 
[13] .plot.hist.and.box   .scatterplot .sim
.violinplot 
[17] .violinplot.default  .violinplot.formula  .z.test   
 
 ls(pat=.l)
[1] .lag .lm 
 rm(list = ls(pat=.l))
 ls(pat=.l)
character(0)


-  Regards,

  \\\|///
   \\   --   //
(  o   o  )
oOOo-(_)-oOOo
|
| Gaurav Yadav
| Assistant Manager, CCIL, Mumbai (India)
| Mob: +919821286118 Email: [EMAIL PROTECTED]
| Man is made by his belief, as He believes, so He is.
|   --- Bhagavad Gita 
|___Oooo
 oooO(  )
 (  )   )   /
  \   ((_/
\_ )




Patnaik, Tirthankar  [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
05/09/2007 02:33 PM

To
Gabor Csardi [EMAIL PROTECTED]
cc
r-help@stat.math.ethz.ch
Subject
Re: [R] Removing a list of Objects






Hi Gabor,
 Tried this, and didn't quite work.

 a - list(paste(C243.Daily,sep=,1:5))
 a
[[1]]
[1] C243.Daily1 C243.Daily2 C243.Daily3 C243.Daily4
C243.Daily5

 rm(list=a)
Error in remove(list, envir, inherits) : invalid first argument
 

-Tir

-Original Message-
From: Gabor Csardi [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 09, 2007 12:37 PM
To: Patnaik, Tirthankar [GWM-CIR]
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Removing a list of Objects

Hmmm,

rm(list=a)

is what you want.

Gabor

On Wed, May 09, 2007 at 10:29:05AM +0530, Patnaik, Tirthankar  wrote:
 Hi,
I have a simple beginner's question on removing a list of
objects. 
 Say I have objects C243.Daily1, C243.Daily2...C243.Daily5 in my 
 workspace. I'd like to remove these without using rm five times.
 
 So I write. 
 
  a - list(paste(C243.Daily,sep=,1:5))
 
  rm(a)
 
 Obviously this wouldn't work, as it would only remove the object a.
 
 But is there any way I could do this, like on the lines of a UNIX `
 (grave-accent)
 
 Something like
 
 Prompt rm `find . -type f -name foo`
 
 TIA and best,
 -Tir
 
 __
 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.

-- 
Csardi Gabor [EMAIL PROTECTED]MTA RMKI, ELTE TTK

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] comparing two matrices, row by row

2007-04-26 Thread gyadav

Please have a look at this :-)

 ar1 - array(data=c(1:16),dim=c(4,4))
 ar2 - array(data=c(1,2,3,3,5:16),dim=c(4,4))
 z-ar1==ar2
 ar1
 [,1] [,2] [,3] [,4]
[1,]159   13
[2,]26   10   14
[3,]37   11   15
[4,]48   12   16
 ar2
 [,1] [,2] [,3] [,4]
[1,]159   13
[2,]26   10   14
[3,]37   11   15
[4,]38   12   16
 z
  [,1] [,2] [,3] [,4]
[1,]  TRUE TRUE TRUE TRUE
[2,]  TRUE TRUE TRUE TRUE
[3,]  TRUE TRUE TRUE TRUE
[4,] FALSE TRUE TRUE TRUE
 which(z==FALSE)
[1] 4
 

HTH




Federico Abascal [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
26-04-07 04:14 PM

To
r-help@stat.math.ethz.ch
cc

Subject
[R] comparing two matrices, row by row






Estimated people,

I have two matrices:

ar1 - array(data=c(1:16),dim=c(4,4))
ar2 - array(data=c(1,2,3,3,5:16),dim=c(4,4))

They only differ in the fourth row. I would like to compare them in
order to know which columns are equal.

The following works, but I would like to have a better solution, and not
to use what someone called prehistorical loops:

for(i in c(1:4)) { cat(as.character(i),: ,
as.character(setequal(ar1[i,],ar2[i,])), \n) }
1 :  TRUE
2 :  TRUE
3 :  TRUE
4 :  FALSE

I cannot devise how to use the apply function for this.
Thanks a lot,
Federico

__
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.espanol.yahoo.com/

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] regarding 3d Bar Plot

2007-04-25 Thread gyadav

Hi Duncan

I am restating the problem and thanks you for sending me such a good 
function histogram in 3d. Thanks for that but i think my problem has been 
misinterpreted. I just wanted a simple 3d bar Plot. Although I have not 
written anything for R but i will surely like to contribute to R and if i 
can assist someone in writing then it would be a great help to me.

Problem was :-)

I have data in a two dimensional table. each row of the data adds upto 100 

( hence they are percentages ). 
it can be interpreted as like this A - I are the matches and  P - X are 
the players. Thus Player P scored 20% of the runs during this season in 
Match C, 60% in Match D and remaining 20% in Match G. 

I want to plot 3-d bar plot, where X axis have players, Y axis have 
Matches and Z axis as the percentage(0 - 100%) 
Please help me in this regards. (Please note on my X and Y axes Numbers 
are not there instead alphabets)

A   B   C   D   E   F   G   H   I 
P   0   0   20  60  0   0   20  0   0 
Q   0   16.8674726.907631   11.646586   0 
12.449799   0.8032129   0   31.325301 
R   0   59.649123   10.526316   12.280702   0   0 
1.7543860   15.789474 
S   3.57909807  20.281556   33.404915   7.31329 0.584586 
5.9651631.1930327   0   27.678358 
T   0   0   0   0   0   0   0   0   0 
U   0   9.09090927.272727   18.181818   0 
36.363636   0   0   9.090909 
V   0   33.33   33.33   0   0   33.33 
0   0   0 
W   0   2.1881841.09409236.105033   0 
44.420131   5.2516411   0   10.940919 
X   0.05994234  51.550409   16.304315   6.9976680 
17.383277   0.5994234   0.4741439   6.630821 



Thanks in advance
-gaurav




Duncan Murdoch [EMAIL PROTECTED] 
25-04-07 04:42 PM

To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED], r-help@stat.math.ethz.ch
Subject
Re: [R] regarding 3d Bar Plot






On 4/24/2007 9:38 AM, [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED] wrote:
 
 I have data in a two dimensional table. each row of the data adds
 upto 100 ( hence they are percentages ).  it can be interpreted as
 like this A - I are the matches and  P - X are the players. Thus
 Player P scored 20% of the runs during this season in Match C, 60% in
 Match D and remaining 20% in Match G.

 I want to plot 3-d bar plot, where X axis have players, Y axis have
 Matches and Z axis as the percentage(0 - 100%) Please help me in this
 regards.
 
  snip
 
Many years ago I picked up from the snews mailing list a
suite of functions for plotting 2D barplots (barplots 
with 2D
bases) written by a chap named Colin Goodall, from (at 
that
time) the University of Bristol and/or from Penn State.
 
I never actually did anything with this suite until
recently.  Seeing no replies to the enquiry about 3D
histograms,  I thought I'd try to get Goodal's code 
running
in R to see if it might solve guarav's problem.
 
The trouble is, all the guts of the procedure, 
*including*
the plotting are done from within Fortran.  The actual
plotting seems to be done through a call to a subroutine
``segmtz'' which is a piece of Splus software that does 
not
exist in R.
 
Is there an equivalent subroutine in R that could be 
called?
I dug around a bit but couldn't figure out what was going
on.  The function segments() simply calls
.Internal(segments(
 
I looked around a bit for corresponding C or Fortran code 
but
obviously didn't know how to look properly.
 
I think that the Fortran code could be translated into 
raw R
and the call to segmtz changed to a call to segments() 
---
but this would seem to be a lot of work.
 
Can anyone suggest a reasonably simple way of replacing 
the
call to segmtz in the Fortran?

I don't know how to do what you want, but I'd suggest working in R code 
rather than Fortran.  I did write a hist3d function for the djmrgl 
package (based on hist), mostly to show off the graphics, but haven't 
found it useful enough to port to rgl.  Here's a quick port, not good 
enough to use, but maybe it will give you a starting point.

Duncan Murdoch




hist3d -
function (x, y, xbreaks, ybreaks, freq= NULL, probability = !freq, 
include.lowest= TRUE,
  right= TRUE, 
  xlim = range(xbreaks), ylim = range(ybreaks), zlim = NULL,
  xlab = xname, ylab = yname, zlab,
  plot = TRUE, top 

Re: [R] regarding 3d Bar Plot --- correction.

2007-04-25 Thread gyadav

Hi Rolf,

If it is possible then please share the code as i am not able to locate 
any pointers. Thanks in advance :-) cheers and chiao

regards
-gaurav




[EMAIL PROTECTED] 
24-04-07 07:27 PM

To
[EMAIL PROTECTED], r-help@stat.math.ethz.ch
cc

Subject
Re: [R] regarding 3d Bar Plot --- correction.







I mis-spoke.  It seems I had two collections of functions in the same
directory.  One by Colin Goodall, and one by David Scott (I have no
record of where he is/was located).  It is the *latter* collection
that does all its work from within Fortran.

I'll have another look at what Colin Goodall actually wrote to see if
it could be useful to guarav.

 cheers,

  Rolf Turner
  [EMAIL PROTECTED]




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Box Ljung Statistics

2007-04-25 Thread gyadav

Hi All R Experts,

I met with below mentioned statistics in paper Stock Index Volatility 
Forecasting with High Frequency Data
by Eugenie Hol, Siem Jan Koopman 
http://ideas.repec.org/p/dgr/uvatin/20020068.html

I would like to ask that what is Box-Ljung portmantacau statistic based 
on N squared autocorrelation ?
Is it same as Box-Ljung Statistics of stats package ?
Further, please tell me how to compute it ?

I have a return series of an Index.
Please help me in this i am not able to get the statistics what is given 
in the paper for S  P 100:-)

   Sayonara With Smile  With Warm Regards :-)

  G a u r a v   Y a d a v
  Assistant Manager,
  Economic Research  Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] regarding 3d Bar Plot

2007-04-24 Thread gyadav

Hi Rolf,

i could not get what to be done with that kind of plot. If possible then i 
would also like to contribute in its development. Thanks for discussion, 
If you have any pointers please let me know in R.

Thanks  in adv.
with warm regards,
-gaurav





[EMAIL PROTECTED] 
24-04-07 07:08 PM

To
[EMAIL PROTECTED], r-help@stat.math.ethz.ch
cc

Subject
Re: [R] regarding 3d Bar Plot







[EMAIL PROTECTED] wrote:

 I have data in a two dimensional table. each row of the data adds
 upto 100 ( hence they are percentages ).  it can be interpreted as
 like this A - I are the matches and  P - X are the players. Thus
 Player P scored 20% of the runs during this season in Match C, 60% in
 Match D and remaining 20% in Match G.
 
 I want to plot 3-d bar plot, where X axis have players, Y axis have
 Matches and Z axis as the percentage(0 - 100%) Please help me in this
 regards.
 
 snip

 Many years ago I picked up from the snews mailing list a
 suite of functions for plotting 2D barplots (barplots 
with 2D
 bases) written by a chap named Colin Goodall, from (at 
that
 time) the University of Bristol and/or from Penn State.

 I never actually did anything with this suite until
 recently.  Seeing no replies to the enquiry about 3D
 histograms,  I thought I'd try to get Goodal's code 
running
 in R to see if it might solve guarav's problem.

 The trouble is, all the guts of the procedure, 
*including*
 the plotting are done from within Fortran.  The actual
 plotting seems to be done through a call to a subroutine
 ``segmtz'' which is a piece of Splus software that does 
not
 exist in R.

 Is there an equivalent subroutine in R that could be 
called?
 I dug around a bit but couldn't figure out what was going
 on.  The function segments() simply calls
 .Internal(segments(

 I looked around a bit for corresponding C or Fortran code 
but
 obviously didn't know how to look properly.

 I think that the Fortran code could be translated into 
raw R
 and the call to segmtz changed to a call to segments() 
---
 but this would seem to be a lot of work.

 Can anyone suggest a reasonably simple way of replacing 
the
 call to segmtz in the Fortran?

cheers,

Rolf Turner
[EMAIL PROTECTED]




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] regarding redirecting output of GARCH to a file

2007-04-23 Thread gyadav

Hi All R Experts

I wrote this code so that all the summaries are stored in one file so that 
i can try to see among them which one is most fitting.
but the results.txt file is having * ESTIMATION WITH ANALYTICAL 
GRADIENT * many times i.e. 25x25 = 625
Please help in sending the summaries into one file :-)

sink(C:/results.txt)
for ( i in 1:25 )
for ( j in 1:25 ) { 
x1.garch-garch(ts(x1[,2]),c(i,j)) 
summary(x1)
}
sink()

Thanks in adv
-gaurav


DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] sorting data in R

2007-04-20 Thread gyadav

Hi

Best function for sorting which i have used and many in the community :-) 
HTH Cheers

sort.data.frame(Oats, ~ -nitro + Variety)

Feedback and improvements are welcome.

sort.data.frame - function(form,dat){
  # Author: Kevin Wright
  # Some ideas from Andy Liaw
  #   http://tolstoy.newcastle.edu.au/R/help/04/07/1076.html

  # Use + for ascending, - for decending. 
  # Sorting is left to right in the formula
 
  # Useage is either of the following:
  # library(nlme); data(Oats)
  # sort.data.frame(~-Variety+Block,Oats) # Note: levels(Oats$Block)
  # sort.data.frame(Oats,~nitro-Variety)

  # If dat is the formula, then switch form and dat
  if(inherits(dat,formula)){
f=dat
dat=form
form=f
  }
  if(form[[1]] != ~)
stop(Formula must be one-sided.)

  # Make the formula into character and remove spaces
  formc - as.character(form[2]) 
  formc - gsub( ,,formc) 
  # If the first character is not + or -, add +
  if(!is.element(substring(formc,1,1),c(+,-)))
formc - paste(+,formc,sep=)

  # Extract the variables from the formula
  if(exists(is.R)  is.R()){
vars - unlist(strsplit(formc, [\\+\\-])) 
  }
  else{
vars - unlist(lapply(unpaste(formc,-),unpaste,+))
  }
  vars - vars[vars!=] # Remove spurious  terms

  # Build a list of arguments to pass to order function
  calllist - list()
  pos=1 # Position of + or -
  for(i in 1:length(vars)){
varsign - substring(formc,pos,pos)
pos - pos+1+nchar(vars[i])
if(is.factor(dat[,vars[i]])){
  if(varsign==-)
calllist[[i]] - -rank(dat[,vars[i]])
  else
calllist[[i]] - rank(dat[,vars[i]])
}
else {
  if(varsign==-)
calllist[[i]] - -dat[,vars[i]]
  else
calllist[[i]] - dat[,vars[i]]
}
  }
  dat[do.call(order,calllist),]

}










elyakhlifi mustapha [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
20-04-07 03:30 PM

To
R-help@stat.math.ethz.ch
cc

Subject
[R] sorting data in R






hello,
I'd  like  know how to sort a data frame in R for example how I should do 
to sort by Catholic with swiss data frame like below
thanks

 Fertility Agriculture Examination Education Catholic 
Infant.Mortality
Courtelary80.217.0  1512 9.9622.2
Delemont  83.145.1   6 984.8422.2
Franches-Mnt  92.539.7   5 593.4020.2
Moutier   85.836.5  12 733.7720.3
Neuveville76.943.5  1715 5.1620.6
Porrentruy76.135.3   9 790.5726.6
Broye 83.870.2  16 792.8523.6
Glane 92.467.8  14 897.1624.9
Gruyere   82.453.3  12 797.6721.0
Sarine82.945.2  161391.3824.4
Veveyse   87.164.5  14 698.6124.5
Aigle 64.162.0  2112 8.5216.5
Aubonne   66.967.5  14 7 2.2719.1
Avenches  68.960.7  1912 4.4322.7
Cossonay  61.769.3  22 5 2.8218.7
Echallens 68.372.6  18 224.2021.2
Grandson  71.734.0  17 8 3.3020.0
Lausanne  55.719.4  262812.1120.2
La Vallee 54.315.2  3120 2.1510.8
Lavaux65.173.0  19 9 2.8420.0
Morges65.559.8  2210 5.2318.0
Moudon65.055.1  14 3 4.5222.4
Nyone 56.650.9  221215.1416.7
Orbe  57.454.1  20 6 4.2015.3
Oron  72.571.2  12 1 2.4021.0
Payerne   74.258.1  14 8 5.2323.8
Paysd'enhaut  72.063.5   6 3 2.5618.0
Rolle 60.560.8  1610 7.7216.3
Vevey 58.326.8  251918.4620.9
Yverdon   65.449.5  15 8 6.1022.5
Conthey   75.585.9   3 299.7115.1
Entremont 69.384.9   7 699.6819.8
Herens77.389.7   5 2   100.0018.3
Martigwy  70.578.2  12 698.9619.4
Monthey   79.464.9   7 398.2220.2
St Maurice65.075.9   9 999.0617.8
Sierre92.284.6   3 399.4616.3
Sion  79.363.1  131396.8318.1
Boudry 

[R] regarding 3d Bar Plot

2007-04-20 Thread gyadav

Hi All R experts

I have data in a two dimensional table. each row of the data adds upto 100 
( hence they are percentages ).
it can be interpreted as like this A - I are the matches and  P - X are 
the players. Thus Player P scored 20% of the runs during this season in 
Match C, 60% in Match D and remaining 20% in Match G.

I want to plot 3-d bar plot, where X axis have players, Y axis have 
Matches and Z axis as the percentage(0 - 100%)
Please help me in this regards.

A   B   C   D   E   F   G   H   I
P   0   0   20  60  0   0   20  0   0
Q   0   16.8674726.907631   11.646586   0 
12.449799   0.8032129   0   31.325301
R   0   59.649123   10.526316   12.280702   0   0 
1.7543860   15.789474
S   3.57909807  20.281556   33.404915   7.31329 0.584586 
5.9651631.1930327   0   27.678358
T   0   0   0   0   0   0   0   0   0
U   0   9.09090927.272727   18.181818   0 
36.363636   0   0   9.090909
V   0   33.33   33.33   0   0   33.33 
0   0   0
W   0   2.1881841.09409236.105033   0 
44.420131   5.2516411   0   10.940919
X   0.05994234  51.550409   16.304315   6.9976680 
17.383277   0.5994234   0.4741439   6.630821

Thanks a lot for any pointers
-gaurav


DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Error: cannot change value of locked binding for

2007-04-20 Thread gyadav

Hello R experts

What does this error means and how to resolve this issue (cannot change 
value of locked binding for ). Please suggest 

 mc = MonteCarloOption(dt = 1/360, pathLength = 30, mcSteps = 5000, 
mcLoops =
+ 50, init = TRUE, innovations.gen = sobolInnovations, path.gen = 
wienerPath,
+ payoff.calc = arithmeticAsianPayoff, antithetic = TRUE, standardization 
=
+ FALSE, trace = TRUE, scrambling = 2, seed = 4711)
Error in MonteCarloOption(dt = 1/360, pathLength = 30, mcSteps = 5000,  : 
cannot change value of locked binding for 'dt'
 


Thanks in advance

   Sayonara With Smile  With Warm Regards :-)

  G a u r a v   Y a d a v
  Assistant Manager,
  Economic Research  Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] help comparing two median with R

2007-04-17 Thread gyadav

hi

+++
Now I want to compare if these sets differ. I could compare the mean 
doing a basic T test . However, I was looking for a test to compare 
the medians using R. 
+++
@@@i hope but i am not sure that wilcoxon signed rank test may help :-) 
cheers





Pedro A Reche [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
17-04-07 02:22 PM

To
r-help@stat.math.ethz.ch
cc

Subject
[R] help comparing two median with R






Dear R users,
I am new to R and  I would like to ask your help with the following 
topic. I have three sets of numeral data, 2 sets are paired and a 
third is independent of the other two. For each of these sets I have 
obtained their basic statistics (mean, median, stdv, range ...). 
Now I want to compare if these sets differ. I could compare the mean 
doing a basic T test . However, I was looking for a test to compare 
the medians using R.   If that is possible I would love to hear the 
specifics.
Thanks in advance for any help,
Regards,


pedro reche

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Please help.... i know its trivial

2007-04-16 Thread gyadav

Hi All R Experts,

Please help me. Query is given at the end of this R Session

+start of R Session+++
 SCORES-read.csv(C:/SCORE.csv,header=TRUE,sep=,)
 SCORES
   SrNo Player Score
1 1  A12
2 2  B23
3 3  C34
4 4  A54
+
17   17  A   433
18   18  B32
19   19  B34
20   20  C34
 A-subset(SCORES,Player==A)
 A
   SrNo Player Score
1 1  A12
4 4  A54
5 5  A   342
6 6  A45
9 9  A45
10   10  A34
11   11  A65
17   17  A   433
 class(SCORES)
[1] data.frame
 class(A)
[1] data.frame

+end of R Session++

question:-
I want to convert the above given data frame i.e. A into a data frame 
like this given below. So that my indexing looks good.

   SrNo Player Score
1 1  A12
2 4  A54
3 5  A   342
4 6  A45
5 9  A45
6   10  A34
7   11  A65
8   17  A   433

Please help :-) Or give me some pointers i have tries searching the R FAQs 
also but i could not locate. I know its trivial.



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] C interface

2007-03-29 Thread gyadav

Hi All
I have read this document - An Introduction to the .C Interface to R, 
which primarily tells how to interface C language with R.
Is there and more elaborative and online documentation regarding this 
interface.

Any pointers appreciated
-thanks
-gaurav


DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Regarding Vista

2007-03-29 Thread gyadav

Hi Dieter,

I am facing the same problem in my case. R 2.4.1 have installed 
successfully, but when i try to install the packages from a local zip 
file. It gives the following error message. Please tell me how to install 
the packages in a corporate environment. I mean i could not understand 
your reply, may you be a bit more elaborate so that i can fix up the 
problem in my corporate laptop.]

Thanks in advance
-gaurav



Dieter Menne [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
30-03-07 12:32 AM

To
r-help@stat.math.ethz.ch
cc

Subject
Re: [R] Regarding Vista






 christian.ritter at shell.com writes:

 The Vista issue is not innocent as it threatens the life of R within 
large
corporations. So any posts on how R
 runs under Vista and what has to be done to make it work and what cannot 
be
done etc will be very useful. 

Main problem seems to be the installation of chm-files when upgrading. I 
had to
switch off all security mechanisms to get it done. Which is probably not 
what
you would like to have in a corporate environment.

As a temporary workaround, it would probably be best to optionally disable 
chm
installation. Or do a poll if is is required, after all it's considered a 
legacy
format nowadays.

Dieter

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Regarding Vista

2007-03-29 Thread gyadav

*Sorry for duplicate post - i forgot to tell the error


Hi Dieter,

I am facing the same problem in my case. R 2.4.1 have installed 
successfully, but when i try to install the packages from a local zip 
file. It gives the following error message. 
+++
 utils:::menuInstallLocal()
Error in zip.unpack(pkg, tmpDir) : cannot open file 'C:/Program 
Files/R/R-2.4.1/library/file5d2b5841/aaMI/chtml/aaMI.chm'
 
+++

Please tell me how to install the packages in a corporate environment. I 
mean i could not understand your reply, may you be a bit more elaborate so 
that i can fix up the problem in my corporate laptop.

Thanks in advance
-gaurav






Dieter Menne [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
30-03-07 12:32 AM

To
r-help@stat.math.ethz.ch
cc

Subject
Re: [R] Regarding Vista






 christian.ritter at shell.com writes:

 The Vista issue is not innocent as it threatens the life of R within 
large
corporations. So any posts on how R
 runs under Vista and what has to be done to make it work and what cannot 
be
done etc will be very useful. 

Main problem seems to be the installation of chm-files when upgrading. I 
had to
switch off all security mechanisms to get it done. Which is probably not 
what
you would like to have in a corporate environment.

As a temporary workaround, it would probably be best to optionally disable 
chm
installation. Or do a poll if is is required, after all it's considered a 
legacy
format nowadays.

Dieter

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Regarding Vista

2007-03-28 Thread gyadav

Hi All

Does R supports Vista Business and Vista Home Premium. I am planning to 
upgrade my system. Before that I just wanted to confirm whether R will 
work on Vista or not.

Thanks for this help in advance
-gaurav






   Sayonara With Smile  With Warm Regards :-)

  G a u r a v   Y a d a v
  Assistant Manager,
  Economic Research  Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] regarding time series object

2007-03-28 Thread gyadav

Hello All

I have time series data like given hereinbelow :-
The data is having dates. I tried using ts() but it requires frequency. As 
i have holidays, saturdays sunday market closed, and also sometimes the 
data may not be recorded. I want to create a time series object but i want 
that where ever the holiday is the except saturday/sunday then it should 
impute the mean of previous and the next working day. I want to do this so 
that i can perfectly say that 5 obs is my weekly frequency, 25 is my 
monthly etc :- Please help in this regards

 tui[1:15,]
 DateOpenHigh Low CloseNifty
1  2004-01-01 1880.35 1917.05 1880.351912.25
2  2004-01-02 1912.25 1951.70 1911.051946.05
3  2004-01-05 1946.30 1969.20 1930.751955.00
4  2004-01-06 1955.10 1979.05 1908.751926.70
5  2004-01-07 1927.95 1930.95 1888.101916.75
6  2004-01-08 1918.10 1973.45 1918.101968.55
7  2004-01-09 1969.00 2014.65 1957.451971.90
8  2004-01-12 1972.00 1980.55 1936.751945.60
9  2004-01-13 1944.70 1967.85 1926.101963.60
10 2004-01-14 1987.40 1995.20 1970.101982.15
11 2004-01-15 1983.20 2000.30 1933.251944.45
12 2004-01-16 1944.15 1953.05 1887.101900.65
13 2004-01-19 1901.90 1943.10 1874.951935.35
14 2004-01-20 1928.80 1957.65 1876.851893.25
15 2004-01-21 1895.45 1899.55 1811.351824.60
 

Thanks a lot
-gaurav


DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Problem in loading all packages all at once

2007-03-26 Thread gyadav

Hi All

Please see the Rprofile file which i have modified as follows and after 
that when I start R then I see that R says to me TRUE for all the 
packages implying that all loaded at once. 
But when i try to use commands as simple as help(lm), it doesnt work nor 
any of the menu Packages is not working.
Although the regression using lm ( Y ~ X ) is working even summary and 
rnorm is working fine.
Please tell me why menu and help command is not working

Rprofile is in between +++ lines
R initialization is in between @@ lines
Commands are in between $ lines

Please also suggest me should i send this to r-devel list or not

### This is the system Rprofile file. It is always run on startup.




options(scipen = 0)
options(max.print = 1)# not yet exercised in 'core R'
options(add.smooth = TRUE)# currently only used in 'plot.lm'

##
##
#code added by gaurav yadav to install many other packages at 
startup#
print (START OF CODE ADDED BY GAURAV YADAV)
TEMP - Sys.getenv(R_DEFAULT_PACKAGES)
print (R_DEFAULT_PACKAGES)
print (TEMP)
print (===)
TEMP - 
c(TEMP,aplpack,approximator,apTreeshape,ArDec,arules,ash,aspace,assist,aster,asypow,aws,base,bayesm,bayesmix,bayesSurv,BayesTree,BayesValidate,betareg,Bhat,BHH2,bicreduc,biglm,bim,bindata,Biodem,biopara,bitops,bivpois,blighty,blockrand,BMA,boa,Bolstad,boolean,boost,boot,bootstrap,bqtl,BradleyTerry,brlr,BRugs,BSDA,BsMD,butler,calibrate,calibrator,caMassClass,car,cat,caTools,catspec,cba,cclust,CDNmoney,cfa,CGIwithR,changeLOS,chplot,chron,CircStats,circular,clac,class,classInt,classPP,clim.pact,climatol,clines,clue,cluster,clusterRepro,clustvarsel,cmprsk,cobs,CoCo,CoCoCg,CoCoCore,CoCoGraph,CoCoObjects,CoCoOldData,CoCoRaw,cocorresp,coda,coin,colorspace,combinat,compositions,concor,concord,cond,conf.design,connectedness,copula,corpcor,corpora,covRobust,coxrobust,cramer,crossdes,crq,c
 sampling,cslogistic,CTFS,ctv)
TEMP - 
c(TEMP,CVThresh,cwhmath,cwhplot,cwhprint,cwhstat,cwhstring,cwhtool,cyclones,DAAG,datasets,date,Davies,DBI,dblcens,DCluster,DDHFm,deal,debug,deldir,delt,denpro,DEoptim,depmix,DescribeDisplay,Design,Devore5,Devore6,dglm,diamonds,dichromat,DICOM,digest,diptest,dispmod,distr,distrEx,distrSim,distrTEst,diveMove,doBy,DPpackage,dr,drc,drfit,dse1,dse2,dyn,dynamicGraph,dynlm,e1071,eba,EbayesThresh,Ecdat,eco,ecodist,edci,effects,eha,elasticnet,ElemStatLearn,ellipse,elliptic,emme2,emplik,emulator,EMV,energy,ensembleBMA,Epi,epitools,epsi,equivalence,evd,evdbayes,evir,exactLoglinTest,exactmaxsel,exactRankTests,extRemes,FactoMineR,Fahrmeir,far,faraway,fastICA,fBasics,fCalendar,fda,fdim,femmeR,fExtremes,fgac,fields,filehash,financial,FLCore,FLEDA,flexclust,flexmix,fMultivar,fOptions,foreign,
 FortranCallsR,fortunes,forward)
TEMP - 
c(TEMP,fpc,fPortfolio,fracdiff,frailtypack,fSeries,ftnonpar,FunCluster,fuzzyRankTests,g.data,gafit,gam,gamair,gamlss,gamlss.tr,GammaTest,gap,gbm,gclus,gcmrec,gdata,gee,geepack,genalg,Geneland,GeneNT,genetics,GeneTS,GenKern,geometry,geoR,geoRglm,ggm,ggplot,giRaph,gld,gllm,glmmML,glmpath,glpk,gmodels,gmp,gmt,gnm,GPArotation,gpclib,gplots,gpls,graphics,grasper,GRASS,gRbase,grDevices,gregmisc,grid,gridBase,grnnR,grouped,GroupSeq,gss,gstat,gsubfn,gtools,hapassoc,haplo.ccs,haplo.stats,hapsim,hddplot,hdf5,hdrcde,hett,HI,hier.part,hierfstat,HighProbability,Hmisc,hmm.discnp,homals,hopach,howmany,HSAUR,HTMLapplets,httpRequest,hwde,hybridHclust,HyperbolicDist,ICE,Icens,IDPmisc,ifs,igraph,iid.test,impute,ineq,intcox,iplots,ipred,irr,ismev,ISwR,its,iWidgets,JavaGD,JGR,JLLprod,JointGL
 M,kappalab,Kendall,kernlab)
TEMP - 
c(TEMP,KernSmooth,kinship,kknn,klaR,km.ci,KMsurv,knncat,knnFinder,knnTree,kohonen,ks,kza,kzft,labdsv,labstatR,lars,lasso2,latentnet,lattice,latticeExtra,lazy,ldbounds,ldDesign,LDheatmap,leaps,lgtdl,limma,linprog,lme4,lmeSplines,LMGene,lmm,lmomco,Lmoments,lmtest,locfdr,locfit,lodplot,LogicReg,logistf,logspline,lokern,longitudinal,longmemo,LoopAnalyst,LowRankQP,lpridge,lpSolve,lsa,lspls,ltm,maanova,magic,mapLD,mapproj,maps,maptools,maptree,mAr,marg,MarkedPointProcess,MASS,Matching,MatchIt,mathgraph,matlab,Matrix,maxstat,MBESS,mblm,mcgibbsit,mclust,mcmc,MCMCpack,mda,MEMSS,merror,meta,methods,mfp,mgcv,mice,micEcdat,micEcon,aaMI,abind,accuracy,acepack,actuar,adapt,ade4,adehabitat,adlift,agce,agsemisc,akima,AlgDesign,allelic,alr3,amap,AMORE,AnalyzeFMRI,aod,ape,mimR,minpack.l
 m,misc3d,mitools,mix,mixreg)
TEMP - 

[R] a very small query

2007-03-26 Thread gyadav

Hi All

what is the command to give me the listing of the loaded packages. I mean 
which are active and not the listing of all the installed packages as 
given by library()

thanks in advance
-gaurav



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] one more small query

2007-03-26 Thread gyadav

Hi All

Thanks to you all for replying to my small query i got it. How can i load 
many packages other than the default packages automatically at the 
startup. Please tell me. I tried it by modifying the RProfile file, as 
given in the posted mail with the subject(Problem in loading all packages 
all at once), but it  was not a total success, Please help me in this. 
Secondly is there any limits set that at a time maximum number of packages 
which can be loaded at a time.

:-)
-gaurav






   Sayonara With Smile  With Warm Regards :-)

  G a u r a v   Y a d a v
  Assistant Manager,
  Economic Research  Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Problem in loading all packages all at once

2007-03-26 Thread gyadav

Prof Brian Ripley [EMAIL PROTECTED] 
26-03-07 07:06 PM

To
Charilaos Skiadas [EMAIL PROTECTED]
cc
[EMAIL PROTECTED], r-help@stat.math.ethz.ch
Subject
Re: [R] Problem in loading all packages all at once






I really don't know what is going on here, beyond that 'utils' has not 
been loaded.
 @@@ Please :-), no sky is falling, just kidding
But

1) You are not supposed to edit system files like library/base/R/Rprofile.
If you do, don't ask for help!
@@@ let me dare, and i will learn. I apologize if i have hurt your 
feelings.
@@@ i used to modify the linux operating system code to see the effects,
@@@ bad habits die hard. Please forgive me

2) I don't see how the output shown came from the input shown: almost 
surely it did not.
@@@ but sincerely it came
3) It is extremely bad practice to load packages you do not need.
This both slows R down unnecessarily and creates conflicts where packages 
override default behaviour.

@@@ i know

4) I believe there is still a limit to the number of DLLs you can have 
loaded in a single R session, and I believe it to be 100.  So you probably 

cannot load all 751 packages, and at some point package loading will fail.
Now, loading library/base/R/Rprofile has no error-checking (as it is 
supposed to be unchanged, src/main/main.c:818) and so you may get no 
indication of this.
@@@ Thanks this is really a great help, i will look into it
@@@ are you one of the coders of R

So my guess is that there was an attempt to load a few hundred packages 
and only some of them got loaded, not as far down the list as 'utils'.

If you want to load some packages in every session, do so from your 
.Rprofile file: that is run as user code and you should get full 
error-checking (and messages).

@@@ may you please send me a sample file, it would be really helpfull
@@@ and where to put .Rprofile file

As for Charilaos' points:

a) .First.sys is defined in the system profile, library/base/R/Rprofile.
It is run from the base environment.
@@@ i ackowledge it
b) The environment variable R_DEFAULT_PACKAGES justs sets the default for 
the option 'defaultPackages', and the format is described in the surely 
obvious place, the documentation for the option.  There are examples in 
the 'check' script.
@@@ This is really a good link to read again, Thanks

Thank a lot Sir !

-gaurav


On Mon, 26 Mar 2007, Charilaos Skiadas wrote:

 A couple of things:

 1) It would have been a lot easier to help you if you had created a
 much smaller example. perhaps trying to load 2-3 packages instead of
 1000. Now we have to wade through a lot of stuff to get to the point.

 2) Perhaps your call to Sys.putenv doesn't do quite what you expect
 it to do. Example:
  TEMP - c(a,b)
  Sys.getenv(TEST)
 TEST
   
  Sys.putenv(TEST=TEMP)
  Sys.getenv(TEST)
 TEST
 b

 3) I couldn't really see where in your code all these packages are
 loaded. Reading the help for .First.sys tells me that that's the call
 that actually loads the default packages, unless I've misunderstood
 something. If that's the case, then the following line you have at
 the end would prevent this loading:

 .First.sys - function()


 I must say that from the ?Startup help there are two things that are
 not very clear:
 a) At what point in the load process is R_DEFAULT_PACKAGES
 checked? .First.sys doesn't seem to know about it.
 Ok, a bit of search provided an answer to this: Reading the help for
 options, I see there, in the section about defaultPackages, what is
 probably the most helpful bit (for me) in all this:

 defaultPackages:
the packages that are attached by default when R starts 
up.
 Initially set from value of the environment variable
 R_DEFAULT_PACKAGES, or if that is unset to c(datasets, utils,
 grDevices, graphics, stats, methods). (Set R_DEFAULT_PACKAGES
 to NULL or a comma-separated list of package names.) A call to
 options should be in your ?.Rprofile? file to ensure that the change
 takes effect before the base package is initialized (see Startup).


 b) What is the format that the R_DEFAULT_PACKAGES variable must have
 (I guess now I know, since it is mentioned in ?options, though that's
 not really the place I would have expected it to be explained) ? The
 only examples I could find on the web were setting it to NULL.



 Hope all this helps in some way.

 Haris Skiadas
 Department of Mathematics and Computer Science
 Hanover College


 On Mar 26, 2007, at 6:01 AM, [EMAIL PROTECTED] wrote:


 Hi All

 Please see the Rprofile file which i have modified as follows and
 after
 that when I start R then I see that R says to me TRUE for all the
 packages implying that all loaded at once.
 But when i try to use commands as simple as help(lm), it doesnt
 work nor
 any of the menu Packages is not working.
 Although the regression using lm ( Y ~ X ) is working even summary and
 rnorm is working fine.
 Please tell me why menu and help command is not working

 Rprofile is in between +++ lines
 R initialization 

[R] regarding cointegration

2007-03-15 Thread gyadav

Hi All

Thanks for supporting people like me. 
What is cointegration and its connection with granger causality test ? 
what is its use and mathematical methodology behind it. Secondly, is 
cointegration test like  Phillips-Ouliaris Cointegration Test of tseries 
package or of urca package is the same as cointegration ? Please tell me 
how to go about it and interpret the results ? 

Thanks in advance
cheers :-)
-gaurav


DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Comparison between GARCH and ARMA

2006-11-09 Thread gyadav

Hi

i was just going by this thread, i thought of igniting my mind and got 
something wierd so i thought of making it wired. 

i think whether you take ARMA or GARCH. In computer science these are 
feedback systems or put it simply new values are function of past values. 
In ARMA case it is the return series and the error series. In case of 
GARCH it is the errors and stdev or returns and shock with propotionality 
of coeficient. In any case we are trying to find the returns only. What if 
i put stdev in ARMA and returns in GARCH ? I want to ask what it would end 
up showing me. For me both are having similar structure having two parts :

1. regression depending on past values

2. trying to reduce errors by averaging them

i hope i am correct. please correct me where i am wrong.

thanks and regards
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]




Wensui Liu [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
08-11-06 12:24 AM

To
Leeds, Mark (IED) [EMAIL PROTECTED]
cc
r-help@stat.math.ethz.ch, Megh Dal [EMAIL PROTECTED]
Subject
Re: [R] Comparison between GARCH and ARMA






Mark,

I totally agree that it doesn't make sense to compare arma with garch.

but to some extent, garch can be considered arma for conditional
variance. similarly, arch can be considered ma for conditional
variance.

the above is just my understanding, which might not be correct.

thanks.

On 11/7/06, Leeds, Mark (IED) [EMAIL PROTECTED] wrote:
 Hi : I'm a R novice but I consider myself reasonably versed in time
 series related material and
 I have never heard of an equivalence between Garch(1,1) for volatility
 and an ARMA(1,1) in the squared returns
 and I'm almost sure there isn't.

 There are various problems with what you wrote.

 1) r(t) = h(t)*z(t) not h(i) but that's not a big deal.

 2) you can't write the equation in terms of r(t) because r(t) =
 h(t)*z(t) and h(t) is UPDATED FIRST
 And then the relation r(t) = h(t)*z(t) is true ( in the sense of the
 model ). So, r(t) is
 a function of z(t) , a random variable, so trying to use r(t) on the
 left hand side of the volatility
 equation doesn't make sense at all.

 3) even if your equation was valid, what you wrote is not an ARMA(1,1).
 The AR term is there but the MA term
 ( the beta term ) Has an r_t-1 terms in it when r_t-1 is on the left
 side. An MA term in an ARMA framework
 multiples lagged noise terms not the lag of what's on the left side.
 That's what the AR term does.

 4) even if your equation was correct in terms of it being a true
 ARMA(1,1) , you
 Have common coefficients on The AR term and MA term ( beta ) so you
 would need contraints to tell the
 Model that this was the same term in both places.

 5) basically, you can't do what you
 Are trying to do so you shouldn't expect to any consistency in estimates
 Of the intercept for the reasons stated above.
 why are you trying to transform in such a way anyway ?

 Now back to your original garch(1,1) model

 6) a garch(1,1) has a stationarity condition that alpha + beta is less
 than 1
 So this has to be satisfied when you estimate a garch(1,1).

 It looks like this condition is satisfied so you should be okay there.

 7) also, if you are really assuming/believe that the returns have mean
 zero to begin with,  without subtraction,
 Then you shouldn't be subtracting the mean before you estimate
 Because eseentially you will be subtracting noise and throwing out
 useful
 Information that could used in estimating the garch(1,1) parameters.
 Maybe you aren't assuming that the mean is zero and you are making the
 mean zero which is fine.

 I hope this helps you. I don't mean to be rude but I am just trying to
 get across that what you
 Are doing is not valid. If you saw the equivalence somewhere in the
 literature,
 Let me know because I would be interested in looking at it.


 mark






 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Megh Dal
 Sent: Tuesday, November 07, 2006 2:24 AM
 To: r-help@stat.math.ethz.ch
 Subject: [R] Comparison between GARCH and ARMA

 Dear all R user,

 Please forgive me if my problem is too simple.
 Actually my problem is basically Statistical rather directly R related.
 Suppose I have return series ret
 with mean zero. And I want to fit a Garch(1,1)
 on this.

 my   is r[t] = h[i]*z[t]

 h[t] = w + alpha*r[t-1]^2 + beta*h[t-1]

 I want to estimate the three parameters here;

 the R syntax is as follows:

 # download data:
 data(EuStockMarkets)
 r - diff(log(EuStockMarkets))[,DAX]
 r = r - mean(r)

 # fit a garch(1,1) on this:
 library(tseries)
 garch(r)

 The estimated parameters are given below:

  * ESTIMATION WITH ANALYTICAL GRADIENT *



 Call:
 garch(x = r)

 Coefficient(s):
a0 a1 b1
 4.746e-06  6.837e-02  8.877e-01

 Now it is straightforward to transform Garch(1,1)
  to a ARMA   like this:

 r[t]^2 = w + (alpha+beta)*r[t-1]^2 + beta*(h[t-1] -
 r[t-1]^2) - 

Re: [R] ALARM!!!! Re: regarding large csv file import

2006-10-28 Thread gyadav

hi All,

ok fine got it. The design of R is such that it will work only if data 
fits in the main memory. This issue has been taken up many times but it 
seems it would be very difficult to change the core code hmmm. ok fine. 
hence if i want to work then i will have to either partition the data or 
work with columns. 

thanks to you all
-   Sayonara With Smile  With Warm Regards :-)

  G a u r a v   Y a d a v
  Assistant Manager,
  Economic Research  Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]




jim holtman [EMAIL PROTECTED] 
28-10-06 09:17 AM

To
[EMAIL PROTECTED] [EMAIL PROTECTED]
cc

Subject
Re: ALARM Re: [R] regarding large csv file import






I think that the real issue is that if you want speed and the ability to 
use all the functions in R, then you have to have the data fit in memory 
because of the random access that is done to the data.  Now you can create 
some specialized functions that could make passes through the data and 
accumulate a basis set of stats. 
 
You don't want to have to use virtual memory because the paging would 
significantly slow down any processing that you would want to do.  That is 
the reason why many people store their data in a database and then use the 
SELECT command to pull out the subset of the data that they want to 
operate on.  The majority of the data object that are processed can fit in 
memory and R is designed for everything in memory.  This has been the case 
since it was developed and one of the things you have to live with. 
 
I don't think that there is anyway that a new memory allocation algorithm 
would fit this since it would mean a rewrite of all the code to handle 
data in this fashion.  Simple things like selecting a subset of the data 
using conditional tests would not be simple. 
 
If you can not partition your data and analyze it in subsets that will fit 
in memory, then probably R is not the system you should be using.

 
On 10/27/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 

hi Jim, 

if i partition the file, then for further operation like merging the 
partitioned files and after that doing some analysis on whole data set 
would again require the same amount of memory. If i am not able to do or 
if i am not having memory then i feel there should be serious thinking 
over the issue of memory handling. 
hence i am also copying this to r-devel list and i would also would like 
to contribute and write code for memory handling issue. i would like to 
address this request to the great coders of R that software should be able 
to run in any amount of memory (except some minimum threshold...bingo). 
thus i would invite all the great coders to please address this issue and 
if in any ways i can be helpfull then i am right here. 

thanks 
with regards 
-gaurav 






jim holtman [EMAIL PROTECTED] 
27-10-06 09:09 PM 


To
[EMAIL PROTECTED]  [EMAIL PROTECTED] 
cc

Subject
Re: [R] regarding large csv file import









Is the file only numeric, or does it also contain characters?  You will 
get better performance by either using 'scan' , or specifying what the 
type of each column is with 'colClasses' so that read.csv does not have to 
guess at the types. 
 
You will probably need more memory depending on the type of data.  If I 
assume that it is numeric and that it takes about 6 characters to specify 
a number, then you have approximately 45M numbers in the file and this 
will take up 362MB for a single object.  You should have at least 3X the 
size of the largest object to do any processing since copies will have to 
be made. 
 
I would suggest partitioning the file and processing in parts.  You can 
also put it in a database and 'sample' the rows that you want to process.


On 10/27/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 

hi All,

i have a .csv of size 272 MB and a RAM of 512MB and working on windows XP.
I am not able to import the csv file. 
R hangs means it stops responding even SciViews hangs.
i am using read.csv(FILENAME,sep=,,header=TRUE). Is there any way to
import it.
i have tried archives already but i was not able to sense much. 

thanks in advance

 Sayonara With Smile  With Warm Regards :-) 

G a u r a v   Y a d a v
Assistant Manager,
Economic Research  Surveillance Department,
Clearing Corporation Of India Limited. 

Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :-
[EMAIL PROTECTED]



 

DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{dropped}} 



[R] regarding large csv file import

2006-10-27 Thread gyadav

hi All, 

i have a .csv of size 272 MB and a RAM of 512MB and working on windows XP. 
I am not able to import the csv file.
R hangs means it stops responding even SciViews hangs.
i am using read.csv(FILENAME,sep=,,header=TRUE). Is there any way to 
import it.
i have tried archives already but i was not able to sense much.

thanks in advance

   Sayonara With Smile  With Warm Regards :-)

  G a u r a v   Y a d a v
  Assistant Manager,
  Economic Research  Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] ALARM!!!! Re: regarding large csv file import

2006-10-27 Thread gyadav

hi Jim,

if i partition the file, then for further operation like merging the 
partitioned files and after that doing some analysis on whole data set 
would again require the same amount of memory. If i am not able to do or 
if i am not having memory then i feel there should be serious thinking 
over the issue of memory handling.
hence i am also copying this to r-devel list and i would also would like 
to contribute and write code for memory handling issue. i would like to 
address this request to the great coders of R that software should be able 
to run in any amount of memory (except some minimum threshold...bingo). 
thus i would invite all the great coders to please address this issue and 
if in any ways i can be helpfull then i am right here.

thanks
with regards
-gaurav







jim holtman [EMAIL PROTECTED] 
27-10-06 09:09 PM

To
[EMAIL PROTECTED] [EMAIL PROTECTED]
cc

Subject
Re: [R] regarding large csv file import






Is the file only numeric, or does it also contain characters?  You will 
get better performance by either using 'scan' , or specifying what the 
type of each column is with 'colClasses' so that read.csv does not have to 
guess at the types. 
 
You will probably need more memory depending on the type of data.  If I 
assume that it is numeric and that it takes about 6 characters to specify 
a number, then you have approximately 45M numbers in the file and this 
will take up 362MB for a single object.  You should have at least 3X the 
size of the largest object to do any processing since copies will have to 
be made. 
 
I would suggest partitioning the file and processing in parts.  You can 
also put it in a database and 'sample' the rows that you want to process.

 
On 10/27/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 

hi All,

i have a .csv of size 272 MB and a RAM of 512MB and working on windows XP.
I am not able to import the csv file. 
R hangs means it stops responding even SciViews hangs.
i am using read.csv(FILENAME,sep=,,header=TRUE). Is there any way to
import it.
i have tried archives already but i was not able to sense much. 

thanks in advance

  Sayonara With Smile  With Warm Regards :-)

G a u r a v   Y a d a v
Assistant Manager,
Economic Research  Surveillance Department,
Clearing Corporation Of India Limited. 

Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg,
Mumbai - 400 013
Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :-
[EMAIL PROTECTED]



 

DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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.



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve? 



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] [R-SIG-Finance] regarding bootstrapping... REVISITED

2006-10-10 Thread gyadav

hi Thomas/All,

I went through the thread(
https://stat.ethz.ch/pipermail/r-sig-finance/2006q1/000682.html which 
concerns with swaps). Yeah it is correct that i would like to quote both 
David and Krishna that the curve interpolation may vary considerably (for 
e.g. any polynomial/parametric fit is very different from and curve 
fitting whether it is free hand or by NURBS ( complex version of Basis 
Splines ZZZzzz). My problem is that i want to know how can i generate spot 
curve using bootstrap methodin R.Further, even if you do not have fixed 
maturity bonds i.e. when you need to create fictitious or virtual paper of 
varied fixed maturities like 1 month, 6 month, 1 year, 5 year, 10 year 
. so that you can create a spot curve from the traded points which may 
be like as follows for e.g.

Price,Residual Maturity, Coupon, Frequency, Redemption, Basis
98.45,0.53,5%,2,100,4
100.15,1.54,8%,2,100,4
99.56,8.5,4%,1,100,4
and
97.65,20.6,10%,2,100,4

thanks to all
with warm regards
-gaurav





Thomas Steiner [EMAIL PROTECTED] 
09-10-06 09:18 PM

To
[EMAIL PROTECTED] [EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: [R-SIG-Finance] regarding bootstrapping






Gaurav,

some time ago I asked a very similar question. I got some very helpful
answers and some lines of code. Perhaps you want to read this (after
consulting Hull and the others):
https://stat.ethz.ch/pipermail/r-sig-finance/2006q1/000682.html

If you want to see some of my present code, just let me know.

Yours,
Thomas




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] regarding bootstrapping

2006-10-09 Thread gyadav

Hi All,

Thanks for all your discussions which I read offline and enhance my 
knowledge.

I just want to know how to make yield curve by bootstrapping using R. 
Please give me some subject-matter links and code links.
Especially the Spot Yield Curve and YTM Curve.

   Sayonara With Smile  With Warm Regards :-)

  G a u r a v   Y a d a v
  Senior Executive Officer,
  Economic Research  Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] regarding bootstrapping

2006-10-09 Thread gyadav

Hi All,

Thanks for all your discussions which I read offline and enhance my 
knowledge.

I just want to know how to make yield curve by bootstrapping using R. 
Please give me some subject-matter links and code links.
Especially the Spot Yield Curve and YTM Curve.

   Sayonara With Smile  With Warm Regards :-)

  G a u r a v   Y a d a v
  Senior Executive Officer,
  Economic Research  Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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.



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] regarding bootstrapping

2006-10-09 Thread gyadav

hi Stefan

thanks for the reference but i do not have membership for the same. 
Moreover i wanted to do it through R i.e. making of spot yield curve 
through bootstrapping.
can you provide some links in R for the same. 

-gaurav.



Stefan Grosse [EMAIL PROTECTED] 
09-10-06 07:47 PM

To
[EMAIL PROTECTED], r-help r-help@stat.math.ethz.ch
cc

Subject
Re: [R] regarding bootstrapping






Although it does not directly answer your question you might be
interested in:

Michalis Ioannides, A comparison of yield curve estimation techniques 
using UK data, Journal of Banking  Finance, Volume 27, Issue 1, , January 
2003, Pages 1-26.

Abstract: I compare different methods of estimating the term structure of 
interest rates on a daily UK treasury bill and gilt data that spans the 
period from January 1995 to January 1999. In-sample and out-of-sample 
statistics reveal the superior pricing ability of certain methods 
characterised by an exponential functional form. In addition to these 
standard goodness of fit statistics, model performance is judged in terms 
of two trading strategies based on model residuals. Both strategies reveal 
that parsimonious representations of the term structure perform better 
than their spline counterparts characterised by a linear functional form. 
This is valid even when abnormal returns are adjusted for market 
movements. Linear splines overfit the data and are likely to give 
misleading results. 

Author Keywords: Bonds; Trading strategy; Term structure of interest 
rates; Pricing; Splines





[EMAIL PROTECTED] schrieb:
 Hi All,

 Thanks for all your discussions which I read offline and enhance my 
 knowledge.

 I just want to know how to make yield curve by bootstrapping using R. 
 Please give me some subject-matter links and code links.
 Especially the Spot Yield Curve and YTM Curve.

Sayonara With Smile  With Warm Regards :-)

   G a u r a v   Y a d a v
   Senior Executive Officer,
   Economic Research  Surveillance Department,
   Clearing Corporation Of India Limited.

   Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 

 Mumbai - 400 013
   Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) 
(0)9821286118
   Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
 [EMAIL PROTECTED]


 

 DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and 
...{{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.


 

 DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and 
...{{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.


 





DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] regarding chaos

2006-09-15 Thread gyadav

hi all,

I have a simple question that does power spectral analysis related to 
capacity dimension, information dimension, lyapunov exponent, hurst 
exponent.

If yes then please show me the way. I am newbie in the world of chaos.

   Sayonara With Smile  With Warm Regards :-)

  G a u r a v   Y a d a v
  Senior Executive Officer,
  Economic Research  Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] How to actively join you all

2006-09-10 Thread gyadav

Hi All

Good morning to all of you as it is good morning here. Thanks Gabor, you 
are right i had already reached that link where all the packages are 
there, infact i have  installed all the packages also.

http://cran.r-project.org/src/contrib/PACKAGES.html

As the directory structure suggests that it should contain all the sources 
of contributed packages. I do not know where is the problem is it at my 
end or ,,, Whenever i try to download any tar.gz file my winzip is giving 
me error Error reading header after processing 0 entries. Thus, i am not 
able to see inside the archived file. Please if someody can click on the 
link below,

http://cran.r-project.org/src/contrib/VaR_0.2.tar.gz

and send the source code files at [EMAIL PROTECTED] after 
unzipping it.

I would be really thankful for this kind act. Thanks in advance
Further,i would like to thanks Duncan for his reply.

   Sayonara With Smile  With Warm Regards :-)

  G a u r a v   Y a d a v
  Senior Executive Officer,
  Economic Research  Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] How to actively join you all

2006-09-08 Thread gyadav

Hello R Community,

I am really impressed by the 'R'. I am a computer engineer. Further, I 
have done work on Linux Code at my home and Worked on Cisco IOS platform. 
I would like to contribute to the software i.e. i would like to devote my 
free time for its development, but i do not know how to join the 
development team. If anybody can tell me the way then please show me the 
way. I would be really grateful to you all.

thanks
   Sayonara With Smile  With Warm Regards :-)

  G a u r a v   Y a d a v
  Senior Executive Officer,
  Economic Research  Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] How to actively join you all

2006-09-08 Thread gyadav

Hi Gabor,

i went to this  link via the views link given by you, 

http://cran.r-project.org/src/contrib/VaR_0.2.tar.gz
but it gives me an error when i try to open it by winzip. It gives me 
error message - 
Error reading header after processing 0 entries

Further, As I am now also a finance grad hence i would like to join the 
finance team/ risk management team.
Infact i wanted to ask that  - Is there and control version system they 
use from where i can checkout a line work on it
and the chckin the code again ? How to get login id and password to logon 
to the system ? who will provide me the access to it ?
What is the language they use to write the code is it the greatest and the 
best among the best  - 'C', 

i mean i want to look at the code then only i would in the position that 
whether i would be able to write my own package
 or i would like to go for enhancements/bug fixing area.

etc etc some very basic queries 
thanks

p.s.
http://cran.r-project.org/src/contrib/Descriptions/VaR.html

VaR: Value at Risk estimation
A set of methods for calculation of Value at Risk (VaR) 


Version:
0.2
Depends:
R (= 1.4.1)
Author:
Talgat Daniyarov
Maintainer:
Talgat Daniyarov
License:
GPL (version 2 or higher)

Downloads: 

Package source:
VaR_0.2.tar.gz
Windows binary:
VaR_0.2.zip
Index of contents:
VaR.INDEX
Reference manual:
VaR.pdf



   Sayonara With Smile  With Warm Regards :-)

  G a u r a v   Y a d a v
  Senior Executive Officer,
  Economic Research  Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] how to create time series object

2006-09-07 Thread gyadav

hi all

i have date and the return series like below, but the dates are not in 
uniform intervals. Please show me the way how to create a time series in 
'R' so that dates are also associated with the returns. 

thanks in advance

   Sayonara With Smile  With Warm Regards :-)

  G a u r a v   Y a d a v
  Senior Executive Officer,
  Economic Research  Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Please Ignore This is only a test mail

2006-08-24 Thread gyadav

Hi All,

I regret for sending my question many times as there was some problem at 
my end. Further, I am just sending this post to confirm whether my post is 
reaching or not.

   Sayonara With Smile  With Warm Regards :-)

  G a u r a v   Y a d a v
  Senior Executive Officer,
  Economic Research  Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] R is wonderful

2006-08-22 Thread gyadav

Hi All,

I have also similar feelings for R. I really thank each and every one in 
the R community for joining together to Create R and Spread R.

thanks

   Sayonara With Smile  With Warm Regards :-)

  G a u r a v   Y a d a v
  Senior Executive Officer,
  Economic Research  Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- [EMAIL PROTECTED] ,  Email(Personal) :- 
[EMAIL PROTECTED]



DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Spline Extrapolation(NURBS)

2006-08-08 Thread gyadav

Hi R-help

Does R supports Non Uniform Rational B Splines Extrapolation. If yes then 
please help me in knowing the way. Further, Is there any reference 
regarding Spline Extrapolation (pls note I am not refering to Spline 
Interpolation).

thanks a lot in advance
-gaurav


DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] Spline Extrapolation(NURBS) 2nd Post

2006-08-08 Thread gyadav

Hi R-help

Does R supports Non Uniform Rational B Splines (NURBS) Extrapolation. If 
yes then 
please help me in knowing the way. Further, Is there any reference 
regarding Spline Extrapolation (pls note I am not refering to Spline 
Interpolation). If anybody has any idea as to how to do spline 
extrapolation or any references 
in regards to the same then please enlighten me either through the list or 
at my personal id i.e.

[EMAIL PROTECTED]

thanks a lot in advance
-gaurav













DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] open DLL in R

2006-08-01 Thread gyadav

Hello Sir,

I am just wondering that pedump is a command of 'R' because in could not 
find in the 'R' help using help.search(pedump). I am requesting you to 
narrate as i also have to look into .dll(s). Is there any way to know what 
are the exported functions and constants and imported functions and 
constants in a easy way.

thanks
-gaurav.



Prof Brian Ripley [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
01-08-06 11:18 PM

To
qian li [EMAIL PROTECTED]
cc
r-help@stat.math.ethz.ch
Subject
Re: [R] open DLL in R






On Tue, 1 Aug 2006, qian li wrote:

 I have downloaded a DLL file. I want to look at the contents in the DLL 
file. How can I do it in R?

You need a disassembler such as VC++'s DUMPBIN, but looking at compiled 
code you did not write is not an easy task.  (Or objdump from the MinGW 
toolset.)

If only you want to know what entry points it exports, use pedump -e for 
the pedump.exe in tools.zip (see the R-admin manual).

What has this to do with R?

 
   Thanks,
 
   QL
 
 
 -
 
 
[[alternative HTML version deleted]]
 
 __
 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.
 

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
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.




DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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] regarding filtering the data

2006-07-13 Thread gyadav

Hi all

a very happy greeting to you all.
i have just joined the list, i am newbie in R and this is my first message 
( before this i was a member of Linux kernel mailing list) and hence i 
woulk like to add that i know how to behave in the mailing lists.

I have a data something like this which i am reading from a csv file using 
read.table (Is there any difference between read.csv and read.table as i 
can give sep=, in both of them).

x=[1,2,3,4]

and permutations are
1,2,3,4
2,1,3,4
3,1,2,4
4,1,2,3
etc.

actually these are the permutations where n = 4 and k = 1 to 4 using the 
combs function. Well I want to filter only the data in which the first 
value is smaller that second, second value is smaller than 
third...extending the logic to all the k ( whatever is its value at that 
time). please help me in this regards

thanks
with warm regards
-raspberrylover


DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{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