similar to: Group Data indexed by n Variables

Displaying 20 results from an estimated 200 matches similar to: "Group Data indexed by n Variables"

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 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 23
1
Extend my code to run several data at once.
Hi I have a code that calculate maximisation using optimx and it is working just fine. I want to extend the code to run several colomns of R_j where j runs from 1 to 200. If I am to run the code in its current state, it means I will have to run it 200 times manually. May you help me adjust it to accomodate several rows of R_j and print the 200 results. ***Please do not get intimidated by the
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 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
2011 Jun 15
3
Column of numbers added to dataframe when saving with read.csv
I have a dataframe object having the following structure FinalOutput[1:3,] GasDays 2011-03-31 2010-09-30 2010-10-31 2010-11-30 2010-12-31 2011-01-31 2011-02-28 1 2006-10-01 217303553 221205033 222824639 217016511 216093460 216477468 216834021 2 2006-10-02 231158527 234565250 236004109 231467851 230100639 230079907 230734064 3 2006-10-03 282062314 285427832 286372163
2005 Dec 10
2
quantile regression problem
Dear List members, I would like to ask for advise on quantile regression in R. I am trying to perform an analysis of a relationship between species abundance and its habitat requirements - the habitat requirements are, however, codes - 0,1,2,3... where 0<1<2<3 and the scale is linear - so I would be happy to treat them as continuos The analysis of the data somehow does not work, I am
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.
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?
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
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
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 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
2000 Jan 01
0
Re: Tests in linear regression
>>>>> "FrSa" == SABIDO =?iso-8859-1?Q?MART=CDN?= <SABIDO> writes: FrSa> Hello. I am a student from Spain. We are working on 'R' (a FrSa> programming environment for data analysis and graphics). Our FrSa> teacher has told as to make a job about tests in non complet rank FrSa> linear regresion models (I hope you could understand
2005 Dec 12
0
marginal effects in glm's
Hi, I wonder if there is a function in (some package of) R which computes marginal effects of the variables in a glm, say, for concretness, a probit model. By marginal effects of the covariate x_j I mean d P(y=1 | x), which is approx g(xB)B_j dx_j where g is the pdf of the normal distribution, x is the vector of covariates (at some points, say, the mean values) and B is the estimated
2004 Nov 09
0
Is nesting {} inside \eqn OK?
I'm seeing various things fail when I try to next braces inside \eqn. This source \eqn{{\bf\beta}_j}{b(j)} is the vector produces this error ---------------------------------------------- [4] ! Missing $ inserted. <inserted text> $ l.258 \eqn{{\bf\beta}_j}{\bf\beta}_ j{{b(j)} is the vector of coefficients fo... I've inserted a
2010 Dec 26
0
GLS with corAR(1) correlation structure residual/standard error calculation
I am using the gls function to fit a two-stage least squares model with first order autoregressive error terms. Since there is no automated adjustment for the use of two-stage least squares in this package, I am trying to manually replicate standard errors of the coefficient estimates in order to adjust for a first stage OLS estimate of endogenous variables. However, thus far I have been unable to