search for: cvar

Displaying 20 results from an estimated 20 matches for "cvar".

Did you mean: char
2004 Jan 16
2
Weird problem with trying to change a variable
I have a dataframe called cvar, with two variables (among many others) called MSA and ACTUP. Both are numeric. This was working fine. Then I found out that for two MSAs, ACTUP should be 1, not 0. so I tried cvar$ACTUP[cvar$MSA == 6840] <- 1 cvar$ACTUP[cvar$MSA == 5360] <- 1 but when I try table(cvar$MSA, cvar$ACTUP...
2012 Jul 18
4
The best solver for non-smooth functions?
...0.21, 0, 0.22, 1.30, 2.38, 11.24, 64.86, 19.79, 0, 0, 0, 0, 0, 0, 0, 100 )/100, 8, 8, dimnames = list(rc, rc), byrow = TRUE) # Correlation matrix rho <- rcorrmatrix(N) ; dimnames(rho) = list(firmnames, firmnames) # Credit Value at Risk cm.CVaR(M, lgd, ead, N, n, r, rho, alpha, rating) # Risk neutral yield rates Y <- cm.cs(M, lgd) y <- c(Y[match(rating[1],rc)], Y[match(rating[2],rc)], Y[match(rating[3],rc)]) ; y # The function to be minimized sharpe <- function(w) { - (t(w) %*% y) / cm.CVaR(M, lgd, ead, N, n, r, rho, alpha,...
2011 Mar 05
2
Repeating the same calculation across multiple pairs of variables
...nd of processing using a loop? I tried defining a vector to hold the names for the "c variables" (e.g. c1,c2, ... cn) and creating new variables in a loop using code like: avars<-c("a1","a2","a3") bvars<-c("b1","b2","b3") cvars<-c("c1","c2","c3") for(i in 1:3){ df$cvars[i]<-df$avars[i]/df$bvars[i] } But the variable references don't resolve properly with this particular syntax. Any help would be much appreciated. Cheers. [[alternative HTML version deleted]]
2006 Mar 09
2
Merlin Magix Integration
..... -- Executing Answer("Zap/3-1", "") in new stack -- Executing WaitExten("Zap/3-1", "1") in new stack == CDR updated on Zap/3-1 -- Executing NoOp("Zap/3-1", "#00#219#") in new stack -- Executing Set("Zap/3-1", "CVAR=219@default") in new stack -- Executing NoOp("Zap/3-1", "219@default") in new stack -- Executing VoiceMailMain("Zap/3-1", "219@default") in new stack -- Playing 'vm-password' (language 'en') -- Incorrect password '' fo...
2003 Oct 01
3
sas.get problem
When I try citypro <- sas.get('c:/ndri/cvar/data', member = 'citypro2') I get the following errors and warnings: 'sas' is not recognized as an internal or external command, operable program or batch file. 'less' is not recognized as an internal or external command, operable program or batch file. Error in sas....
2000 Jun 21
3
SAS dataset
Hello, Is there any way we convert SAS dataset into R dataset? Kindest Regards, Peppy Adi-Purnomo ------ Peppy Adi-Purnomo Energy Market Analyst Energy Link Ltd Dunedin - New Zealand Ph.: +64 3 479 2475 Fax: +64 3 477 8424 Email: s.adi.purnomo at energylink.co.nz www.EnergyLink.co.nz -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2006 Apr 14
2
another very simple loop question
I have a dataset with 4 years of students, and normally I want to estimate things using each individual year, so I have a for loop as follows for (i in 1:4){} However, the only way I know how to calculate estimates using all four years of data is to put the estimations outside of the loop. Is there anyway to make a for loop that uses all four years at once, then uses each individual year?
2003 Dec 11
2
read.spss question warning compression bias
Hello again I have a file from SPSS in .sav format. when I run library(foreign) cvar<-as.data.frame(read.spss("c:\\NDRI\\cvar\\data\\cvar2rev3.sav")) I get a warning Warning message: c:\NDRI\cvar\data\cvar2rev3.sav: Compression bias (0) is not the usual value of 100. The data appear to be OK, but I am concerned. (I tried searching the archives and the documena...
2003 Jul 15
0
Multivariate regression method
...to be found). iX1<-ixX(S, ... ); iX2<-!iX1; s11<-solve(S[iX1,iX1,drop=FALSE]); s12<-S[iX1,iX2,drop=FALSE]; s21<-S[iX2,iX1,drop=FALSE]; s22<-S[iX2,iX2,drop=FALSE]; mu1<-mu[,iX1,drop=FALSE]; mu2<-mu[,iX2,drop=FALSE]; Cmu <- (x1%.+%(-mu1))%*%s11%*%s12 %.+% mu2; Cvar <- s22 - s21%*%s11%*%s12; list(Cmu=Cmu,Cvar=Cvar,iX1=iX1,iX2=iX2) } ================================================================= Best wishes to all, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>...
2006 Jul 06
1
Problem with garchFit function in fSeries
I used garchFit function to fit 1600 observations of EURO/USD 2-day returns in GARCH(1,1) model. As part of the summary I got warning message: NaNs produced in: sqrt(diag(fit$cvar)) And didn't get any estimates for 3 params' std.error, t value or probability: Error Analysis: Estimate Std. Error t value Pr(>|t|) mu -0.004827 0.020141 -0.240 0.811 ar1 0.010311 0.026978 0.382 0.702 omega 0.073813 NA NA NA al...
2011 Jun 11
1
Amazon AWS, RGenoud, Parallel Computing
...al" answer, but maybe some suggestions from you if faced similar problems. I did install Revolution on Windows on the amazon instance. I usually go for the large one (8 cores, about 20 Ghz, several GB of RAM). - I am running a financial analysis over several periods (months) in which various CVaR calculations are made (with the rGenoud package). The periods do depend on each other, so parallelizing that does not work. I was quite surprised how well written all the libraries seem for R on Mac since they seem to use my dual core on the Macbook for a large portion of the calculations (I guess...
2003 Dec 16
1
Memory issues in "aggregate" (PR#5829)
...R in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. [Previously saved workspace restored] > source("script.R",echo=TRUE) > rm(list = ls()) > cvar <- function(x) sd(x)/mean(x) > library(sm) Library `sm', version 2; Copyright (C) 1997, 2000 A.W.Bowman & A.Azzalini type help(sm) for summary information > callsperhour <- function(x) length(x)/12 > profiles <- subset(read.csv("profiles.csv"), hourofday >=...
2009 Jan 30
1
Methods not loaded in R-Devel vs 2.8.1
...he GO-GARCH model class. License: GPL (>= 2) LazyLoad: yes LazyLoad: yes NAMESPACE: ********** ## Import packages import(methods) ## Import functions importFrom(stats, coef, logLik, residuals) ## Classes exportClasses(Goestml, GoGARCH, Goinit, Orthom) ## Methods exportMethods(angles, cvar, ccor, ccov, coef, converged, goest, logLik, M, print, show, t, residuals) ## Functions export(gogarch, goinit, gollh, gotheta, Rd2, UprodR, unvech, validOrthomObject, validGoinitObject) Dr. Bernhard Pfaff Director Invesco Quantitative Strategies International Invesco Asset Management Deutschl...
2010 Nov 07
1
High Frequency Trading
Hi R users,   Thanks in advance.   I am using R 2.12.0 on Windows XP.   My objective is to construct algorithms for High Frequency Trading.   May I request you to provide me information such as packages or tools please.   Thank you very much for the time you have given.   Regards,   Deb   [[alternative HTML version deleted]]
2003 Mar 06
0
modifying ftable to allow percentages (wishlist) (PR#2606)
...ould sum to 100 over the complete table. One further modification would be needed in order to use percentages in ftable.formula. Line 42 of ftable.formula, where ftable is called if (inherits(edata, "ftable") is true would have to be changed to ftable(data, row.vars = rvars, col.vars = cvars, ...) The ... argument would have to be added to pass pcnt= to ftable.default. These seem to me to be minor changes that would add a useful functionality to R. (Unless of course Guru[k] already has something much more sophisticated in the pipeline). Would it be a problem to implement this in fut...
2009 Jul 02
6
installer of an application fails
...egister EDI not in topmost frame>, pBlk=" ", pTD=<is not available>, ref_lookup=(nil)) [/usr/src/redhat/BUILD/wine-1.1.24/dlls/oleaut32/typelib.c:3209] in oleaut32 (0x0033ed80) 2 0x6d559ace SLTG_DoVars+0x13e(pBlk=" ", pFirstItem=<is not available>, pTI=0xa45100, cVars=10, pNameTable="IShellLinkA", ref_lookup=(nil)) [/usr/src/redhat/BUILD/wine-1.1.24/dlls/oleaut32/typelib.c:3393] in oleaut32 (0x0033ef10) 3 0x6d5625a9 ITypeLib2_Constructor_SLTG+0x6d9(pLib=0x340000, dwTLBLength=<is not available>) [/usr/src/redhat/BUILD/wine-1.1.24/dlls/oleaut32/...
2005 Mar 31
4
NA's?
Your message doesn't help us very much. You haven't said what kind of calculation it is you want to do, and that certainly matters. For example, for some kinds of computations the solution you started below would work fine: > M <- matrix(1:16, 4, 4) > is.na(diag(M)) <- TRUE > M [,1] [,2] [,3] [,4] [1,] NA 5 9 13 [2,] 2 NA 10 14 [3,] 3 7 NA
2019 Jan 25
0
[klibc:update-dash] parser: Add syntax stack for recursive parsing
...} - quotef++; - goto quotemark; + break; } - break; + + if (synstack->dqvarnest == 0) { + synstack->syntax = BASESYNTAX; + synstack->dblquote = 0; + } + + quotef++; + + if (c == '"') + goto toggledq; + + goto quotemark; case CVAR: /* '$' */ PARSESUB(); /* parse substitution */ break; case CENDVAR: /* '}' */ - if (varnest > 0) { - varnest--; - if (dqvarnest > 0) { - dqvarnest--; - } + if (!synstack->innerdq && + synstack->varnest > 0) { +...
2020 Mar 28
0
[klibc:update-dash] dash: parser: Add syntax stack for recursive parsing
...} - quotef++; - goto quotemark; + break; } - break; + + if (synstack->dqvarnest == 0) { + synstack->syntax = BASESYNTAX; + synstack->dblquote = 0; + } + + quotef++; + + if (c == '"') + goto toggledq; + + goto quotemark; case CVAR: /* '$' */ PARSESUB(); /* parse substitution */ break; case CENDVAR: /* '}' */ - if (varnest > 0) { - varnest--; - if (dqvarnest > 0) { - dqvarnest--; - } + if (!synstack->innerdq && + synstack->varnest > 0) { +...
2009 Sep 29
3
How do I access class slots from C?
Hi I'm trying to implement something similar to the following R snippet using C. I seem to have hit the wall on accessing class slots using C. library(fPortfolio) lppData <- 100 * LPP2005.RET[, 1:6] ewSpec <- portfolioSpec() nAssets <- ncol(lppData) setWeights(ewSpec) <- rep(1/nAssets, times = nAssets) ewPortfolio <- feasiblePortfolio( data = lppData, spec = ewSpec,