similar to: Computational problems in R

Displaying 20 results from an estimated 5000 matches similar to: "Computational problems in R"

2009 Dec 11
2
Regularized gamma function/ incomplete gamma function
Dear all, I would be very grateful if you could help me with: Given the regularized gamma function Reg=int_0^r (x^(k-1)e^(-x))dx/int_0^Inf (x^(k-1)e^(-x))dx ; 0<r<Inf (which is eventually the ratio of the Incomplete gamma function by the gamma function), does anyone know of a package in R that would evaluate the derivative of the inverse of Reg with respect to k? I am aware that the
2011 Apr 26
1
Running Fortran code from R
Dear R users, I have a Fortran code that I would like to compile and call from R later. I have never worked with Fortran before. Does anyone know the steps to create Fortran DLLs for R on a Windows PC. Is anyone aware of a manual (or does anyone know how to) that explains: - What tools and software I need to download for that - How to set the paths in my PC - What
2008 Oct 20
1
Error reporting in R
Hello, I am hoping someone can help me with the following: I am applying the function "mle" on a single data set X n times, each time using a different set of initial values v[i] (i=1,...,n). The initial values are all finite. Two cases arise: A- For some sets of initial values mle is giving parameter estimates. B- For some other initial values, mle is reporting the following error:
2011 Aug 26
2
How to generate a random variate that is correlated with a given right-censored random variate?
Hi, I have a right-censored (positive) random variable (e.g. failure times subject to right censoring) that is observed for N subjects: Y_i, I = 1, 2, ..., N. Note that Y_i = min(T_i, C_i), where T_i is the true failure time and C_i is the censored time. Let us assume that C_i is independent of T_i. Now, I would like to generate another random variable U_i, I = 1, 2, ..., N, which is
2013 Jul 22
1
about mix type clust algorithm
Hi: I have tried to find the appropriate clust algorithm for mixed type of data. The suggested way I see is: 1. use daisy to get the dissimilarity matrix 2. use PAM/hclust by providing the dissimilarity matrix, to get the clusters but by following this, when the data set grows bigger say 10,000 rows of data, the dissimilarity matrix will be O(n^2), and out of memory will occur. I am
2015 Jan 03
4
Potential cross-platform package building issue
I am using 32-bit R 3.1.2 on Windows 7. I recently conducted an `R CMD check --as-cran` on a recently-developed package and received only the 'New submission' note. Research on StackOverflow and on R-devel suggested this could be ignored. I also used devtools::build_win() and received no notes or warnings, other than the one mentioned previously. Lastly, I conducted an `R CMD check` with
2007 Oct 25
3
Deparsing part of a list argument
Here's a simple example of the type of function I'm trying to write, where the first argument is a list of functions: myfun <- function(funlist, vec){ tmp <- lapply(funlist, function(x)do.call(x, args = list(vec))) names(tmp) <- names(funlist) tmp } > myfun(list("Summation" = sum, prod, "Absolute value" = abs), c(1, 4, 6, 7)) $Summation [1]
2011 Apr 15
1
How to generate a correlation matrix with restrictions on its eigenvalues
Dear All, I would like to generate m positive real numbers c_i, I=1,...,m, such that (1) c_1 + c_2 + ... + c_m=m, (1) after being ordered into c_1 >= c_2 >= .... >=c_m>0, we have that c_m is of the same order of m^(-1/8), when m is sufficiently large. Thanks, -Chee [[alternative HTML version deleted]]
2011 Nov 04
4
How to delete only those rows in a dataframe in which all records are missing
Hi, Imagine I have the following data frame: > a <- c(1,NA,3) > b <- c(2,NA,NA) > c <- data.frame(cbind(a,b)) > c a b 1 1 2 2 NA NA 3 3 NA I want to delete the second row. If I use na.omit, that would also affect the third row. I tried to use a loop and an ifelse clause with is.na to get R identify that row in which all records are missing, as opposed to the first
2013 Jul 05
1
kruskal.test followed by kruskalmc
Hi all, After running kruskal.test I have got results (p<0,005) pointing to reject the hypothesis that the samples were draw from the same population. Howerver when I run the kruskalmc there are no significant differences in any of the multiple comparisons. Is that possible? Some clarification? Thanks, Humber <https://sites.google.com/site/humberandrade> [[alternative HTML version
2013 Mar 22
4
error while extracting the p-value from adf.test
Hello all, I tried to extract the p-value from adf.test in tseries; however, I got the error message such as > ht=adf.test(list.var$aa) > ht$p-value Error in ht$p - value : non-numeric argument to binary operator > ht Augmented Dickey-Fuller Test data: list.var$aa Dickey-Fuller = -2.3147, Lag order = 4, p-value = 0.4461 alternative hypothesis: stationary > ht$data [1]
2013 Sep 03
1
ESEM in R
Hello R experts, Is there any possibility to perform exploratory structural equation modeling (ESEM) in R? Which package should I use? Thanks a lot for help, Krzysztof
2012 Nov 30
1
Little's Chi Square test for MCAR?
Is there any further development in R to identify the missing data Mechanism? Would you please help ? ======= Please find our Email Disclaimer here-->: http://www.ukzn.ac.za/disclaimer ======= [[alternative HTML version deleted]]
2013 Apr 17
1
Anova unbalanced
Hello everybody, I have got a data set with about 400 companies. Each company has a score for its enviroment comportment between 0 and 100. These companies belong to about 15 different countries. I have e.g. 70 companies from UK and 5 from Luxembourg,- so the data set is pretty unbalanced and I want to do an ANOVA. Somthing like aov(enviromentscore~country). But the aov function is just for
2013 Apr 11
1
Calculating std errors of marginal effects in interactions
Hi! I've been looking for a way to calculate std errors of marginal effects when I use interaction terms, but with no success. I pretty much have two cases: continuous variable * continuous variable, and continuous variable * binary variable. In both cases, I know how to calculate the marginal effects, even with simulation. But I still can't figure out how to calculate the std errors of
2013 Feb 07
1
coplot question
In R I have 3 variables x,y and z that contain: | x y z [1,] 1 12 122 [2,] 1 13 113 [3,] 1 11 111 [4,] 3 13 123 [5,] 4 14 134 [6,] 5 15 155| I am creating a coplot with the following syntax: |given.depth<- co.intervals(z, number=3, overlap=.1) coplot(x~y|z,pch=19,col="red",cex=1.5,given.values=given.depth)| The resulting plot however has has bars in the
2012 Dec 13
1
Pairwise deletion in a linear regression and in a GLM ?
Dear useRs, In a thesis, I found a mention of the use of pairwise deletion in linear regression and GLM (binomial family). The author said that he has used R to do the statistics, but I did not find the option allowing pairwise deletion in both lm and glm functions. Is there somewhere a package allowing that ? Thanks, Arnaud [[alternative HTML version deleted]]
2013 Jan 31
1
lower corner cumulative probability
Dear useRs, With the following set of command i managed to create the copula density ================================================ >library(MASS) >library(evd) >X<-matrix(sample(1:3000), ncol=2) >U=cbind(rank(X[,1])/(nrow(X)+1),rank(X[,2])/(nrow(X)+1)) > mat1=kde2d(U[,1],U[,2],n=150) image(mat1$x,mat1$y,mat1$z,col= rev(heat.colors(1500)),xlab="",ylab="")
2013 May 02
1
warnings in ARMA with other regressor variables
Hi all, I want to fit the following model to my data: Y_t= a+bY_(t-1)+cY_(t-2) + Z_t +Z_(t-1) + Z_(t-2) + X_t + M_t i.e. it is an ARMA(2,2) with some additional regressors X and M. [Z_t's are the white noise variables] So, I run the following code: for (i in 1:rep) { index=sample(4,15,replace=T) final<-do.call(rbind,lapply(index,function(i)
2013 Jan 18
2
columns called X rename Y
I have a data. frame to which you want to change the names to some of their columns. For example: > seba <- data.frame ('constant' = 3, 'numbers' = 1: 10, 'letters' = LETTERS [1:10], otros = 2:11) List their names: > names (Seba) [1] "constant" "numbers" "letters" I want to rename c the column called constant and b the column