Displaying 20 results from an estimated 3000 matches similar to: "ratios"
2012 Nov 09
2
TreynorRatio
i read about the performance analytics package
i have a doubt about the TreynorRatio
i have code
g=getSymbols("IBM")
> c=Cl(g)
> r=Return.calculate(c)
> SharpeRatio.annualized(r)
IBM.Close
Annualized Sharpe Ratio (Rf=0%) 0.3566339
> TreynorRatio (ret)
Error in inherits(x, "xts") : argument "Rb" is missing, with
2012 Oct 29
2
find the Best-ticker
i need to find the best ticker from the group of some tickers.?
i also need to know on what basis we calculate the best ticker?
i have some idea about the if the risk rate low, or the market price
high we can say the ticker is best.
but i dont know is it true.
Anyone can help me .
Thank you
--
View this message in context:
2012 Nov 24
3
function call from another r file
How to call a function from another r file ?
Anyone can help me .
Having a function named like fun1 which is saved in r file file1.r
and i have another r file like file2.r, and i need to call the fun1 (which
is in file1) within file2.
Thank you
--
View this message in context: http://r.789695.n4.nabble.com/function-call-from-another-r-file-tp4650627.html
Sent from the R help mailing list
2012 Jan 15
1
problem with table.CAPM in PerformanceAnalytics
All,
I'm attempting to run this:
table.CAPM(series[,"Strat.Return",drop=FALSE],series[,"spy.Return",drop=FALSE])
and getting this error
Error in as.vector(data[, i]) : subscript out of bounds
I've searched around and cannot find a solution to the problem. I've used this in the past without problem and I'm not sure what I did different this time.
Other
2012 Oct 11
1
performance analytics- package
In performance analytics - performance summary session , i cant run the
code of -
charts.PerformanceSummary(datafrom_table, rf = 0, main = NULL, method =
"ModifiedVaR", width = 0,event.labels = NULL, ylog = FALSE, wealth.index =
FALSE, gap = 12)
it just return blank chart.
datafrom_table - having a csv file.
and the rest of the things are get from the site
2011 Mar 15
3
Reporting odds ratios or risk ratios from GLM
I am a new R user (am using it through the Rcmdr package) and have struggled
to find out how to report OR and RR directly when running GLM models (not
only reporting coefficients.)
Example of the syntax that I have used:
GLM.2 <- glm(diarsev ~ treatmentarm +childage +breastfed,
family=binomial(logit), data=fieldtrials2)
summary(GLM.2)
This works well except that I manually have to calculate
2003 Dec 05
3
Odds ratios for categorical variable
Dear R-users:
How does one calculate in R the odds ratios for a CATEGORICAL predictor
variable that has 4 levels. I see r-help inquiries regarding odds ratios
for what looked like a continuous predictor variable. I was wondering how
to get the pairwise odds ratios for comparisons of levels of a categorical
predictor variable. I can't seem to get the correct output using:
>
2006 Jun 26
2
compare odds ratios
Hi there, is there any way to compare 2 odds ratios? I
have two tests that are supposed to detect a disease
presence. So for each test, I can compute an odds
ratio. My problem is how can I compare the 2 tests by
testing whether the 2 odds ratios are the same?
Appreciate
2005 Jan 24
1
mcnemar.test odds ratios, CI, etc.
Does anyone know of another version of the Mcnemar test that provides:
1. Odds Ratios
2. 95% Confidence intervals of the Odds Ratios
3. Sample probability
4. 95% Confidence intervals of the sample probability
Obviously the Odds Ratios and Sample probabilities are easy to calculate
from the contingency table, but I would appreciate any help on how to
calculate the confidence
2011 Nov 12
2
Odds ratios from lrm plot
The code
library(Design)
f <- lrm(y~x1+x2+x1*x2, data=data)
plot(f)
produces a plot of log odds vs x2 with 0.95 confidence intervals. How do I
get a plot of odds ratios vs x2 instead?
Thanks
--
View this message in context: http://r.789695.n4.nabble.com/Odds-ratios-from-lrm-plot-tp4033340p4033340.html
Sent from the R help mailing list archive at Nabble.com.
2012 Jun 20
2
Odds Ratios in rms package
Hi,
I'm using the rms package to do regression analysis using the lrm
function. Retrieving odds ratios is possible using summary.rms. However,
I could not find any information on how exactly the odds ratios for
continuous variables are calculated. It doesn't appear to be the odds
ratio at 1 unit increase, because the output of summary.rms did not
match the coefficient's value.
E.g.
2012 Oct 15
1
performance analytics
hi Michael,
am sorry for the incomplete reply .
csv file data havinmg like this ,
>getSymbols("IBM")
>weekly_data = to.weekly(week_name)
>dataframe=data.frame(weekly_data)
>outputfile_name="F:\\R-programs\\Outputfile.csv"
>write.table(dataframe, file =outputfile_name,sep = ",",col.names
=TRUE,row.names = T)
> datafrom_table <-
2005 Jul 26
1
Difficulty getting standard deviation of ALL odds ratios with glm function, logistic regression, need cov of parameters
I am trying to do logistic regression with a categorical predictor variable
with the glm() function, family=binomial. Using glm() I would like to be
able to calculate the confidence intervals of all three possible odds ratios
for a factor (the factor has three categories). Three categories imply two
columns of 0's and 1's in the design matrix, and two parameter estimates
with their
2012 May 11
3
Calculating all possible ratios
I have a data matrix with genes as columns and samples as rows. I want to
create all possible gene ratios.Is there an elegant and fast way to do it in
R and write it to a dataframe?
Thanks for any help.
Som.
--
View this message in context: http://r.789695.n4.nabble.com/Calculating-all-possible-ratios-tp4627405.html
Sent from the R help mailing list archive at Nabble.com.
[[alternative HTML
2010 Sep 19
1
odds ratios for n-way tables: seeking an *apply-able method
I'm looking for a way to generalize the calculation of (log) odds
ratios for 2 x 2 x {strata} frequency
tables in vcd::oddsratio() to R x C x {strata} tables.
For an R x C table, F, odds ratios can be defined
in several ways; one simple way, particularly for tables with ordered
factors, is to calculate the
set of continuation odds ratios, based on the (R-1)x(C-1) set of 2x2
tables with
2007 Jan 03
1
mcmcsamp and variance ratios
Hi folks,
I have assumed that ratios of variance components (Fst and Qst in
population genetics) could be estimated using the output of mcmcsamp
(the series on mcmc sample estimates of variance components).
What I have started to do is to use the matrix output that included
the log(variances), exponentiate, calculate the relevant ratio, and
apply either quantile or or HPDinterval to get
2006 May 26
3
Vector elements and ratios
Dear useRs,
I have two different length vectors: one column (1...m) and one row
vector (1...n):
20
40
20
60
5 4 2
Now I have to calculate ratios between column vector elements and each
row vector elements:
4 5 10
8 10 20
4 5 20
15 12 30
Thank's in advance for any suggestions,
Andrej
2009 Aug 17
3
Newbie question re stddev, quantmod and performanceanalytics
Hi,
I am trying to calculate the std dev of returns of YHOO so far i got:
getSymbols("YHOO")
retYHOO <- Return.calculate(Cl(YHOO))
> sd(retYHOO)
YHOO.Close
NA
but i received an NA....can any assist? tks!
--
View this message in context: http://www.nabble.com/Newbie-question-re-stddev%2C-quantmod-and-performanceanalytics-tp25001293p25001293.html
Sent from the R help
2007 Jan 10
2
SAS and R code hazard ratios
Greetings,
I am new to R and have been comparing CPH survival analysis hazard ratios
between R and SAS PhReg. The binary covariates' HRs are the same, however
the continuous variables, for example age, have quite different HRs
although in the same direction. SAS PhReg produces HRs which are the
change in risk for every one increment change in the independent variable.
How do I
2011 Oct 17
1
calculating ratios from all combinations
so here is the code I need help to fix the line for 'st' when it reaches
maximum, that's where i am getting stuck.
thanks
Sharad
set.seed(100)
d=data.frame(x=rnorm(20)+5,
x1=rnorm(20)+5,
x2=rnorm(20)+5,
x3=rnorm(20)+5,
x4=rnorm(20)+5,
x5=rnorm(20)+5,
x6=rnorm(20)+5,
x7=rnorm(20)+5,
x8=rnorm(20)+5)
r2=c()
cinit=0
for (col in 1:9)
{
cinit=cinit+1
st=cinit+1