Displaying 20 results from an estimated 3000 matches similar to: "Mixed model"
2005 May 25
4
mixed model
Hello all,
I have problem with setting up random effects.
I have a model:
y=x1+x2+x1*x2+z1+z1*x2
where x1, x2, x1*x2 are fixed effects
and z1, z1*x2 are random effects (crossed effects)
I use library(nlme) 'lme' function.
My question is: how I should set up random effects?
I did
lme(y~x1+x2+x1:x2, data=DATA, random=~z1+z1:x2, na.action='na.omit')
but it did not work.
2005 Nov 24
4
Survreg Weibull lambda and p
Hi All,
I have conducted the following survival analysis which appears to be OK
(thanks BRipley for solving my earlier problem).
> surv.mod1 <- survreg( Surv(timep1, relall6)~randgrpc, data=Dataset,
dist="weibull", scale = 1)
> summary(surv.mod1)
Call:
survreg(formula = Surv(timep1, relall6) ~ randgrpc, data = Dataset,
dist = "weibull", scale = 1)
2006 Jan 02
1
ARIMA?
Hi All.,
Following on from all the help I received earlier ..
Just so as you know a well known text book (T&F) uses "repeated
observations"
- I think perhaps they meant repeated measures in retrospect
I am a total beginer to ARIMA, but have read a a basic text.
I read that ARIMA requires a minimum of 50 repeated measures in time
(repeated measures)-
Unfortunately, I have 8
2010 Dec 20
2
package "arules" - 'transpose' of the transactions
Suppose this is my list of transactions:
set.seed(200)
tran=random.transactions(100,3)
inspect(tran)
items transactionID
1 {item80} trans1
2 {item8,
item20} trans2
3 {item28} trans3
I want to get the 'transpose' of the data, i.e.
transactionID items
1 {trans2} item8
2 {trans2} item20
3 {trans3} item28
4 {trans1} item80
I
2020 Jan 01
2
New R function is.nana = is.na & !is.nan
Hello R-devel,
Best wishes in the new year. I am writing to kindly request new R
function so NA_real_ can be more easily detected.
Currently if one wants to test for NA_real_ (but not NaN) then extra
work has to be done: `is.na(x) & !is.nan(x)`
Required functionality is already at C level so to address my request
there is not that much to do.
Kevin Ushey made a nice summary of current R C api
2012 Feb 28
1
group calculations with other columns for the ride
Hello,
I can get the median for each factor, but I'd like another column to go
with each factor. The nm column is a long name for the lvls column. So
unique work except for the order can get messed up.
Example:
x =
2024 May 05
2
lmer error: number of observations <= number of random effects
I am running a multilevel growth curve model to examine predictors of
social anhedonia (SA) trajectory through ages 12, 15 and 18. SA is a
continuous numeric variable. The age variable (Index1) has been coded as 0
for age 12, 1 for age 15 and 2 for age 18. I am currently using a time
varying predictor, stress (LSI), which was measured at ages 12, 15 and 18,
to examine whether trajectory/variation
2024 May 05
2
lmer error: number of observations <= number of random effects
I am running a multilevel growth curve model to examine predictors of
social anhedonia (SA) trajectory through ages 12, 15 and 18. SA is a
continuous numeric variable. The age variable (Index1) has been coded as 0
for age 12, 1 for age 15 and 2 for age 18. I am currently using a time
varying predictor, stress (LSI), which was measured at ages 12, 15 and 18,
to examine whether trajectory/variation
2011 Jan 26
1
aggregate(as.formula("some formula"), data, function) error when called from in a function
I'm having a problem with aggregate.formula when I call it in a function and the function is converted from a string in the funtion
I think my problem may also only occur when the left hand side of the formula is cbind(...)
Here is example code that generates a dataset and then the error.
The first function "agg2" fails
> agg2(FALSE)
do agg 2
Error in m[[2L]][[2L]] : object
2020 Jan 02
1
New R function is.nana = is.na & !is.nan
"nana" is meant to express "NA, really NA".
Your suggestion sounds good.
On Thu 2 Jan, 2020, 3:38 AM Pages, Herve, <hpages at fredhutch.org> wrote:
> Happy New Year everybody!
>
> The name (is.nana) doesn't make much sense to me. Can you explain it?
>
> One alternative would be to add an extra argument (e.g. 'strict') to
> is.na(). FALSE by
2012 Oct 24
1
Getting ordered factor levels from C
I'm working on an R package in C and can't seem to get the same level information about a factor that the R console displays.
If I define a factor as:
lvls <- factor(c('red','blue','blue','green','red'), c('blue','green','red'), ordered=TRUE)
When I get the "levels" attribute in C, I get back the the first
2005 Oct 14
3
zip package
Dear all
I can not understand how to install the package lpsolve_1.1.9.zip
I have read the FAQ and the help pages carefully, but it still not
clear for me.
I have tried the following (and obtained the respective error
messages):
>install.packages("c:/ProgramFiles/R/rw2011/library/lpSolve_1.1.9",destdir="
c:/ProgramFiles/R/rw2011/library/lpSolve")
Mensagem de aviso:
2005 Oct 05
2
problem in installing a package
I'm using R in Windows XP. I created a package myself.
I've used R CMD check to check it. Everything seems OK
except the latex. I get the error message:
* checking bbHist-manual.tex ... ERROR
LaTeX errors when creating DVI version.
This typically indicates Rd problems.
I ignored it because I didn't want to submit it to
CRAN.
Then I tried to use R CMD INSTALL to install it. First
I
2006 Apr 18
2
installation of package "randomForest" failed
Hello
I'd like to try out some functions in the package randomForest. Therefore,
I did install this package. However, it is not possible to load the
library, although I have R-Version 2.1.1 (i.e. later than 2.0.0). The
commands I used and the Answers/Error from R is as follows:
>
install.packages("C://Programme//R//rw2011//library//randomForest_4.5-16.zip",
2005 Oct 06
1
problem with installing a package
I do have full access to that directory. I have the
bbHist package in c:/PROGRA~1/R/rw2011/library/bbHist
directory. Then under the library directory I did
check and build. Here's what I got:
$ R CMD check bbHist
* checking for working latex ... OK
* using log directory
'c:/progra~1/r/rw2011/library/bbHist.Rcheck'
* using R version 2.1.1, 2005-06-20
* checking for file
2014 Jan 27
4
Perl Search::Xapian
Hi,
Trying to learn Search::Xapian and be better at perl at the same time,
I'm stuck, at the DB_CREATE_OR_OPEN error. Perl says this:
~/dev/sandbox/Xapian-perl$ ./Index1-Xap.pl 100-objects-v1.csv db
"db" is not exported by the Search::Xapian module
Can't continue after import errors at ./Index1-Xap.pl line 7.
BEGIN failed--compilation aborted at ./Index1-Xap.pl line 7.
What I
2004 Feb 05
2
correction to the previously asked question (about merging factors)
I have two factors l1, l2, and I'd like to merge them.
(Remark: The factors can not be converted to charaters)
Function c() does not give me the result I want:
> l1 = factor(c('aaaa', 'bbbb'))
> l2 = factor(c('ccc', 'dd'))
> lMerge = factor(c(l1, l2))
> lMerge
[1] 1 2 1 2
Levels: 1 2
>
I'd like to merge l1 and l2 and to get lMerge
2009 Nov 10
3
NetCDF output in R
Dear CSAG R users,
I will be glad if someone can point out what I am doing wrong or not doing at all in this.
I am trying to write out netcdf file in R. I have 26 time step but only the first time step is written.
For example:
>library(ncdf)
>path <- '/home/work/'
>forecast <- open.ncdf(paste(path,'cam.1980.2005.nc',sep=""))
> fore <-
2009 Nov 10
3
NetCDF output in R
Dear CSAG R users,
I will be glad if someone can point out what I am doing wrong or not doing at all in this.
I am trying to write out netcdf file in R. I have 26 time step but only the first time step is written.
For example:
>library(ncdf)
>path <- '/home/work/'
>forecast <- open.ncdf(paste(path,'cam.1980.2005.nc',sep=""))
> fore <-
2011 Apr 03
1
Help in splitting ists into sub-lists
Dear List,
Let's say I have a list whose components are 2 matrices (as exemplified in
the "mylist" object below). I'd like to create a list with components being
4 matrices based on an logical index vector. is there a way to simplify what
I'm doing to obtain the results in "mylist2"? I'd like something that would
work on an arbitrary number of elements in