similar to: finding birth position

Displaying 20 results from an estimated 100 matches similar to: "finding birth position"

2007 Dec 06
3
using "eval(parse(text)) " , gsub(pattern, replacement, x) , to process "code" within a loop/custom function
R-help users, Thanks in advance for any assistance ... I truly appreciate your expertise. I searched help and could not figure this out, and think you can probably offer some helpful tips. I apologize if I missed something, which I'm sure I probably did. I have data for many "samples". (e.g. 1950, 1951, 1952, etc.) For each "sample", I have many data-frames.
2007 Apr 23
4
Estimates at each iteration of optim()?
I am trying to maximise a complicated loglikelihood function with the "optim" command. Is there some way to get to know the estiamtes at each iteration? When I put "control=list(trace=TRUE)" as an option in "optim", I just got the initial and final values of the loglikelihood, number of iterations and whether the routine has converged or not. I need to know the
2006 Dec 19
4
Upgrading
Hi! As per Thomas' advice, I upgraded R by using "update.packages()" and got the following warning messages: Warning messages: 1: installation of package 'lmtest' had non-zero exit status in: install.packages(update[, "Package"], instlib, contriburl = contriburl, 2: installation of package 'quadprog' had non-zero exit status in: install.packages(update[,
2007 Oct 24
3
how to loop over a group of variables?
Hi All, I have a data frame with a group of variables named b1, b2, b3, ..., b18. These variables take the value 1, 2 or NA. For each observation, I want to do some computation by looping over the values for the group of variables: b1 to b18. In STATA I would do: forval i=1/18 { --- use b`i' for computation ---- } How can this be done in R? Deepankar
2011 Nov 03
2
query about counting rows of a dataframe
Dear R users, I have got the following data frame, called my_df: gender day_birth month_birth year_birth labour 1 F 22 10 2001 1 2 M 29 10 2001 2 3 M 1 11 2001 1 4 F 3 11
2007 Apr 19
3
Problem installing packages
I tried to install the package "tseries" but could not do so. Any suggestions are welcome. I am using Ubuntu Linux and here is what I did: $ sudo R Then once in R, I did > install.packages("tseries", dep=TRUE) which gave a long list of errors. Going through them, I saw that the basic problem was that the package "grid" was not found by the packages (like
2007 Nov 06
4
C++ and R interface
Hi All, I am trying to do an ML estimation in R. My likelihood function has several nested loops and so it takes a lot of time (days when I use the genetic algorithm for optimization) for the optimization to finish. Unable to avoid loops, I am thinking of writing the likelihood function in C++ and calling it from within R when using *optim()*. I found that one can call C functions (once they have
2008 Mar 31
5
[LLVMdev] Additional Optimization I'm Missing?
Hello, I'm working on using the LLVM JIT for a little project of mine, amazing work first off! I have a question about optimization passes. I initially have this function I've created, in python it looks like this: OS_end = 50OS_start = 0OS_timestep = 1birth_rate = .3population = 30.0for time in range(OS_start, OS_end, OS_timestep): births = birth_rate * population deaths = 0.1
2007 Apr 18
3
Problems in programming a simple likelihood
As part of carrying out a complicated maximum likelihood estimation, I am trying to learn to program likelihoods in R. I started with a simple probit model but am unable to get the code to work. Any help or suggestions are most welcome. I give my code below: ************************************ mlogl <- function(mu, y, X) { n <- nrow(X) zeta <- X%*%mu llik <- 0 for (i in 1:n) { if
2012 Dec 04
4
partial analisys of a time series
Dear list members I want to analyze separately the months of a time series. In other words, I want to plot and fit models for each month separately. Taking the example of http://a-little-book-of-r-for-time-series.readthedocs.org/en/latest/src/timeseries.html births <- scan("http://robjhyndman.com/tsdldata/data/nybirths.dat") birthstimeseries <- ts(births, frequency=12,
2011 Oct 09
2
variable name question
Hi All, This is surely an easy question but somehow I am not being able to get it. I am using R 2.13.2 and have a data set where variable names like this appear: pci1990, pci1991, ... , pci2009. "pci1990" has data on per capita income for 1990, "pci1991" has data on per capita income for 1991, and so on. I would like to create the logarithm of per capita for each of the
2009 Feb 27
3
question about 3-d plot
Hi R Users, I have produced a simulated scatter plot of y versus x tightly clustered around the 45 degree line through the origin with the following code: x <- seq(1,100) y <- x+rnorm(100,0,10) plot(x,y,col="blue") abline(0,1) Is there some way to generate a 3-dimensional analogue of this? Can I get a similar simulated scatter plot of points in 3 dimensions where the points
2006 Jul 18
2
FW: Large datasets in R
Hi, I have two further comments/questions about large datasets in R. 1. Does R's ability to handle large datasets depend on the operating system's use of virtual memory? In theory, at least, VM should make the difference between installed RAM and virtual memory on a hard drive primarily a determinant of how fast R will calculate rather than whether or not it can do the calculations.
2009 Apr 22
1
converting histogram to barchart
Hi list, After a lot of tweaking i have managed to create a histogram with an overlaying density plot. The histogram shows a sample of birth weights of babies and the density plot shows birth weights from a much larger reference populaton. My data is divided in 0.1 Kg bins so in the code below binweigh=0.1. The trouble with the current graph is that it is not very clear since the density plot
2007 May 24
3
Problem with numerical integration and optimization with BFGS
Hi R users, I have a couple of questions about some problems that I am facing with regard to numerical integration and optimization of likelihood functions. Let me provide a little background information: I am trying to do maximum likelihood estimation of an econometric model that I have developed recently. I estimate the parameters of the model using the monthly US unemployment rate series
2007 Oct 25
2
the difference between temp and .temp
Hi everyone - This came up within the last day -- Jim's response to Deepankar is pasted below. There are probably lots of reasons, but what is the advantage to using .temp over, say, temp? I often find myself writing temporary objects -- should I use the . preface? What would be the advantages to doing so? Thanks in advance for what will surely be a collection of illuminating responses.
2005 May 05
2
Please help
Hi I am a novice and need to know how to compile glibc (glibc-2.0.6) under an i686, redhat 9, in order to install wine-20050310. The package does not install otherwise. Is there any other alternative (like older package versions, I don't know where to find one).
2006 Dec 19
2
attach and object masking
Hi R users! I am new to R. When I try to attach a simple dataset using the attach() command, I get the following message: > attach(data1) The following object(s) are masked from package:base : write Can someone tell me what this means? (`write' is the name of a variable in the dataset). And, do I need to do do something about this. Thanks.
2011 Mar 16
1
Standardized Pearson residuals (and score tests)
Hi Peter and others, If it helps, I wrote a small function glm.scoretest() for the statmod package on CRAN to compute score tests from glm fits. The score test for adding a covariate, or any set of covariates, can be extracted very neatly from the standard glm output, although you probably already know that. Regards Gordon --------------------------------------------- Professor Gordon K
2008 Mar 19
1
betabinomial model
Hi, can anyone help me fit betabinomial model to the following dataset where each iD is a cluster in itself , if i use package aod 's betabinom model it gives an estimate of zero to phi(the correlation coeficient ) and if i fix it to the anova type estimate obtained from icc( in package aod) then it says system is exactly singular. And when i try to fit my loglikelihood by