search for: jlaurentum

Displaying 14 results from an estimated 14 matches for "jlaurentum".

2008 Aug 27
5
Integrate a 1-variable function with 1 parameter (Jose L. Romero)
Hey fellas: I would like to integrate the following function: integrand <- function (x,t) { exp(-2*t)*(2*t)^x/(10*factorial(x)) } with respect to the t variable, from 0 to 10. The variable x here works as a parameter: I would like to integrate the said function for each value of x in 0,1,..,44. I have tried Vectorize to no avail. Thanks in advance, jose romero
2009 Nov 08
3
Obtaining midpoints of class intervals produced by cut and table
Hello list: I am using "cut" and "table" to obtain a frequency table from a numeric sample vector.  The idea is to calculate mean and standard deviation on grouped data.  However, I can't extract the midpoints of the class intervals, which seem to be strings treated as factors.  How do i extract the midpoint? Thanks, jose loreto [[alternative HTML version deleted]]
2008 Aug 15
1
Vectorization of duration of the game in the gambler ruin's problem
Hey fellas: In the context of the gambler's ruin problem, the following R code obtains the mean duration of the game, in turns: # total.capital is a constant, an arbitrary positive integer # initial.capital is a constant, an arbitrary positive integer between, and not including # 0 and total.capital # p is the probability of winning 1$ on each turn # 1-p is the probability of loosing 1$ # N
2010 Feb 12
3
summary statistics for grouped data
Hello list: Is there an easy way (preferably through one of the standard R packages) of obtaining summary statistics for grouped data? I could split the data into classes by hist, and then progressively calculate all the "columns" i need to obtain the mean and standard deviation, but i was looking for a single function that could do that with a data vector. Thanks in advance, jose
2010 Mar 19
1
Sweave and " object of type 'closure' is not subsettable" error
Hello folks: I have a data frame which includes two numeric vectors: "Pa1" and "Ingr" (which represents income).  I run the following code on the R console: ingreso <- factor(ifelse(Ingr<=3000,"bajo","alto")) tapply(Pa1,ingreso,summary) boxplot(Pa1~ingreso) and it works fine.  However, when I "Sweave" through an rnw file containing that
2011 Mar 16
6
Recursos sobre R en la red, Twitter, etc.
Hola, ¿qué tal? Hace unos meses anuncié en esta lista que había creado un agregador de noticias de R. Este agregador rastrea una serie de blogs, filtra aquellas entradas referentes a R, las agrega y: 1) Crea un RSS, que puede consultarse aquí: http://datanalytics.com/r_blogs_mashup.rss 2) Publica las entradas nuevas en Twitter bajo el usuario @noticiasSobreR. Están todas etiquetadas como
2008 Oct 06
0
How to model this? (R-help Digest, Vol 67, Issue 25)
Hello Senne: I am currently teaching a simulation and modeling course in which we use R for most purposes and Sim Py (a python module for discrete event simulation). I am looking for a real-life case such as yours to approach in class- if you wish, i would be happy to look into the case you are describing, along with the data, to work out in the course. If you are interested, please reply with
2009 Nov 25
1
Interpretation of plots in linear regression models (verification of Gauss-Markov hypothesis)
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091125/3f0e364b/attachment-0001.pl>
2011 Apr 04
1
loading R object files on an RWeb server
Hello list: I have some R code/data sets that i'd like to make available to others through RWeb server use.  The code/data were saved via "save.image" and should be made available by the following command sequence: con <- url("https:// ....") load(con) close(con) However, this is where the problem starts... For one thing, i am using google docs to host the R object
2009 Apr 12
1
goodness of fit between two samples of size N (discrete variable)
Hello list: I generate by simulation (using different procedures) two sample vectors of size N, each corresponding to a discrete variable and I want to text if these samples can be considered as having the same probability distribution (which is unknown). What is the best test for that? I've read that Kolmogorov-Smirnov and Anderson-Darling tests are restricted to continuous data
2010 Feb 10
0
getting input from the console when running R in batch mode
Hello list: I am using R through Geany in Ubuntu.  The way i have Geany configured is that upon invoking the exectute command, Geany does a "R <myscript.R >myscript.out", thus getting all input from the myscript.R file and redirecting all output to the myscript.out file. This is a problem when I want to read, say a numeric value, from the keyboard, or when i'd like to output
2012 Jan 06
0
plots for residual analysis
Hello List: I'm writing in R some code to produce plots for residual analysis and diagnostics in linear regressions.  An example of the plots produced is given for downloading at http://dl.dropbox.com/u/25445316/res_plots.png .  Regarding the example plot, I'd like to point out that: 1) Tendency lines based on lowess estimations are drawn as green continuous curves, 2) "Extra"
2009 Jun 17
2
how to verify gauss-markov hypothesis for linear model validity?
Hello list: (This is probably a stupid question).  Is there a "quick and easy" way to confirm the gauss-markov conditions of a linear multiple regression model?  That the mean of the residuals is 0 can easily be tested for. The normality of the residuals as well (shapiro-wilk?).  But what about homoscedasticity? And independence of residuals with respect to the model variables? Thanks
2011 Sep 27
1
problem with switch function across R versions 2.10 and 2.13
Hello, The following piece of code works fine in R.2.10 (ubuntu): switch(distr,         normal    = {if (is.infinite(param["desv"]))                      n <- c(n,"La desv. estándar no puede ser Inf.")                    if (param["desv"]<0)                      n <- c(n,"La desv. estándar no puede ser <0.")                    },