similar to: Extend my code to run several data at once.

Displaying 20 results from an estimated 200 matches similar to: "Extend my code to run several data at once."

2011 Jul 03
3
Hint improve my code
Hi I have developed the code below. I am worried that the parameters I want to be estimated are "not being found" when I ran my code. Is there a way I can code them so that R recognize that they should be estimated. This is the error I am getting. > out1=optim(llik,par=start.par) Error in pnorm(au_j, mean = b_j * R_m, sd = sigma_j) : object 'au_j' not found #Yet
2011 Jul 04
3
loop in optim
Hi May you help me correct my loop function. I want optim to estimates al_j; au_j; sigma_j; b_j by looking at 0 to 20, 21 to 40, 41 to 60 data points. The final result should have 4 columns of each of the estimates AND 4 rows of each of 0 to 20, 21 to 40, 41 to 60. ###MY code is n=20 runs=4 out=matrix(0,nrow=runs) llik = function(x) { al_j=x[1]; au_j=x[2]; sigma_j=x[3]; b_j=x[4]
2011 Jul 01
2
Help fix last line of my optimization code
Hi I need help figure out how to fix my code. When I call into R >optimize(llik,init.params=F) I get this error message ####Error in optimize(llik, init.params = F) : element 1 is empty; the part of the args list of 'min' being evaluated was: (interval)#### My data and my code looks like below. R_j R_m 0.002 0.026567296 0.01 0.003194435 . . . . . . . . 0.0006
2011 Jul 06
1
Group Data indexed by n Variables
Hello, the more general thing I'd like to learn here is how to compute Function of Data on the basis of grouping determiend by n variables. In terms of the reason why I am interested in this, I need to compute the average of my data based on the value of the month and day across years. I have come up withy the code below which, as far as I can see, does what I need but getting either a more
2011 Oct 03
1
Matrix/Vector manipulation
Hi guys, Have the following problem computing vectors with pure vector algebra and end up reverting to recursion or for-looping. Function my_cumsum calculates a weighted average (W) of ratios (R), but only up to the given size/volume (v). Now I recurse into the vector (from left to right) with what you have left from the difference of volume minus current weight, and stop when the difference is
2008 Dec 27
1
Want to create empty vectors inside a empty data frame
Hi All, I want to create empty vectors inside an empty data frame.The name of the vectors has to come dynamically. For example if record_mean is my empty data frame,and i have say 4 categories,the category names for record mean data frame has to recmeanC1,recmeanC2,recmeanC3,recmeanC4,which will be dynamically created and which will again be inserted in my data frame's as column values.Each
2011 Dec 19
1
pls help to print out first row of terms(model) output in example program
Greetings. I've written a convenience function for multicollinearity diagnosis. I'd like to report to the user the formula that is used in a regression. I get output like this: > mcDiagnose(m1) [1] "The following auxiliary models are being estimated and returned in a list:" [1] "`x1` ~ ." formula(fmla)() [1] "`x2` ~ ." I'd like to fill in the period
2012 Aug 27
2
randomLCA
Can anybody, please, explain me how many parameter are estimated using randomLCA? For examples, model "dentistry.lca2random" estimate 1 scale (or variance, b_j) parameter and 2 position parameters (a_cj)? Doesn't it? Do I need at least 4 diagnostic tests for such a model? What happens if I specify options blocksize and byclass? How many diagnostic tests (or rater) I need?
1999 Dec 10
1
orthogonal and nested model
I'm working with a orthogonal and nested model (mixed). I have four factors, A,B,C,D; A and B are fixed and orthogonal C is nested in AB interaction and finally, D is nested in C. I would like to model the following Y_ijklm=Mu+A_i+B_j+AB_ij+C_k(ij)+D_l(k(ij))+Error_m(...) I used the next command >summary(aov(abund~A*B + C % in % A:B + D % in % C % in % A:B ,datos)) Is it the correct
2012 Oct 29
2
Two-way Random Effects with unbalanced data
Hi there, I am looking to fit a two-way random effects model to an *unblalanced* layout, y_ijk = mu + a_i + b_j + eps_ijk, i=1,...,R, j=1,...,C, k=1,...,K_ij. I am interested first of all in estimates for the variance components, sigsq_a, sigsq_b and sigsq_error. In the balanced case, there are simple (MM, MLE) estimates for these; In the unbalanced setup,
2006 Oct 24
1
Variance Component/ICC Confidence Intervals via Bootstrap or Jackknife
I'm using the lme function in nmle to estimate the variance components of a fully nested two-level model: Y_ijk = mu + a_i + b_j(i) + e_k(j(i)) lme computes estimates of the variances for a, b, and e, call them v_a, v_b, and v_e, and I can use the intervals function to get confidence intervals. My understanding is that these intervals are probably not that robust plus I need intervals on the
2007 Apr 14
6
[LLVMdev] Regalloc Refactoring
On Thu, 12 Apr 2007, Fernando Magno Quintao Pereira wrote: >> I'm definitely interested in improving coalescing and it sounds like >> this would fall under that work. Do you have references to papers >> that talk about the various algorithms? > > Some suggestions: > > @InProceedings{Budimlic02, > AUTHOR = {Zoran Budimlic and Keith D. Cooper and Timothy
2010 Oct 18
0
specifying lme function with a priori hypothesis concerning between-group variation in slopes
I want to specify a 2-level mixed model using the lme function in order to test an a priori hypothesis about the between-group values of the slopes but don't know how to do this . Here is the problem. Consider first the case of a single group. The model is: Y_i= a +bX_i + error where I indexes the different values of X and Y in this group . The a priori hypothesis of the slope is: b=K.
2010 Mar 18
1
Regression of a time series on its Quarters
# Dear List, # I want to characterize a time series according to its Quarter components. # My data ("a.ts": http://docs.google.com/View?id=dfvvwzr2_478cr9k4cdb)? look like: #???????????????? Qtr1????????? Qtr2????????? Qtr3????????? Qtr4 #?? 1948 -0.0714961837? 0.0101747827? 0.0654816569 -0.0227830729 #?? 1949 -0.1175517556? 0.1151378692? 0.1015777858 -0.1971535900 #?? 1950?
2012 Jan 18
0
Time series questions
Hi, I am trying to teach myself some time series analysis. I have some time series data on GDP, quarterly, from 1947 to 2011. colnames are "Year" "Quarter" "GDP" and "GDP.deflator" The first problem I have is that 4th quarter 2010 is missing--not even NA, there is no record for Year=2010 and Quarter =4, so instead of 260 rows, I only have 259. To solve
2001 May 06
1
legend/text in time series plot
hi, i need help on placing legend/text in a time series plot. here is what i am doing (i am using rw1022 on windoze 2000): #read data file gdpn <- scan("jngdpsa.dat", list(year=0, qtr=0, gdp=0)); gdpr <- scan("jrgdpsa.dat", list(year=0, qtr=0, gdp=0)); #convert to time series object gdpn <- ts(gdpn$gdp, frequency=4, start=c(1955,2)); gdpr <- ts(gdpr$gdp,
2012 Feb 02
0
glmer question
I would like to fit the following model: logit(p_{ij}) = \mu + a_i + b_j where a_i ~ N(0, \sigma_a^2) , b_j ~ N(0, \sigma_b^2) and \sigma_a = \sigma_b. Is it possible to fit a model with such a constraint on the variance components in glmer? -- View this message in context: http://r.789695.n4.nabble.com/glmer-question-tp4351829p4351829.html Sent from the R help mailing list archive at
2007 Aug 05
0
null hypothesis for two-way anova
Dear R community, Confused by some of my lab results I ask for the definition of the null hypothesis of a two-way analysis of variance in R (anova() and aov()). Starting with the following model y = a_i + b_j , i in A and j in B is the tested null hypothesis H_0: a_i = 0 for all i in A or H_0: a_m = a_n for any m and n in A? Consequently the same questions for interaction effects.
2012 Feb 06
3
Duplicate rows when I combine two data.frames with merge!
Hello all, First I have done extensive searches on this forum and others and nothing seems to work. So I decided to post thinking someone could point me to the write post or give me some help. I have drawn a 100 samples from a fictitious population (N=1000), and then randomly selected 25% of the 100 samples. I would like to now merge the data.frame from the 100 samples with the data.frame for
2004 Dec 19
1
Authentication problems
Hi. I aim to provide pop3 and imap services to a few users. At the moment I only offer imap for squirrelmail users. However, I can't login successfully for pop3. It appears to be trying to auth against PAM, rather than directly using the passwd-file. Thoughts? Thanks, Rory Config: uthenticatprotocols = pop3 imap ssl_disable = yes login = imap login = pop3 mail_extra_groups = mail auth =