similar to: Understanding R code

Displaying 20 results from an estimated 200 matches similar to: "Understanding R code"

2009 Jul 02
1
Quantitative Risk Management by McNeil
Dear Specialists in R, May be somebody has experiment in using pakage for the book Quantitative Risk Management by McNeil? This package is writen in R. I have run this package for fitting the data to Nornal Inverse Gaussian distribution and fased with following problem. > Return<-read.csv("data.csv") > Transpose<-t(Return) > fit.NH(Transpose, case="NIG",
2008 May 23
1
maximizing the gamma likelihood
for learning purposes and also to help someone, i used roger peng's document to get the mle's of the gamma where the gamma is defined as f(y_i) = (1/gammafunction(shape)) * (scale^shape) * (y_i^(shape-1)) * exp(-scale*y_i) ( i'm defining the scale as lambda rather than 1/lambda. various books define it differently ). i found the likelihood to be n*shape*log(scale) +
2007 Dec 04
2
weighted Cox proportional hazards regression
I'm getting unexpected results from the coxph function when using weights from counter-matching. For example, the following code produces a parameter estimate of -1.59 where I expect 0.63: d2 = structure(list(x = c(1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1), wt = c(5, 42, 40, 4, 43, 4, 42, 4, 44, 5, 38, 4, 39, 4, 4, 37, 40, 4, 44, 5, 45, 5, 44, 5), riskset =
2006 Sep 14
1
EBAM ERROR
Dear RUsers, I am new to R. I am learning how to use R. I am a PC user and run R on windows. I would appreciate if some one could guide me on a few questions I have: 1) I have 4 cel files (2 replicates for NORM and Disease resp). I have been able to run siggenes on this dataset where I have 4 labels in the class file groupsnhi.cl op-> (0,0,1,1) and my data has been read into datrmanhi after
2000 May 02
2
Variable names in model formula
At 10:37 PM 5/1/00 -0400, E. S. Venkatraman wrote: >I have the following problem. I have survival data (time, status) along >with several covariates (X1, X2,..., Xn). I want to fit a Cox model for >each of the covariate (univariately) and obtain the fitted probability of >survival at a fixed time point t0 and covariate value Xi0. I tried to do >this in a for loop where the index
2005 Mar 16
0
Are there any R packages that can deduce causal relationship between variables?
Hi netters. Assume Y = {Y1,.....Yn} and X = {X1......Xm}, where Yi and Xi are random variables that can take on discrete values from V={0,1,2}. Each Yi in Y has some (0-k) parent variables in X, which means given the values of the parent variables (Xi0....Xik) the values of Yi is set. Yi = F(Xi0,...Xik), where F is a mapping function from parents to sons. Considering there are some noise in
2004 Aug 10
1
Question about mle function
Dear all, I'd like to find the mle esttimates using the mle function mle(negloglik, start = list(), fixed=list(), method="..."). I am using the L-BGFS-B method and I don't supply the gradient function. Is there a way to print the gradients found at the solution value? I am using R-1.9.1 on Windows and on Unix. Thank you in advance, Victoria Landsman. [[alternative
2004 Oct 05
1
Bug in optim - way to solve problem?
Hi, I want to automatically fit variograms to a large number of different sample data sets, and call the funtion "likfit" (in package geoR) from within a for-loop. "likfit" does again call "optim". After ssuccessfully fitting variograms to some of the data sets, the procedure crashes and I get the error message: Error in optim(par = ini, fn = negloglik.GRF,
2004 Jul 14
1
Running the optimization on the subset of parameters
Dear all, I'd like to find a minimum of (-loglik) function which is a function of k parameters. I'd like to run the minimization algorithm for the different subsets of the parameters and assign the fixed values to the complementary subset. How should I define my (-loglik) function such that it can be passed to the optim or other optimization function? Much thanks for any suggestions.
2006 Mar 01
7
Oracle Sequence & Rails
the compiler tell me it: invalid column name: INSERT INTO ago.prova_stats (cognome, nome, id, telefono) VALUES(''Medda'', ''Ivan'', :id, 70565611) where ago.prova_stats is the table used by me and that have only the columns ''cognome'',''nome'' and ''telefono''. My table hasn''t the column
2008 Jan 06
1
Error: missing value where TRUE/FALSE needed
Can any explain the following error: Error in if ((seedCount <= seedNumber) && (valueDiff > sup)) { : missing value where TRUE/FALSE needed which I get upon running this script: seedNumber <- 10 seeds <- array(dim = seedNumber) seedCount <- 1 maxValue <- 100 sup <- maxValue / 2 fcsPar <- array(as.integer(rnorm(100, 50, 10))) while (seedCount <=
2008 Jan 06
1
Error .. missing value where TRUE/FALSE needed
Can any explain the following error: Error in if ((seedCount <= seedNumber) && (valueDiff > sup)) { : missing value where TRUE/FALSE needed which I get upon running this script: seedNumber <- 10 seeds <- array(dim = seedNumber) seedCount <- 1 maxValue <- 100 sup <- maxValue / 2 fcsPar <- array(as.integer(rnorm(100, 50, 10))) while (seedCount <=
2006 Sep 14
0
Help On EBAM
Dear RUsers, I am new to R. I am learning how to use R. I am a PC user and run R on windows. I would appreciate if some one could guide me on a few questions I have: 1) I have 4 cel files (2 replicates for NORM and Disease resp). I have been able to run siggenes on this dataset where I have 4 labels in the class file groupsnhi.cl op-> (0,0,1,1) and my data has been read into datrmanhi after
2006 Jun 20
1
Help with dimnames()
Hi R people: I'm trying to set the dimnames of a data frame called "ests" and am having trouble! First, I check to see if "ests" is a data.frame... > is.data.frame( ests ) [1] TRUE ... and it is a data frame! Next, I try to assign dimnames to that data frame.... > dimnames( ests )[[ 1 ]] <- as.character( ests$stfips ) Error in
2005 Mar 07
1
information on maximum likelihood
Hello, I have a time series that contains 40 years of daily average temperature. I am attempting to create a time series model for the temperature based on a number of papers that do the same. I have an expression that describes the temperature behavior over time but it contains 7 unknown parameters. The authors of the aforementioned papers state that they calculate the parameters using MLE
2011 Mar 19
2
problem running a function
Dear people, I'm trying to do some analysis of a data using the models by Royle & Donazio in their fantastic book, particular the following function: http://www.mbr-pwrc.usgs.gov/pubanalysis/roylebook/panel4pt1.fn that applied to my data and in the console is as follows: > `desman.y` <- structure(c(3L,4L,3L,2L,1L), .Names = c("1", "2", "3",
2008 Feb 16
1
plotEst
Hello, This is the first time i'm trying to plot in R. I want to plot estimates of OR and their confidence limits, like a scatter plot: the vertical axis should be the estimated OR (with upper and lower conf. limits), and the horizontal exis should be fixed values: (1,0.8,0.7,0.6,0.5,0.4) Here is a part of my code: ...ests=matrix(ncol=3,nrow=6)
2013 Jul 17
2
error message in gev
  Hi r-users,   I would like to use gev and my data (annual rainfall ) is as follows:   > head(dat,20) A B C D E F G H I J 1 45.1 41.5 58.5 50.1 46.0 49.1 37.7 49.1 59.8 54.0 2 50.3 39.8 49.4 56.4 49.4 48.8 42.1 49.8 49.4 58.3 3 41.7 39.3 44.6 39.1 35.7 41.5 40.8 40.8 38.5 45.6 4 50.7 33.9 48.4 28.2 35.5 39.1 61.4 17.0 30.7 38.3 5 39.3 30.6 46.9 23.8 25.8
2010 Jan 07
1
Return values in fExtremes package
Hi, I was usuing the fExtemes package, and wanted to obtain some of the values returned from the function gumbelFit(). For example, in the following code, I would like to access 'mu' and 'beta' from the object 'para'. How should I go about doing this? Is there any generic method to access the object? ----------------------------------- >library("fExtremes")
2013 Apr 10
4
Formatting a USB Drive
Hi All, I have a Drobo, connected to a CentOS 6.4 box. The box sees it as /dev/sdg. I want to format it ext3 (as they dont support ext4) but when I try I get: # fdisk -u /dev/sdg WARNING: GPT (GUID Partition Table) detected on '/dev/sdg'! The util fdisk doesn't support GPT. Use GNU Parted. WARNING: The size of this disk is 17.6 TB (17592186044416 bytes). DOS partition table