search for: occ

Displaying 20 results from an estimated 54 matches for "occ".

Did you mean: cc
2004 Sep 26
2
help for stata user
Hi, I'm new to R, and I'm STATA user before, could you help me where I can get document about comparison command between STATA and R. Thank you very much, Best regards, -iip-
2012 Jul 17
2
Problem creation tensor
...id user 3 2 ? 3 2 id user 4 ? ? ? 4 ... So user 1 don't like item 1 but he likes so much item 4, for item 2 and 3 he hasn't expressed a rating, etc. I need to construct a tensor with n users, m items and 21 occupations. After I have construct the tensor I want apply Parafac. I read data from a CSV file and build each matrix for each occupation. Didier Leibovici (author of PTAk package) suggested to me: ok that's bit clearer you have 21 matrices ( 1 for each occupations) of users rating their prefere...
2013 Jan 04
3
help "reshaping" dataframe
List, I want to reshape my data, but I'm not sure how to do it... it might be a simple task, but don't know which package does this. "occ.data" (see below) is how my original data are arranged, and I know that with melt() I can reshape it like "y" (see below). However, I just want to build a matrix like the "y" matrix, but with only 2 dimensions. Something like this: year Site specie Pres Rep1...
2003 Nov 23
4
remove 0 rows from a data frame
Dear all, As part of a larger function, I am randomly removing rows from a data frame. The number of removed rows is determmined by a Poisson distribution with a low mean. Sometimes, the random number is 0, and that's when the problem starts: My data frame: > temp occ x y dbh age 801 0 2977.196 3090.225 6 36.0 802 0 2951.892 3083.769 8 40.6 803 0 2919.111 3075.557 8 40.6 804 0 2914.123 3072.700 9 42.9 805 0 2925.353 3074.675 8 40.6 How many rows (nft) shall be removed? > nft<- rpois(1, 2) > nft [1] 2 Ok remove 2 rows...
2012 May 03
1
Help with getting values from string
...have a doubt. I used macros and i try to pass a value to a macro by concatenating a bunch of strings. But it does not seem to work. Please help. I have written down my code and the error message please tell me how to pass the value that a string points to. Thanks in advance #macro defined machist_occ_kgfs<-defmacro(a,qnu_occ,b,qnl_occ,expr={with(subset(an_ind_data_fin,income_source==a & region_id==b & normalised_income>qnl_occ & normalised_income<qnu_occ),hist(normalised_income,main=paste(a,b,sep=" ")))}) #macro called machist_occ_kgfs(occ,paste("qnu",ri...
2011 Mar 24
2
Questions for "domist... subscript out of bounds"
...i all, I am a new user for R. I faced a questions about subscript out of bounds. Although I checked some other helps before I sent this email, I still don't know how to deal with this problems. I want to use "domain" function to run species distribution model in R. I used "sp.occ.do<-domain(env.pre, pred_train, factors=c('continent')) & sp.occ.pre.pro<-predict(env.pre, sp.occ.do)" to predict species distribution. BUT, I got  "Error in domdist(object, ln[j], vals[, ln[j]]) : subscript out of bounds" and could not run the domain model. How...
2007 Aug 01
1
Problem to remove loops in a routine
...rs. ############################################### library(lattice) rm(list=ls(all=TRUE)) # Generate a dummy dataset with # - 20 individuals (ID) # - individuals 1 to 10 belong to group (GRP) 1, 11 to 20 belong to group 2 # - measurements (DV) done at 10 time points (TIME) per individuals on 2 occassions (OCC) # - modelisation of the DV versus TIME relationships with 4 different models (MODEL) # - predicted values (Y) # - the PLOT column serves as a flag to plot together the models (A and B) and (C and D) PLOT<-rep(1:2,each=40,times=20) ID<-rep(1:20,each=80) OCC<-rep(1:2,each=10,...
2003 Jan 29
3
multinomial conditional logit models
...ut I can't figure out how to let R substitute the value of "catvar" in that expression. "eval(dep)" doesn't work as it does for the lefthand side but how should it be done? My solution for now is to do it afterward. My program continues as follows: pc<-mclgen(logan,occ) pc$occ<-factor(pc$newy) library(survival) cl.lr<-clogit(depvar~occ+occ:educ+occ:black+strata(id),data=pc) summary(cl.lr) The dataset "logan" is available from the website. "occ" is the dependent variable, "educ" and "black" are independents. Once &quo...
2004 Apr 28
1
simple repeated measures model: dumb user baffled!
...ition that can be N or E: four orders used: NEEN, NENE, ENEN, ENNE, ten students in each block. I've inherited the data (in SPSS but I can deal with that!) with variables like: ID GENDER ORDER C1 C2 C3 C4 RESP1 RESP2 RESP3 RESP4 ... ORDER is the order as a/b/c/d; C1:C4 has the N or E for each occasion, and RESP1:RESP4 the response variables. (There are a number of these but looking at each separately is justifiable theoretically). I've had a look around the R help and some S+ books I've got and I realise I'm seriously out of my depth and my repeated measures ANOVA knowledge is...
2003 Oct 28
1
error message in simulation
...inom(nsims,1,0.5) b<-rnorm(nsims,0,1)*10 rn<-rnorm(nsims,0,1)*10 a<-b*r+rn*(1-r^2)^0.5 a<-round(a)+50 a<-a-g*5 b<-round(b)+50 abs.2<-function(x) ifelse(x<1,1,x) b<-abs.2(b) c<-b-a p<-c/b lm1<-lm(a~g) lm2<-lm(c~g) lm3<-lm(p~g) lm4<-lm(a~b+g) gr<-c(g,g) occasion<-rep(0:1,c(nsims,nsims)) occ<-occasion-0.5 ppd<-c(b,a) h<-rep(0,nsims) mb<-mean(b) bppd<-b-mb bappd<-c(h,bppd) occgr<-occ*gr subject<-c(1:nsims) sub<-c(subject,subject) library(nlme) lm5<-lme(ppd~occ+gr+occgr,random=~1|sub) lm5f<-fixed.effects(lm5) lm5c<-...
2011 Apr 08
5
duplicates() function
I need a function which is similar to duplicated(), but instead of returning TRUE/FALSE, returns indices of which element was duplicated. That is, > x <- c(9,7,9,3,7) > duplicated(x) [1] FALSE FALSE TRUE FALSE TRUE > duplicates(x) [1] NA NA 1 NA 2 (so that I know that element 3 is a duplicate of element 1, and element 5 is a duplicate of element 2, whereas the others were
2006 Jan 23
1
nlme in R v.2.2.1 and S-Plus v. 7.0
...whether one program is more suited than the other to pursue my modeling. Below I included the input + output code, first for S-Plus, than for R. Many thanks and best regards, Paolo Ghisletta ############ #S-Plus #min=4, max=41 > logistic4.a <- nlme(jugs ~ 4 + 41 / (1 + xmid*exp( -scal*I(occ-1) + u)), fixed=scal+xmid~1, random= u~1 |id, start=c(scal=.2, xmid=155), data=jug, na.action=na.exclude, method="ML") > summary(logistic4.a) Nonlinear mixed-effects model fit by maximum likelihood Model: jugs ~ 4 + 41/(1 + xmid * exp( - scal * I(occ - 1) + u)) Data: jug A...
2004 Jan 28
1
Large data sets and memory management in R.
...gveh + champion + cie + dossiera + faq13c + faq5a + kmaff + kmprom + nbvt + rabprof + sexeprin + newage, family = tweedie(var.power = 1.577, link.power = 0), etastart = log(rep(mean(qc.b3.sans.occ[, 'pp20B3']), nrow(qc.b3.sans.occ))), weights = unsb3t1, trace = T, data = qc.b3.sans.occ) After one iteration (45+ minutes) R is trashing through over 10Gb of memory. Thanks for any insights, G?rald J...
2012 Nov 21
1
Listing elements of a 4D array
Dear list, I'm having trouble to see how my elements on a 4 dimensional array are listed. For example, I generated the following array: junk.melt=melt(occ.data,id.var=c("Especie", "Site", "Rep", "Año"), measure.var="Pres") y=cast(junk.melt, Site ~ Rep ~ Especie ~ Año) Now, I want to be able to look at how my species (Especie) are listed, in which order. I found that they are not listed in alphabeti...
2013 Jan 16
4
Changing frequency values to 1 and 0
...data set, where I grouped several species in one group (guild). Then I reshaped my data as shown below. Now, I just want to have "Rep" only as 1 or 0. I'm not being able to change the values of rep>=1 to 1... tried many things and I'm not being successful! > melting=melt(occ.data,id.var=c("guild", "Site", "Rep", "Año"), measure.var="Pres") > y=cast(melting, Site ~ Rep ~ guild ~ Año) Aggregation requires fun.aggregate: length used as default > y[1:10,,"gui4a",1:2] , , Año = 2003 Rep Site 1 2 3 4...
2007 May 18
0
gls() error
Hi All How can I fit a repeated measures analysis using gls? I want to start with a unstructured correlation structure, as if the the measures at the occations are not longitudinal (no AR) but plainly multivariate (corSymm). My data (ignore the prox_pup and gender, occ means occasion): > head(dta,12) teacher occ prox_self prox_pup gender 1 1 0 0.76 0.41 1 2 1 1 1.00 1.05 1 3 1 3 0...
2013 May 18
1
glmer.nb: function not in downloaded lme4 package?
...er loading the package and calling: library(lme4) help(glmer.nb) # I receive the following message: No documentation for ‘glmer.nb’ in specified packages and libraries: you could try ‘??glmer.nb’ # I called the glmer() function successfully, i.e. glmer(CNos ~ Year+Month+(1|Vessel), data=Occ.cr, family=poisson, offset=Occ.cr$logtrapd) # but when I tried this: glmer.nb(CNos ~ Year+Month+(1|Vessel), data=Occ.cr, offset=Occ.cr$logtrapd) # I got the error message: Error: could not find function "glmer.nb" # Can you please provide advice on how I might use glmer.nb...
2003 Oct 20
4
warning from return() in 1.8 but not in 1.7.0 (PR#4687)
To whom it may concern, I get the following message when I run my function: Warning message: multi-argument returns are deprecated in: return(call.fn, repl, time, from, to, last.year, occup.m, ant.occ.m, > version platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor 8.0 year 2003 month 10 day 08 language R...
2010 Sep 10
3
(no subject)
Hello, I'm trying to do bar plot where 'sex' will be the category axis and 'occupation' will represent the bars and the clusters will represent the mean 'income'. sex occupation income 1 female j 12 2 male b 34 3 male j 22 4 female j 54 5 male b...
2004 Dec 14
1
openvpn/shorewall tunnel problem
...216.12.22.89 216.12.22.64/26 dev ipsec0 proto kernel scope link src 216.12.22.89 192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.254 192.168.10.0/24 via 10.1.10.2 dev tun0 default via 216.12.22.65 dev eth0 and the tunnel conf on homefw (to the office fw) is dev tun disable-occ port 50001 local 216.x.y.z < ... public IP anonymized...> # Our remote peer (office subnet) remote 137.p.q.r < ... public IP anonymized...> ifconfig 10.1.10.1 10.1.10.2 route 192.168.10.0 255.255.255.0 # Our pre-shared static key secret static.key The officefw conf is similar, exc...