similar to: the function lme in package nlme

Displaying 20 results from an estimated 2000 matches similar to: "the function lme in package nlme"

2001 Oct 09
1
PROC MIXED user trying to use (n)lme...
Dear R-users Coming from a proc mixed (SAS) background I am trying to get into the use of (n)lme. In this connection, I have some (presumably stupid) questions which I am sure someone out there can answer: 1) With proc mixed it is easy to get a hold on the estimated variance parameters as they can be put out into a SAS data set. How do I do the same with lme-objects? For example, I can see the
2007 Aug 10
0
half-logit and glm (again)
I know this has been dealt with before on this list, but the previous messages lacked detail, and I haven't figured it out yet. The model is: \x_{ij} = \mu + \alpha_i + \beta_j \alpha is a random effect (subjects), and \beta is a fixed effect (condition). I have a link function: p_{ij} = .5 + .5( 1 / (1 + exp{ -x_{ij} } ) ) Which is simply a logistic transformed to be between .5 and 1.
2009 Nov 29
1
optim or nlminb for minimization, which to believe?
I have constructed the function mml2 (below) based on the likelihood function described in the minimal latex I have pasted below for anyone who wants to look at it. This function finds parameter estimates for a basic Rasch (IRT) model. Using the function without the gradient, using either nlminb or optim returns the correct parameter estimates and, in the case of optim, the correct standard
2006 Nov 03
5
ANOVA in Randomized-complete blocks design
Dear all, I am trying to repeat an example from Sokal and Rohlfs "Biometry" -- Box 11.4, example of a randomized-complete-blocks experiment. The data is fairly simple: series genotype weight 1 pp 0.958 1 pb 0.985 1 bb 0.925 2 pp 0.971 2 pb 1.051 2 bb 0.952 3 pp 0.927 3 pb 0.891 3 bb 0.892 4
2010 Jul 03
1
Inverting a scale(X)
G'day, All. I have been trying to trackdown a problem in my R analysis script. I perform a scale() operation on a matrix then do further work. Is there any way of inverting the scale() such that sX <- scale(X) Xprime <- inv.scale(x); # does inv.scale exist? resulting in Xprime_{ij} == X_{ij} where Xprime_{ij} \in R There must be some way of doing it but I'm such a newb
2002 Mar 29
1
help with lme function
Hi all, I have some difficulties with the lme function and so this is my problem. Supoose i have the following model y_(ijk)=beta_j + e_i + epsilon_(ijk) where beta_j are fixed effects, e_i is a random effect and epsilon_(ijk) is the error. If i want to estimate a such model, i execute >lme(y~vec.J , random~1 |vec .I ) where y is the vector of my data, vec.J is a factor object
2005 Jun 14
1
within and between subject calculation
Dear helpers in this forum, I have the following question: 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 ...... and i want to calculate sum_{i=1}^k sum_{j=1}^{n_i}x_{ij}*y_{ij} is there a simple way to do this within and between subject summation in R?
2005 Apr 27
0
Fitting a kind of Proportional Odds Modell using nlme, polr, lrm or ordgee
Hello, I'm trying to fit a special kind of proportional odds model from: Whitehead et al. (2001). Meta-analysis of ordinal outcome using individual patient data. Statistics in medicine 20: 2243-2260. (model 2) The data are as follows: library(nlme) library(geepack) library(Design) library(MASS) options(contrasts=c("contr.SAS","contr.poly")) counts <-
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 Nov 20
1
My own correlation structure with nlme
Dear all, I am trying to define my own corStruct which is different from the classical one available in nlme. The structure of this correlation is given below. I am wondering to know how to continue with this structure by using specific functions (corMatrix, getCovariate, Initialize,...) in order to get a structure like corAR1, corSymm which will be working for my data. Thanks in advance.
2003 Jul 03
1
beginner gls (nlme) question
Hi all, I am trying to get a handle on gls (package nlme). I have a toy problem: 3 fixed factors (A, B, C), two levels each, 5 replicates per treatment. The response variable is continuous, normal. I have a correlation matrix of the form: > mat A B C A 1.00 0.75 0 B 0.75 1.00 0 C 0.00 0.00 1 which is common to all observations. How do I construct the call to gls? I think I need to
2012 Nov 28
1
Help setting optimization problem to include more constraints
Dear R-helpers, I am struggling with an optimization problem at the moment and decided to write the list looking for some help. I will use a very small example to explain what I would like to. Thanks in advance for your help. We would like to distribute resources from 4 warehouses to 3 destinations. The costs associated are as follows: Destination >From 1 2 3 Total
2004 Oct 08
1
nlme vs gls
Dear List: My question is more statistical than R oriented (although it originates from my work with nlme). I know statistical questions are occasionally posted, so I hope my question is relevant to the list as I cannot turn up a solution anywhere else. I will frame it in the context of an R related issue. To illustrate the problem, consider student achievement test score data with multiple
2004 May 12
2
How to know the row number of raw matrix after resampling?
> DATA [,1] [1,] -2.0314185 [2,] -0.3594015 [3,] -1.3225832 [4,] 1.5050892 [5,] -0.4535558 [6,] 3.6335036 [7,] 5.1965750 [8,] 4.2923129 [9,] 6.0913187 [10,] 4.9131070 > RESA [,1] [,2] [,3] [,4] [,5] [1,] -2.0314185 1.5050892 -1.3225832 -1.3225832 -2.0314185 [2,] -0.3594015 -0.3594015 4.2923129 -0.3594015
2005 Apr 12
1
calling svydesign function that uses model.frame
I need help on calling the svydesign function in the survey package (although this error appears not to be specific to svydesign). I am passing parameters incorrectly but am not sure how to correct the problem. ## Call the main function PS.sim (one of mine). The dots are parameters I omitted to simplify the question. ## y.col, str.col, clus.id, and PS.col are names of columns in the object pop.
2006 Mar 07
1
lme and gls : accessing values from correlation structure and variance functions
Dear R-users I am relatively new to R, i hope my many novice questions are welcome. I have problems accessing some objects (specifically the random effects, correlation structure and variance function) from an object of class gls and lme. I used the following models: yah <- gls (outcome~ -1 + as.factor(Trial):as.factor(endpoint)+
2006 Jun 06
1
spatial corStruct in lme
Hi, I'm fitting a relatively simple growth model to some forest plot data. Two species of trees were planted in different mixtures in 10 (nearly-adjacent) plots and measured on four occasions over 10 years. The model is constructed in terms of the diameter increments (per year; DI) in the 3 intervals, in which DI is modelled as a function of mid-interval D and DSQ. The details of the
2006 May 30
1
Query: lme output
Dear R-Users I have a problem accessing some values in the output from the summary of an lme fit. I fit the model below: ggg <- lme (ST~ -1 + as.factor(endp):Z.sas + as.factor(endp), data=dat4a, random=~-1 + as.factor(endp) + as.factor(endp):Z.sas|as.factor(trials), correlation = corSymm(form=~1|as.factor(trials)/as.factor(id)), weights=varIdent(form=~1|endp)) hh
2006 Jun 01
2
Help: lme
Good day R-Users, I have a problem accessing some values in the output from the summary of an lme fit. The structure of my data is as shown below (I have attached a copy of the full data). id trials endp Z.sas ST 1 1 -1 -1 42.42884 1 1 1 -1 48.12007 2 1 -1 -1 43.42878 2 1 1 -1
2006 Jan 07
1
Clustering and Rand Index
Dear WizaRds, I am trying to compute the (adjusted) Rand Index in order to comprehend the variable selection heuristic (VS-KM) according to Brusco/ Cradit 2001 (Psychometrika 66 No.2 p.249-270, 2001). Unfortunately, I am unable to correctly use cl_ensemble and cl_agreement (package: clue). Here is what I am trying to do: library(clue) ## Let p1..p4 be four partitions of the kind