search for: hab

Displaying 20 results from an estimated 81 matches for "hab".

Did you mean: ha
2012 Jul 07
4
replacement has length zero
...code but keep getting an err message. My current thinking is that the problem is on the indexing but do not know how to fix it. Any help please? ungulate <- read.csv("Ungulate.csv",row.names=1) ungulate <- as.matrix(ungulate);colnames(ungulate)<-NULL;rownames(ungulate)<-NULL habitat <- read.csv("Ungulate_vegetation.csv") habitat <- habitat[,3] site.data <- read.csv("Ungulate_site.csv") site <- site.data$SiteId visit <- site.data$Visit date <- site.data$Date date <- matrix(date,nrow=20,ncol=7,byrow=TRUE) S <- dim(ungulate)[1] m &l...
2011 Jun 14
1
"non-numeric argument to binary operator"
...ing above error message when I change the value of b in the following code: rm(list=ls()) library("Hmisc") set.seed(4) #seems to have an effect on t(apply b=10 pop.props = c(0.6,0.2,0.2) x=matrix(pop.props,nrow=nn,ncol=length(pop.props), byrow=T) print(x) habs = rMultinom((x),b) print(habs) habs=t(apply(habs, 1, table))/b # works for b=10, but not for b=5??? Also when i run this code in the iteration loop, it seems that changing seed value also has an effect on whether I get the code to run in entirety, or if it chokes with the above error mes...
2012 Oct 26
1
Openbugs- Array Index
Hi, I'm working on the codes below however every time I run them when they get to OpenBUGS I keep getting the error message: array index is greater than array upper bound for hab. Any help would be greatly appreciated, Suzie Codes: ungulate <- read.csv(file.choose ()) #ungulate ungulate <- as.matrix(ungulate);colnames(ungulate)<-NULL;rownames(ungulate)<-NULL habitat <- read.csv(file.choose ()) #ungulate habitat habitat <- h...
2008 Oct 15
3
Removing characters and periods from character strings
...iables, 2) remove all periods. I tried to do it with the awkward code below. It works to remove all the numbers, but when I try to remove the period everything is lost. Does anyone have a solution? And perhaps a more elegant way? pick=c("(Intercept)", "Clear", "factor(Hab)3", "factor(Hab)4", "factor(Hab)5","factor(Hab)7", "factor(Log)1", "Hunt", "Pop", "s(PrimRd).1", "s(PrimRd).2", "Unlog", "Xcoord", "Ycoord") vars=as.character(as.vector(strsplit(p...
2009 Jun 27
1
data formatting
All, I have three columns of data: id, date, hab. I am trying to set up a matrix that has the id as the rows, date as columns, and the hab value as the data values. Each id/date combination can only have one hab value. I would like for it to look something like this" date 1, date 2, date 3. id 0001 2 1 2 0002...
2003 Dec 05
3
Odds ratios for categorical variable
...-help inquiries regarding odds ratios for what looked like a continuous predictor variable. I was wondering how to get the pairwise odds ratios for comparisons of levels of a categorical predictor variable. I can't seem to get the correct output using: > sp.glm=glm(cohort$logreg~cohort$hab, family=binomial) > summary(sp.glm) This gives me the coefficient for the effect of hab overall, but not the coefficients for the comparisons of each of the levels. I suspect this has something to do with the contrasts statement, but I can't figure it out, and would be very appreciative...
2011 Jan 11
0
modified FAST Script from package SensoMineR for the R community - Reg
...MCA2 is required. ## library(maptools) need to be called before calling the functions. ###plot.MFA2 Function plot.MFA2<- function (x, axes = c(1, 2), choix = "ind", ellipse = NULL, ellipse.par = NULL, lab.grpe = TRUE, lab.var = TRUE, lab.ind.moy = TRUE, lab.par = FALSE, habillage = "ind", col.hab = NULL, invisible = NULL, partial = NULL, lim.cos2.var = 0, chrono = FALSE, xlim = NULL, ylim = NULL, cex = 1, title = NULL, palette = NULL, new.plot = TRUE, ...) { res.mfa <- x if (!inherits(res.mfa, "MFA")) stop("non c...
2012 Dec 06
1
Fitting a multinomial model to a multi-way factorial design with repeated measures: help on package and syntax
Dear all, I studied in tank prey fish behavior. Using the design described below (and R code), I want to test the effects of both habitat and predator (and interaction) on prey fish's vertical distribution, which was recorded (with repeated measures) as a categorical variable. I found that package mlogit might fit to my need but I don't know how to specify my complex design in the formulae (which of my variables are...
2007 Jan 23
0
New lmer: How to recode random effect ?
Dear all, I ran the following model without any problem previously to the update of lme4: fm2<-lmer(data=NGud,family=poisson, seed~hab*seedtray +(1|site)+(1|site:hab)) I have 25 sites, 2 habitats ("hab") per site, 8 seedtrays per habitat (4 as control, and 4 as treatment), and I'm interested in comparing the number of seed in seedtrays as a function of the treatment and its interaction with habitat. My problem i...
2007 Oct 02
0
Variable selection in R
...is of Variance Table Response: Cout.ton Df Sum Sq Mean Sq F value Pr(>F) Tonnage 1 9720 9720 1.3497 0.2470437 Popul 1 112361 112361 15.6014 0.0001164 *** DensiteOcc 1 173350 173350 24.0699 2.245e-06 *** NbmRues.hab 1 280 280 0.0389 0.8438903 RFU.hab 1 183 183 0.0254 0.8734816 UO.MAMR.Precis 1 67161 67161 9.3254 0.0026428 ** t.CS.t.déchets.MAMR 1 24188 24188 3.3586 0.0686925 . Pct.Pot.CS.hab 1 78764 78764 10.9365 0.0011614 ** N...
2007 Oct 04
1
Include on few directory
Hello, I would like only to sync few directories between my two Linux boxes. I tries this but no help sudo rsync -avrtzun --stats \ --include-from "include-nix" \ --exclude-from "excludes-nix" \ --delete \ --progress \ -e "ssh -l hab" /home/hab/ desktop:/home/hab excludes-nix * include-nix Development/* www/* Personal/* can you help? -- OOzy Ubuntu-Feisty
2011 Jun 08
3
determine frequencies in a matrix by row
Hi, I have a matrix [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 3 1 1 3 1 1 2 3 2 [2,] 1 3 1 2 1 1 1 2 2 1 [3,] 1 2 2 3 2 1 1 1 2 1 [4,] 3 2 1 1 1 3 1 2 1 2 [5,] 1 1 2 2 1 1 3 1 1 2 and want to determine how many times 1s,
2011 Dec 01
0
Error message: object 'A' not found
I ran the following code: And I run into problems with the last line of code (when it says hn<-......). I keep getting an error code: Error in distsamp(~hab ~ 1, peldist, keyfun = "halfnorm", output = "density", : object 'A' not found I would appreciate any and all help. rm(list=ls(all=TRUE)) #clear the computer's memory of variables setwd("E:\\Analysis") # Part 1 li...
2012 Jul 13
3
Help with R2 OpenBUGs
...it in openbugs it gives an error message saying: unknown type of logical function error pos 76. Any help would be appreciated. ## bugs code library(R2OpenBUGS) sink("C:/Users/CCF/Documents/Suzie Work/PTY Project/Waterhole Correction/ungulate.txt") cat(" model{ # hyperparameters # habitat effects for each functional group g <- length(table(G)) for(i in 1:g){ # number of functional group for(j in 1:3){ # number of habitat type mu.h[i,j] ~ dnorm(0,0.0001) I(-5,5) sigma.h[i,j] ~ dunif(0,5) tau.h[i,j] <- 1/(sigma.h[i,j]*sigma.h[i,j]) } } # detectability mu.r ~ dnorm(0,0....
2005 Nov 25
1
glmmPQL
...and Plot as random. 3) No way to obtain an analysis of deviance for the GLMM fit. 4) Year appears without degrees of freedom. As you see, too many problems. Thank you very much for any help. JM _____________________________________________ > summary (Ifate) Year Plot Fate Hab Peso Dist A:664 A:359 cache : 91 Oak :621 Min. :0.1903 Min. :1.362 B:574 B:427 comida:1147 Open : 94 1st Qu.:0.5515 1st Qu.:1.847 C:135 Pine :159 Median :0.6670 Median :2.137 D: 97 Rock : 23 Me...
2012 Sep 13
1
problem creating an array
...bind(landmat,(cbind(mat[,c(i)],mat[,c(i+201)],mat[,c(i+402)]))) } ##this loop is a check to ensure the triplets all sum to 1 #sum=numeric() #n=1 #landmat_vec=landmat[1,] #for (i in 1:201) #{ #sum[i]=landmat_vec[n]+landmat_vec[n+1]+landmat_vec[n+2] #n=n+3 #} #create vector of column names in "hab" for each matrix and attach using #"colnames(matrix)" hab<-c("theta1","theta2","theta3") colnames(landmat)=rep(hab,201) *********The following for loop is not working****** ## separate the columns of landmat(dim:1000x603) # into 201 separate 1000x3 m...
2009 Jun 29
5
Select values at random by id value
All, I have data that looks like below. For each id there may be more than one value per day. I want to select a random value for that day for that id. The end result would hopefully be a matrix with the id as rows, date as columns and populated by the random hab value. Thanks to someone on here (Jim) I know how to do the matrix, but now realize I need to randomly select some of my values. All help is appreciated. jm id, date, loctype, habtype 50022 1/25/2006 0 6 50022 1/31/2006 0 6 50022 2/8/2006 0 6 50022 2/13/2006 0 6 50022 2/15/2006 0 6 50022 2...
2010 Dec 01
1
Poisson GLM warning message
...#39; consists of counts of different species ranging from 0 to 4. I suspect this may have something to do with the warning message but I'm not sure. Can anybody help? Thank you! Anna Call: glm(formula = Species ~ Dist + Time + Alt + Elev.road + Noise + Cloud + Temp + Wind.sp + Water + Hab + Crossing, family = poisson, data = bats1) Deviance Residuals: Min 1Q Median 3Q Max -2.131083 -0.734566 0.005422 0.548956 2.186938 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -7.496e-01 6.642e-01 -1.128 0.25...
2006 Feb 26
2
subtotal, submean, aggregate
Dear All, I would like to make partial sums (or means or any other function) of the values in intervals along a sequence (spatial transect) where groups are defined. For instance: habitats<-rep(c("meadow","forest","meadow","pasture"),c(10,5,12,6)) observations<-rpois(length(habitats),2) transect<-data.frame(observations=observations,habitats=habitats) aggregate() is not suitable for my purpose because I want a result respecting...
2004 Oct 05
2
Installation Package "gregmisc" nicht möglich?!?
...ccessfully unpacked and MD5 sums checked Delete downloaded files (y/N)? n The packages are in C:\WINDOWS\TEMP\Rtmp18502\Rinstdir14176 updating HTML package descriptions Warning message: DLL attempted to change FPU control word from 8001f to 9001f Das Package ist anschließend nicht installiert...Hab das auch mit der neuen Version 2.0.0 (rw2000.exe) nicht hinbekommen, gleiche Fehlermeldung. Kann mir irgendjemand helfen? Mir würde auch eine ältere Version von R genügen (mit den Packages foreign, x-table und gregmisc). Falls jemand einen Link auf eine ältere funktionsfähige Version hat oder die D...