similar to: bug in 'margins' behavior in reshape - cast

Displaying 20 results from an estimated 800 matches similar to: "bug in 'margins' behavior in reshape - cast"

2009 Jul 06
2
ReShape chicks example - line plots
Hi, In the examples from the ReShape package there is a simple example of using melt followed by cast that produces a smallish amount of output about the chicks database. Here's the code: library(reshape) names(ChickWeight) <- tolower(names(ChickWeight)) chick_m <- melt(ChickWeight, id=2:4, na.rm=TRUE) DietResults <- cast(chick_m, diet + chick ~ time) DietResults My challenge
2012 Apr 12
1
Using dcast with multiple functions to aggregate
Dear R communitiy, I am trying to use multiple functions for aggregation within a function call for dcast. However this seems to result in an error. Also I have not managed to make dcast() work with fun.aggregate=sd. Please find attached some example code using the ChickWeight data. Many thanks for your help! Jokel #Chick weight example names(ChickWeight) <- tolower(names(ChickWeight))
2009 Nov 14
4
Weighted descriptives by levels of another variables
I've noticed that R has a number of very useful functions for obtaining descriptive statistics on groups of variables, including summary {stats}, describe {Hmisc}, and describe {psych}, but none that I have found is able to provided weighted descriptives of subsets of a data set (ex. descriptives for both males and females for age, where accurate results require use of sampling
2015 Apr 30
2
predict nlme
Estimado Oliver Nuñez Envío un ejemplo reproducible. Javier Marcuzzi # de donde tomo datos, y tiene el modelo (en el pdf) library(MCMCglmm) # librería con las funciónes que voy a usar library(nlme) datos0<-ChickWeight # creo algunos datos que agrego a los origonales Factor<-as.numeric(datos0$Chick) Factor[Factor > 0 & Factor <= 10] <- 'A' Factor[Factor > 10
2010 Oct 01
2
Format of Output of Residuals
An excerpt from dataset ChickWeight: ??? weight Time Chick Diet 1?????? 42??? 0???? 1??? 1 2?????? 51??? 2???? 1??? 1 3?????? 59??? 4???? 1??? 1 I am interested in the residuals of the dataset.? Specifically in saving them to another format. I have been creating text files with sink. CW.lm <- lm(weight ~ Diet, ChickWeight) resid.CW.lm <- resid(CW.lm) But when I call: resid.CW.lm The data
2015 Apr 30
2
predict nlme
Estimados Tengo un error que me desconcierta, es un código que simplifiqué de otro trabajo donde no hay problemas, sin embargo me da un error. Una diferencia es que en mi otro trabajo uso spline y ahora polinomio, este es de segundo grado y se encuentra tanto en efectos fijos como aleatorios, el modelo es correcto, corre con MCMCglmm pero no con nlme. grid <- expand.grid(Tiempo=4:6,
2004 Aug 10
0
Check failed after compilation (PR#7159)
Full_Name: Madeleine Yeh Version: 1.9.1 OS: AIX 5.2 Submission from: (NULL) (151.121.225.1) After compiling R-1.9.1 on AIX 5.2 using the IBM cc compiler, I ran the checks. One of them failed. Here is the output from running the check solo. root@svweb:/fsapps/test/build/R/1.9.1/R-1.9.1/tests/Examples: ># ../../bin/R --vanilla < stats-Ex.R R : Copyright 2004, The R
2013 Apr 20
7
Reshape or Plyr?
H all, I have relative abundance data from >100 sites. This is from acoustic monitoring and usually the data is for 2-3 nights but in some cases my be longer like months or years for each location.. The data output from my management data base is proved by species by night for each location so data frame would look like this below. What I need to do is sum the Survey_time by Spec_Code for
2010 Aug 12
2
Linear regression on several groups
I have a simple dataset of a numerical dependent Y, a numerical independent X and a categorial variable Z with three levels. I want to do linear regression Y~X for each level of Z. How can I do this in a single command that is without using lm() applied three isolated times? -- View this message in context: http://r.789695.n4.nabble.com/Linear-regression-on-several-groups-tp2322835p2322835.html
2006 Sep 05
1
help: advice on the structuring of ReML models for analysing growth curves
Hi R experts, I am interested on the effects of two dietry compunds on the growth of chicks. Rather than extracting linear growth functions for each chick and using these in an analysis I thought using ReML might provide a neater and better way of doing this. (I have read the pdf vignette("MlmSoftRev") and "Fitting linear mixed models in R" by Douglas Bates but I am not
2008 Dec 17
1
Model building using lmer
Dear R-experts, Quite new to R on this end, but learning fast (I hope). I am running version 2.7.1 on Windows Vista. I have small dataset which consists of: # NestID: nest indicator for each chicken. Siblings sharing the same nest have the same nest indicator. # Chick: chick indicator consisting of a unique ID for each single chick. # Year: 1, 2. # ClutchSize: 1-, 2- , 3-eggs. # HO:
2006 Jan 22
1
regression with nestedness
Dear R-users, I set up an experiment where I put up bluebird boxes across an urbanization gradient. I monitored these boxes and at some point I pulled a feather from a chick and a friend used spectral properties (rtot, a continuous var) to index chick health. There is an effect of sex that I would like to include but how would I set up a regression and look at the effect of urbanization
2006 Jan 24
4
nested ANCOVA: still confused
Dear R-users, I did some more research and I'm still not sure how to set up an ANCOVA with nestedness. Specifically I'm not sure how to express chicks nested within boxes. I will be getting Pinheiro & Bates (Mixed Effects Models in S and S-Plus) but it will not arrive for another two weeks from our interlibrary loan. The goal is to determine if there are urbanization (purban)
2008 Dec 03
1
GLMM using lme4
Dear R-experts, I am running R version 2.7.1 on Windows Vista. I have a small dataset which consists of ?chick ID?, ?year (0, 1)?, ?hatching order [HO, defined as first, second and third-hatched chick]?, and the binary outcome of interest ?death (0, 1)?. So a subset of my dataset looks like this on a txt file: y ID Yr HO 1 1 1 First 0 2 1 First 0 3 1 Second 0 4 1 First 1 5 1 First 0 6 1 Third
2017 Nov 01
1
Creating Tag
i want to tag categories to its menuname. i have a csv containing menu item name and in other csv i have a column containing some strings, i want to pick that strings from categories and look into menu items if any menu item containing that string i want to create a new column next to menu item name flagged as 1 otherwise 0 and the only condition is once a menu item flagged as 1 i don't need
2004 Oct 08
3
creating named elements of lists on the fly
HI Folks, I'm trying to create a list with named elements. Only, I don't know the names of the elements a priori (they come from the data being calculated). Currently, my approach is to create an environment, then assign things to the environement, then as.list the environment to get a list. Running the code gives, for example: > e2 <- new.env(FALSE, NULL) >
2010 Feb 04
1
Zero inflated negat. binomial model
Dear R crew: I think I am in the right mailing list. I have a very simple dataset consisting of two variables: cestode intensity and chick size (defined as CAPI). Intensity is clearly overdispersed, with way too many zeroes. I'm interested in looking at the association between these two variables, i.e. how well does chick size predict tape intensity? I fit a zero inflated negat. binomial
2005 Feb 02
4
(no subject)
can you recommend a good manual for R that starts with a data set and gives demonstrations on what can be done using R? I downloadedR Langauage definition and An introduction to R but haven't found them overly useful. I'd really like to be able to follow some tutorials using a dataset or many datasets. The datasets I have available on R are Data sets in package 'datasets':
2010 Feb 11
1
Zero-inflated Negat. Binom. model
Dear R crew: I am sorry this question has been posted before, but I can't seem to solve this problem yet. I have a simple dataset consisting of two variables: cestode intensity and chick size (defined as CAPI). Intensity is a count and clearly overdispersed, with way too many zeroes. I'm interested in looking at the association between these two variables, i.e. how well does chick
2002 Sep 27
2
How to apply SSfpl with binary data
Dear R-help subscribers Would you tell me how to apply SSfpl with binary data as below? Unfortunately, there is not the EXAMPLE in help(SSfpl) for binary data but for quantitative data(Chick). V1: dose V2: log-transformed dose V3: response (rate) V1 V2 V3 1 0.775 -0.2548922 0.1666667 2 5.000 1.6094379 0.8148148 3 10.000 2.3025851 0.5000000 4 20.000 2.9957323