search for: riskmodel

Displaying 8 results from an estimated 8 matches for "riskmodel".

2008 Sep 19
4
Novice question about getting data into R
I found it easy to use R when typing data manually into it. Now I need to read data from a file, and I get the following errors: > refdata = > read.table("K:\\MerchantData\\RiskModel\\refund_distribution.csv", header > = TRUE) Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 1 did not have 42 elements > refdata = > read.table("K:\\MerchantData\\RiskModel\\refund_distribution.csv") Error in scan(file, what, nmax, sep,...
2008 Oct 16
1
Two last questions: about output
Here is my little scriptlet: optdata = read.csv("K:\\MerchantData\\RiskModel\\AutomatedRiskModel\\soptions.dat", header = FALSE, na.strings="") attach(optdata) library(MASS) setwd("K:\\MerchantData\\RiskModel\\AutomatedRiskModel") for (i in 1:length(V4) ) { x = read.csv(as.character(V4[[i]]), header = FALSE, na.strings=""); y = x[,1...
2008 Oct 15
1
Argh! Trouble using string data read from a file
Here is what I tried: optdata = read.csv("K:\\MerchantData\\RiskModel\\AutomatedRiskModel\\soptions.dat", header = FALSE, na.strings="") optdata attach(optdata) for (i in 1:length(V4) ) { x = read.csv(V4[[i]], header = FALSE, na.strings="");x } And here is the outcome (just a few of the 60 records successfully read): > optdata = > rea...
2011 Mar 07
1
Risk differences with survey package
I'm trying to use the survey package to calculate a risk difference with confidence interval for binge drinking between sexes. Variables are X_RFBING2 (Yes, No) and SEX. Both are factors. I can get the group prevalences easily enough with result <- svyby(~X_RFBING2, ~SEX, la04.svy, svymean, na.rm = TRUE) and then extract components from the svyby object with SE() and coef() to do the
2008 Sep 22
2
Why isn't R recognising integers as numbers?
I have a number of files containing anywhere from a few dozen to a few thousand integers, one per record. The statement "refdata18 = read.csv("K:\\MerchantData\\RiskModel\\Capture.Week.18.csv", header = TRUE,na.strings="")" works fine, and if I type refdata18, I get the integers displayed, one value per record (along with a record number). However, when I try " fitdistr(refdata18,"negative binomial")", or hist.scott(refdata18...
2008 Sep 24
0
Trouble understanding the behaviour of stableFit(fBasics)
...plot, title = title, description = description) Model: Student-t Distribution Estimated Parameter(s): alpha beta gamma delta 1.5340000 0.2750000 0.3211991 -0.9922306 Description: Tue Sep 23 22:18:44 2008 by user: Ted > refdata18 = read.csv("C:\\MerchantData\\RiskModel\\Capture.Week.18.csv", > na.strings="") > stableFit(refdata18[,1],alpha = 1.75, beta = 0, gamma = 1, delta = 0, + type = c("q", "mle"), doplot = TRUE, trace = FALSE, title = NULL, + description = NULL) Title: Stable Parameter Estimation Call:...
2008 Oct 08
0
Applying an R script to data within MySQL? How to?
...") > rs <- dbSendQuery(con, "select * from merchants") > df <- fetch(rs, n = 150) > df And of course, that last statement is followed by the entire contents of "merchants" Now, I have a script like the following: refdata18 = read.csv("K:\\MerchantData\\RiskModel\\ndays18.csv", na.strings="") x1 = refdata18[,1] library(MASS) ex1 = fitdistr(x1,"exponential") str(ex1) Now, the contents of ndaysXX.csv represent records where one of the date values is in week XX of the current year. We don't yet have data spanning multiple years,...
2008 Sep 22
1
R-help Digest, Vol 67, Issue 23
...umbers? To: r-help@r-project.org Message-ID: <19600308.post@talk.nabble.com> Content-Type: text/plain; charset=us-ascii I have a number of files containing anywhere from a few dozen to a few thousand integers, one per record. The statement "refdata18 = read.csv("K:\\MerchantData\\RiskModel\\Capture.Week.18.csv", header = TRUE,na.strings="")" works fine, and if I type refdata18, I get the integers displayed, one value per record (along with a record number). However, when I try " fitdistr(refdata18,"negative binomial")", or hist.scott(refdata18...