similar to: Using a variable in the formula

Displaying 20 results from an estimated 700 matches similar to: "Using a variable in the formula"

2010 Feb 05
2
glm models with more than one response
Hi everyone, I am trying to construct a glm and am running into a couple of questions. The data set I am using consists of 6 categories for the response and 6 independent predictors representing nutrient concentrations at sample point locations. Ultimately I'd like to use the probabilities for each response category in a simulation model such that these probabilities are used to define a
2003 Nov 04
1
glm offset and interaction bugs (PR#4941)
Full_Name: Charles J. Geyer Version: 1.8.0 OS: i686-pc-linux-gnu (Suse 8.2) Submission from: (NULL) (134.84.86.22) Two bugs (perhaps related, perhaps independent) revealed by the same Poisson regression with offset mydata <- read.table(url("http://www.stat.umn.edu/geyer/5931/mle/seeds.txt")) out.fubar <- glm(seedlings ~ burn01 + vegtype * burn02 + offset(log(totalseeds)),
2010 Apr 08
1
RandomForest how to identify two classes when only one is present
I'm trying to do: randomForest(f, data = moths.train) But I get this error: Error in randomForest.default(m, y, ...) : Need at least two classes to do classification. When I look at the data for this, I realize there are no positive cases of this item: [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [38] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2005 Sep 19
4
factor as seq() in for loop
Dear all, I would like to use the values in vegaggr.BLMCMR02$colony str(vegaggr.BLMCMR02) `data.frame': 1678 obs. of 3 variables: $ vegtype : Factor w/ 27 levels "2010","2020",..: 3 4 5 19 4 5 19 5 $ colony : Factor w/ 406 levels "0","1","10","100",..: 1 1 1 1 2 2 2 $ Totvegproparea: num 0.00055 0.03956 0.95705
2006 Oct 15
1
gamma distribution don't allow negative value in GLMs?
Dear friends, when i use glm() to fit my data, i use glm(formula = snail ~ vegtype + mhveg + humidity + elevation + soiltem, *family = Gamma(link = inverse),* data =a,)) It shows: error in eval(expr, envir, enclos) : *gamma distribution don't allow negative value*. But i use result<-glm(formula = snail ~ vegtype + mhveg + humidity + elevation + soiltem, family = poisson, data =a) #this
2002 Sep 13
2
Multiple random effects inlme?
Moi! I was helping to teach a course on mixed models this week, and we came across a problem with coding more than one random effect in lme when they aren't nested. As an example, suppose we have an experiment where we sample moths from several populations, and place the moths on different trees, and measure a trait (in this case survival of offspring, but that's less important). We
2013 Jun 07
0
error running mvabund package
Dear All, This is my first post, and probably (and hence apologies that) my question is very silly! I'm having issues with a the mvabund package (http://cran.r-project.org/web/packages/mvabund/index.html), and would be great to get some help! Here is the code (and files are attached): library(mvabund) ##visualizing data florabund <- read.csv("CPL_floristics_abund_v1d.csv",
2012 Jul 20
4
TukeyHSD not working
Dear r-help members. I would like to compare species numbers of moths between eight different forests (each sampled for six nights). I would like to do a nested anova to compare species numbers between forests and nights. For more site specific details I wanted to do a Tukey test (TukeyHSD). Unfortunately this test is not working (message: "nicht anwendbare Methode f?r 'TukeyHSD' auf
2010 Feb 10
0
mlogit: Error reported using sample dataset
I've been working on a multinomial logit model, trying to predict vegetation types as a function of total phosphorus. Previous responses to my postings have pointed me to the mlogit package. I'm now trying to work examples and my data using this package. data("Fishing", package = "mlogit") Fish <- mlogit.data(Fishing, varying = c(4:11), shape = "wide",
2010 Jun 09
0
Plotting Question
Hello, I would like to produce a series of graphs comparing the probability distributions for 8 factors against a continuous metric. The kind of graph I'm hoping to produce would look like the density comparison graphs (library sm) using the function sm.density.compare. However, instead of calculating the density distributions for comparisons, I'd like this comparison to be based on
2007 Jun 20
1
I want to maintain: libvirt and virt-manager
Yeah, I`m using libvirt and virt-manager for moths and i want to help debian to have it. How i can submit the packages? How i can join at XEN-PACKAGE-TEAM? Regards, Grabber.
2005 Aug 16
4
as.character and a formula
Dear list, given this formula: > fmla <- formula(y1 ~ spp1 + spp2 + spp3 + spp5) > fmla[[3]] spp1 + spp2 + spp3 + spp5 is this the intended behaviour of as.character: > as.character(fmla[[3]]) [1] "+" "spp1 + spp2 + spp3" "spp5" ? Where does the extra "+" come from? > as.character(fmla) [1] "~"
2005 Jul 01
1
scope argument in step function
Thanks a lot for help in advance. I am switching from matlab to R and I guess I need some time to get rolling. I was wondering why this code : > fit.0 <- lm( Response ~ 1, data = ds3) > step(fit.0,scope=list(upper=~.,lower=~1),data=ds3) Start: AIC= -32.66 Response ~ 1 Call: lm(formula = Response ~ 1, data = ds3) Coefficients: (Intercept) 1.301 is not working
2012 Feb 28
2
update.formula has 512 char buffer?
Hello, I am trying to "paste" together a formula to use in the mob function of party. This means the formula will be of the form y ~ x1+ ...+xM | z1+..zN. I am doing some preliminary fits of y ~ x1+ ...+xM, then want to add the conditional part of the equation using update(). Here's the test code: var1 <- 1:78 x1 <- paste("x", var1, sep="") f1 <-
2002 Jul 02
0
error in plot residuals in a glm with iterations.
Hi, I make this model: > moths.m6 <- glm(nind~metros+especie+habitat+metros:habitat+habitat:especie,family=poisson) > anova(moths.m6,test="F") Analysis of Deviance Table Model: poisson, link: log Response: nind Terms added sequentially (first to last) Df Deviance Resid. Df Resid. Dev F Pr(>F) NULL 81 488.32
2003 Oct 02
4
using a string as the formula in rlm
Hi, I am trying to build a series of rlm models. I have my data frame and the models will be built using various coulmns of the data frame. Thus a series of models would be m1 <- rlm(V1 ~ V2 + V3 + V4, data) m2 <- rlm(V1 ~ V2 + V5 + V7, data) m3 <- rlm(V1 ~ V2 + V8 + V9, data) I would like to automate this. Is it possible to use a string in place of the formula? I tried doing: fmla
2019 Sep 05
2
ARM vectorized fp16 support
Hi, I'm trying to compile half precision program for ARM, while it seems LLVM fails to automatically generate fused-multiply-add instructions for c += a * b. I'm wondering whether I did something wrong, if not, is it a missing feature that will be supported later? (I know there're fp16 FMLA intrinsics though) Test programs and outputs, $ clang -O3 -march=armv8.2-a+fp16fml
2012 Jan 25
4
formula error inside function
I want use survfit() and basehaz() inside a function, but it doesn't work. Could you take a look at this problem. Thanks for your help. Following is my codes: library(survival) n <- 50 # total sample size nclust <- 5 # number of clusters clusters <- rep(1:nclust,each=n/nclust) beta0 <- c(1,2) set.seed(13) #generate phmm data set Z <- cbind(Z1=sample(0:1,n,replace=TRUE),
2005 Apr 28
1
domain master list - cross subnet?
samba-3.0.10-1.4E on RHEL4-AS. I've got a test domain setup and working just fine. Windows XP clients are authenticating just fine. The only problem I have so far is my domain browser list is not correct. I can see everything in my subnet fine, but can't see anything outside my subnet. This is different than my NT4 domain, who's browse list shows me every domain within the larger
2007 May 01
0
[Fwd: Re: [R-downunder] Beware unclass(factor)] (PR#9641)
It really is unclear what is claimed to be a bug here. But see https://stat.ethz.ch/pipermail/r-devel/2007-May/045592.html for why the bug is not in R: your old and new data do not match. Your fit is to a category. [The problem with the web interface to R-bugs was reported last week: it is being worked on.] On Mon, 30 Apr 2007, r.darnell at uq.edu.au wrote: > This is a multi-part