similar to: lme parameterization question

Displaying 20 results from an estimated 1000 matches similar to: "lme parameterization question"

2005 Jun 15
2
need help on computing double summation
Dear helpers in this forum, This is a clarified version of my previous questions in this forum. I really need your generous help on this issue. > Suppose I have the following data set: > > id x y > 023 1 2 > 023 2 5 > 023 4 6 > 023 5 7 > 412 2 5 > 412 3 4 > 412 4 6 > 412 7 9 > 220 5 7 > 220 4 8 > 220 9 8 > ...... > Now I want to compute the
2006 Oct 02
1
multilevel factor model in lmer
Hello -- I am curious if lmer can be used to fit a multilevel factor model such as a two-parameter item response model. The one parameter model is straightforward. A two-factor model requires a set of factor loadings multiplying a single random effect. For example, a logit model for the ith subject responding correctly to the jth item (j=1,..,J) is logit[p(ij)] = a1*item1(i) + ... + aJ *
2007 Nov 15
5
Multiply each column of array by vector component
Hi, I've got an array, say with i,jth entry = A_ij, and a vector, say with jth entry= v_j. I would like to multiply each column of the array by the corresponding vector component, i,e. find the array with i,jth entry A_ij * v_j This seems so basic but I can't figure out how to do it without a loop. Any suggestions? Michal.
2002 Sep 12
1
Problem with indexing
Dear List I am having a bit of a problem getting a program to work. For each of i=1 to n persons I have a matrix (different for each person) with m rows. What I want to do, is create m new data sets such that the first is made up of the first row for each person from the original matrices, the second contains the second row for each person from the original matrices etc etc up to the mth
2011 Sep 25
1
Question about syntax in lm function
I encounters some codes in ggplot2 manual and confused with one of its lm syntax. The code is here: library(ggplot2) d <- subset(diamonds, carat < 2.5 & rbinom(nrow(diamonds), 1, 0.2) == 1) d$lcarat <- log10(d$carat) d$lprice <- log10(d$price) detrend <- lm(lprice ~ lcarat, data = d) d$lprice2 <- resid(detrend) mod <- lm(lprice2 ~ lcarat * color, data = d) # *** what
2007 Jun 20
1
extending package with function calling an Objective Caml program
Hallo, we are trying to extend the R package multcompView in agreement with the author Hans-Peter Piepho. The function multcompLetters implements so far a heuristic. We would like to add a function that implements an exact algorithm and returns a provable optimum result. This algorithm has been implemented in Objective Caml and we would like to reuse this code. We wrote an R function
2004 Apr 09
2
Regression models w/ splines
Hi - I am fitting various Cox PH models with spline predictors. After fitting the model, I would like to use termplot() to examine the functional form of the fitted model (e.g., to obtain a plot of the relative risk (or log r.r.) versus the predictors). When there is only 1 predictor in the model, termplot returns a "?". In this case, I have not been able to figure out how to create
2010 Mar 04
2
smbclient queue and cancel commands not working
Hi, I'm trying to manage printer queues on a XP box in the lan. Other client commands work well, even echo "test" | smbclient //XPBOX/PRINTER -c "print -" works as expected and starts a print job. But either queue and cancel don't work, without debug flags with no errors. Cancel even says job is deleted. With -d4 I see # smbclient -d3 //volker/HPDJ1120C -U admin
2008 Mar 15
2
Please find the error in my code
hello everybody I use the following code for my programming & it runs with the error as specified below.Any help that would disolve the error will be highly appreciated. Thanks in advance my code looks like this #### R programme for simulating the power of the two sample t test vs various #### non-parametric alternatives sim.size <- 200 sample.size <- 10 set.seed(231) mu1 <- 0 delta
2010 Oct 04
0
spatial interaction (gravity) model as Poisson regression
Dear list, I posted essentially this same question to the r-sig-geo mailing list last week with no response :( Unfortunately I am no closer to reaching a solution, so I now post it here (with some clarifications) in the hope that someone following this list might have an answer for me: Has anyone had much experience with spatial interaction (or gravity) models, specifically in the form of
2004 Nov 16
1
Pairwise Distances -- How to vectorize the loop
R-List, I'm trying to compute pairwise distances among pairs of observations, which each pair containing data from 2 groups. There are more than 100000 unique pairs. I have programmed a distance function that has three parameters, a vector of covariates from the ith observation in Group 1, a vector of covarites from the jth observation in Group 2, and a weighting matrix. I have used
2007 Oct 29
1
How to test combined effects?
Suppose I have a mixed-effects model where yij is the jth sample for the ith subject: yij= beta0 + beta1(age) + beta2(age^2) + beta3(age^3) + beta4(IQ) + beta5(IQ^2) + beta6(age*IQ) + beta7(age^2*IQ) + beta8(age^3 *IQ) +random intercepti + eij In R how can I get an F test against the null hypothesis of beta6=beta7=beta8=0? In SAS I can run something like contrast age*IQ 1,
2012 Dec 06
1
Vectorizing integrate()
I have written a program to solve a particular logistic regression problem using IRLS. In one step, I need to integrate something out of the linear predictor. The way I'm doing it now is within a loop and it is as you would expect slow to process, especially inside an iterative algorithm. I'm hoping there is a way this can be vectorized, but I have not found it so far. The portion of code
2007 Feb 28
1
Efficient way to repeat rows (or columns) of a matrix?
Hi. If I have a vector, v_1, and another vector of positive integers, i_1, the same length as v_1, then rep(v_1,i_1) will repeat v_i[j] exactly i_1[j] times, like so: >rep(c(1,2,3),c(3,2,1)) [1] 1 1 1 2 2 3 > I'd like to do the same sort of thing where I replace v_1 with a matrix, and the jth row of the matrix is repeated i_1 times. Obviously, I could do this with for loops, like
2003 May 28
2
Ordinal data - Regression Trees & Proportional Odds
I have a data set w/ an ordinal response taking on one of 10 categories. I am considering using polr to fit a cumulative logits model. I previously fit the model in SAS (using proc logistic) which provides a test for the proportional odds assumption (p < 0.001 for the test). Are there simple diagnostic plots that can be used to look at the validity of this assumption and possibly help w/
2003 Dec 17
1
Accessing row and col names of SEXP objects
Can someone lend me a hand with extracting the dimnames from a SEXP? I've looked through R-exts, but I couldn't find an example. Here is the code I'm using to grab the jth column name and print it, but the colnames I'm getting are garbage. None of the following are working. void printInfo(SEXP ts) { int j; for (j=0; j<col; j++) {
2010 May 04
1
All possible paths between two nodes in a flowgraph using igraphs?
Hi all Is there any systematic way to compute all possible paths, first-order loops and j-th order loops between two given nodes in a flowgraph (directed graph with cycles) - preferably using the igraph library in R? I have checked the igraph documentation but I can't figure out any direct and systematic way to do so. Any ideas? I use the following definitions from Butler, R. and A.
2013 Apr 01
1
Parameter Estimation in R with Sums and Lagged Variables
Hi guys, I am afraid I am stuck with an estimation problem. I have two variables, X and Y. Y is explained by the weighted sum of n lagged values of X. My aim is to estimate the two parameters c(alpha0,alpha1) in: Yt = Sum from j=1 to n of ( ( alpha0 + alpha1 * j ) * Xt-j ) Where Xt-j denotes the jth lag of X. I came up with this approach because I thought it would be a good idea to estimate
2004 Mar 02
2
Problem with Integrate
The background: I'm trying to fit a Poisson-lognormal distrbutuion to some data. This is a way of modelling species abundances: N ~ Pois(lam) log(lam) ~ N(mu, sigma2) The number of individuals are Poisson distributed with an abundance drawn from a log-normal distrbution. To fit this to data, I need to integrate out lam. In principle, I can do it this way: PLN1 <- function(lam, Count,
2017 Sep 02
6
Strange lazy evaluation of default arguments
Dear R developers, sessionInfo() below Please have a look at the following two versions of the same function: 1. Intended behavior: > Su1 = function(u=100, l=u, mu=0.53, sigma2=4.3^2) + { + print(c(u, l, mu)) # here, l is set to u?s value + u = u/sqrt(sigma2) + l = l/sqrt(sigma2) + mu = mu/sqrt(sigma2) + print(c(u, l, mu)) + } > > Su1() [1] 100.00 100.00 0.53 [1]