similar to: problem running a function

Displaying 20 results from an estimated 100 matches similar to: "problem running a function"

2005 Jul 12
4
Calculation of group summaries
I know R has a steep learning curve, but from where I stand the slope looks like a sheer cliff. I'm pawing through the available docs and have come across examples which come close to what I want but are proving difficult for me to modify for my use. Calculating simple group means is fairly straight forward: data(PlantGrowth) attach(PlantGrowth) stack(mean(unstack(PlantGrowth)))
2013 Nov 05
20
Xen 4.3.1 / Linux 3.12 panic
Hej folks, I''ve been trying to get a new machine up and running with the latest Xen for a while on a Slackware64 (current) machine. After installing Xen from source and building a new kernel with all xen options enabled I haven''t been able to get the machine to behave. The machine is a brand new dual opteron 6212 on a Supermicro H8DGi board with 64G ECC memory. Running a stock
2013 Nov 05
20
Xen 4.3.1 / Linux 3.12 panic
Hej folks, I''ve been trying to get a new machine up and running with the latest Xen for a while on a Slackware64 (current) machine. After installing Xen from source and building a new kernel with all xen options enabled I haven''t been able to get the machine to behave. The machine is a brand new dual opteron 6212 on a Supermicro H8DGi board with 64G ECC memory. Running a stock
2002 Oct 29
2
wierd problem concerning directory, symlinks, chroot
hello, i'm having a wierd problem with 0.31 tftpd-hpa. i'm using xinetd, with this config: service tftp { disable = no socket_type = dgram wait = yes user = root log_on_failure += USERID bind = 10.13.0.254 server = /usr/sbin/in.tftpd
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
2009 Aug 20
1
Understanding R code
What is 1. par.ests <- optimfit$par 2. fisher <- hessb(negloglik, par.ests, maxvalue=maxima); 3. varcov <- solve(fisher); 4. par.ses <- sqrt(diag(varcov)); Thanks a lot, fit.GEV <- function(maxima) { sigma0 <- sqrt((6. * var(maxima))/pi) mu0 <- mean(maxima) - 0.57722 * sigma0 xi0 <- 0.1 theta <- c(xi0, mu0, sigma0) #10/5/2007: removed assign() for maxima.nl
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)
2012 Aug 30
0
storage mode error question (R2winBUGS)
Hi all, I've been trying to run a model using R2winBUGS, and recurrently I get the message: "Error in FUN(X[[3L]], ...) : invalid to change the storage mode of a factor" My model is the following: sink("GLMM_Poisson.txt") cat(" model{ mu~dnorm(0,0.01) beta1~dnorm(-1,1) for(j in 1:nsite){ alpha[j]~dnorm(mu.alpha,tau.alpha) } mu.alpha~dnorm(0,0.01)
2009 Jan 08
10
help
Hi: I am going through some of the xtable examples and I can't make the one below work. I need to create a longtable on the fly keeping the column headers for all the pages and I thought this example could give some ideas on how to do it. I am using Sweave and xtable to create my tables and graphics. I wonder if someone could tell me what's wrong. Thanks ## Not run: \begin{small}
2007 May 02
0
KS test pvalue estimation using mctest (library truncgof)
Hi, I'm trying to evaluate a Monte Carlo p-value (using truncgof package) on a left truncated sample. >From an empirical sample I've estimated a generalized pareto distribution parameters (xi, beta, threshold) (I've used fExtremes pkg). I'm in doubt on what of the following command is the most appropriate: Let: x<-sample t<-threshold xt<-x[x>t] xihat<-gpdFit(x,
2011 Jun 30
2
Saving fExtremes estimates and k-block return level with confidence intervals.
I am estimating a large model by groups. How do you save the results and?returns the associated quantiles? For this example I need a data frame n?? ?xi??????? mu????????beta 1?? 0.1033614? 2.5389580 0.9092611 2? ?0.3401922? 0.5192882 1.5290615 3?? 0.5130798? 0.5668308 1.2105666 I also want to apply gevrlevelPlot() for each "n" or group. ? #Example n <- c(1, 1, 1, 1, 1, 1, 2, 2, 2,
2013 Jun 24
0
Running MCMC using R2WinBUGS
Hi All: Not sure why my previous question never got posted. Here I am seeking some help on my code. I am using the following code to run MCMC simulation on the following data using the model below: # Data matrix<-NULL > csvs<-paste("MVN", 1:2,".csv",sep="") > for (i in 1:length(csvs)){ + matrix[[i]]<- read.csv(file=csvs[i],header=TRUE) +
2007 Mar 09
1
help with zicounts
Dear UseRs: I have simulated data from a zero-inflated Poisson model, and would like to use a package like zicounts to test my code of fitting the model. My question is: can I use zicounts directly with the following simulated data? Create a sample of n=1000 observations from a ZIP model with no intercept and a single covariate x_{i} which is N(0,1). The logit part is logit(p_{i})=x_{i}*beta
2007 Jun 06
0
A question about riskmeasures() vs. qgpd() in library(evir)
Dear List, This inquiry probably does not directly pertain to R. I am using library(evir) to learn EVT. Based on my reading of things, it is my understanding that if one wants to calculate quantiles of GPD, one could use either riskmeasures() or qgpd(). However, using data(danish) as an example, the quantile estimates produced by riskmeasures() are considerably different from those produced by
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")
2010 Jul 22
1
function return
I am sorry if this question is vague or uninformed. I am just learning R and struggling. I am using the book Hierarchical Modeling and Inference in Ecology and they provide examples of R code. I have the following code from the book but when I run it I don't get any output. I cannot get the values of 'out' to show up. Basically, I just want to see my estimates for b0,
2008 May 16
1
SE of difference in fitted probabilities from logistic model.
I am fitting a logistic binomial model of the form glm(y ~ a*x,family=binomial) where a is a factor (with 5 levels) and x is a continuous predictor. To assess how much ``impact'' x has, I want to compare the fitted success probability when x = its maximum value with the fitted probability when x = its mean value. (The mean and the max are to be taken by level of the factor
2011 Mar 03
2
Multivariate Granger Causality Tests
Dear Community, For my masters thesis I need to perform a multivariate granger causality test. I have found a code for bivariate testing on this page (http://www.econ.uiuc.edu/~econ472/granger.R.txt), which I think would not be useful for the multivariate case. Does anybody know a code for a multivariate granger causality test. Thank you in advance. Best Regards -- View this message in context:
2004 Nov 05
0
R check passes code and docs that don't match
I have code and documentation that don't match, but R CMD check didn't flag it. in mspath.R mspath <- function(formula, # formula with observed Markov states ~ observation times (required) qmatrix, # matrix of 1s and 0s with indices of allowed transitions (diagonal is ignored) (required) misc = FALSE, ematrix = NULL, # matrix
2009 Aug 26
2
Statistical question about logistic regression simulation
Hi R help list I'm simulating logistic regression data with a specified odds ratio (beta) and have a problem/unexpected behaviour that occurs. The datasets includes a lognormal exposure and diseased and healthy subjects. Here is my loop: ors <- vector() for(i in 1:200){ # First, I create a vector with a lognormally distributed exposure: n <- 10000 # number of study subjects