Displaying 20 results from an estimated 1000 matches similar to: "function by"
2005 Nov 01
1
function effect and standard error
Hi list!
I did the following regression:
reg1 <- glm(alti~sp + ovent + vivent + nuage, family=gaussian, data=meteo1)
I was interested in knowing the effect of the species (sp) in reg1 and so I used the function «effect»:
effect.sp <- effect ("sp", reg1, se=TRUE)
with this output:
sp
AK BW NH OS RT SS
2.730101 2.885363 2.753774 2.750311
2006 May 24
2
changing font size in plot(effect())
I can't seem to be able to change the font size in an effect display. I've
tried the following:
> par(cex.lab=4)
> plot(effect ("alti",reg8), ylab="detection probability")
and
> plot(effect ("alti",reg8), ylab="detection probability", cex=4)
but nothing changes. Can anyone help me?
thanks.
Emilie Berthiaume
graduate student
2006 Mar 01
3
How to do a "proc summary" in R?
Hi,
I'm a SAS user trying to convert myself to R but I still have problems with some pretty simple commands.
First I wanted to add up a number of red-tailed hawks seen per day (julian day) per year. So I tried:
RTyrday <- tapply(RThr,list(year,julian),sum)
And then I tried the following regression:
mod1 <- glm(RTyrday~julian+year, family=gaussian (link=identity),data=RT)
Wich
2006 Mar 14
1
Ordered logistic regression in R vs in SAS
I tried the following ordered logistic regression in R:
mod1 <- polr(altitude~sp + wind_dir + wind_speed + hr, data=altioot)
But when I asked The summary of my regression I got the folloing error message:
> summary (mod1)
Re-fitting to get Hessian
Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) :
the initial value of 'vmin' is not
2003 Oct 31
4
dnorm() lead to a probability >1
Howdee,
One of my student spotted something I can't explain: a probability >1 vs a
normal probability density function.
> dnorm(x=1, mean=1, sd=0.4)
[1] 0.9973557
> dnorm(x=1, mean=1, sd=0.39)
[1] 1.022929
> dnorm(x=1, mean=1, sd=0.3)
[1] 1.329808
> dnorm(x=1, mean=1, sd=0.1)
[1] 3.989423
> dnorm(x=1, mean=1, sd=0.01)
[1] 39.89423
> dnorm(x=1, mean=1, sd=0.001)
[1]
2008 Feb 18
2
skip non-converging nls() in a list
Howdee,
My question appears at #6 below:
1. I want to model the growth of each of a large number of individuals using
a 4-parameter logistic growth curve.
2. nlme does not converge with the random structure that I want to use.
3. nlsList does not converge for some individuals.
4. I decided to go around nlsList using:
t(sapply(split(data, list(data$id)),
function(subd){coef(nls(mass ~
2005 Mar 02
1
Applying a function to all combinations of factors
Is there a way to apply a function, say cor(), to each combination of some
number of variables, and this, without using loops?
For example, I have day, hour, var1 and var2. How could I compute
cor(var1,var2) for each day*hour combination and obtain a matrix with day,
hour and the cor value for each combination?
Thanks for your time,
Marc
===================
Marc Bélisle
Professeur adjoint
2008 Feb 15
2
lmList, tapply() and lm()
Howdee,
*** I know that the lmList() function exists, yet I don't want to use it.
***
Would anyone be kind enough to tell how I can apply the function lm() to
each level of a given factor so to obtain the intercept and slope for each
factor level within a matrix?
For instance, suppose a dataframe containing 3 variables: id, x and y.
I want to compute the function lm() for each level
2008 Feb 19
0
nlsList - Error in !unlist(lapply(coefs, is.null))
Howdee,
I am able to fit a 4-parameter logistic growth curve to a dataset which
comprise many individuals (using R v. 2.3.1). Yet, if I want to obtain the
parameters for each individual (i.e., for each 'id') using nlsList, then I
obtain an Error message which I have trouble interpreting. Any advice as to
how I can solve this problem?
Thanks for your time,
Marc
> reg <-nls(mass ~
2009 Jun 05
3
from 3 numeric variables to a string
Hi there,
I have 3 numeric variables: day (e.g., 05), month (e.g., 06), year (e.g.,
2009).
I would like to create a (string) variable of the following form:
month/day/year (e.g., 06/05/2009).
I would be grateful to anyone who could point me toward a solution.
Sincerely,
Marc
===================
Marc B?lisle
Professeur agr?g?
Chaire de recherche du Canada en ?cologie spatiale et en ?cologie
2013 Feb 28
2
Ploting different values with different colors
Hello I am trying to plot a 20 x 20 grid of points with the colors of each
point refering to percent cover of that specific point
So basically the point are all the same size and their position on the
graph is base on their coordinates (x,y). I want the color (a grey scale
from white=0 to black =100) to represent the values of each of these point
(cover)
Here is what my data looks like
2008 Jan 29
0
number of rescaling cycles in decorana
How do one dertermine the optimal number of rescaling cycles to use when
performing DCA using the decorana function (library vegan)?
Thanks for your time,
Marc
===================
Marc Bélisle
Professeur adjoint
Chaire de recherche du Canada en écologie spatiale et en écologie du paysage
Département de biologie
Université de Sherbrooke
2500 Boul. de l'Université
Sherbrooke, Québec
J1K 2R1
1999 Nov 17
3
Plot problem !
Hello,
Is there a simple way to make a plot with xy coordinates and a z value
which determines the size and the color of point on the plot?
Thanks for your help !
Emilie
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
1999 Nov 08
2
range
I'm just beginning with R, and i've got a little problem, I would like
to have my own xrange and yrange on the graph when I plot a matrix, and
not the one R creates automatically.
Thank you for your help
Emilie Levivier (from Jussieu Paris)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2006 Apr 07
1
Patch for water plugin to make time between rain-drops adjustable
Hello,
I love the work that is being done with compiz! I have made a patch for
water.c that makes the time between rain-drops adjustable using gconf.
This way you can leave the plug-in running and just have pleasant drops
every now and then instead of the rainstorm that is hard-coded in now
(which is still fun now and then!).
The gconf value is in ms (1/1000 of a second). Suggestions for
2012 Dec 15
2
troubles reading a text file
Dear R experts,
For quite some time I have been trying to solve a mistery of reading a seemingly trouble-free text file. The data is temperature reconstruction arranged as a huge grid, preceded by seven "header lines" (which you see better if file is opened in Firefox or Chrome).
This is the data (gridded temperature reconstruction)
2005 Sep 08
0
Effect of data set size on calculation
Dear listers,
I have a piece of code which performs an ANOVA type of analysis on 2D GC
data. The code is shown below:
# ANOVA 2D GC analysis
# maxc <- number of samples
# nreps <- number of samples
maxc <- 2
nreps <- 4
sscl <- NULL
cmean <- NULL
#
# Initial stat. variable
#
dftot <- nrow(mat)-1
dfcl <- maxc - 1
dferr <- dftot - dfcl
totmean
2011 Feb 21
0
r-square for cluster
Dear forumities,
It's seem that there is no straight forward way to calculate R2 of a cluster solution in R. So, I would like to know if I'm right when calculating a R2-like statistic for a given clustering solution. In fact, I have different cluster solution for a given set of data. I would like to know which cluster solution gives the highest R2. My data (5 variables) are scaled to a 0
2009 Mar 12
3
avoiding termination of nls given convergence failure
Hello. I have a script in which I repeatedly fit a nonlinear regression to
a series of data sets using nls and the port algorithm from within a loop.
The general structure of the loop is:
for(i in 1:n){
… extract relevant vectors of dependent and independent variables …
… estimate starting values for Amax and Q.LCP…
2011 Feb 27
1
two-way unbalanced ANOVA
Hello Everyone,
*Question: *How do you calculate the sum of squares for a two-way
_unbalanced_ ANOVA?
*What I have done:*
I have found many useful tutorials online for running a balanced two-way
ANOVA but I haven't had much luck for running a unbalanced two-way
ANOVA. From what I have read, the trouble with running an unbalanced
two-way ANOVA, is that things get tricky when calculating