Displaying 20 results from an estimated 600 matches similar to: "Fw: nested linear model; with common intercept"
2006 Oct 04
1
nested design; intercept
Dear R-help,
I am sorry if this is more of a stats question than an R-question, but I have found it difficult to get a clear answer by other means.
Q. Would it be "wrong" to specify a nested model and retain a common intercept, e.g.
lm(NH4 ~ Site/TideCode + 1)
I am aware (?) that my Site-coefficients are now calculated relative to my reference Site (treatment.contrasts), *but* that
2012 Oct 26
4
Merge matrices with different column names
A general question that I have been pursuing for some time but have set
aside. When finishing some analysis, I can have multiple matrices that
have specific column names. Ideally, I would like to combine these
separate matrices for a final output as a csv file.
A generic example:
Matrix 1
var1A var1B var1C
x x x
x x
2006 Dec 16
2
how to adjust link function in logistic regression to predict the proportion of correct responses in 2AFC task?
I have would like to use logistic regression to analyze the
percentage of correct responses in a 2 alternative forced
choice task. The question is whether one needs to take into
account the fact expected probabilities for the percentage of
correct responses ranges between 0.5 and 1 in this case and
how to adjust the link function accordingly in R (see details below).
Gabriel
Subjects were asked
2009 Apr 20
7
Fitting linear models
I am not sure if this is an R-users question, but since most of you here
are statisticians, I decided to give it a shot.
I am using the lm() function in R to fit a dependent variable to a set
of 3 to 5 independent variables. For this, I used the following
commands:
>model1<-lm(function=PBW~SO4+NO3+NH4)
Coefficients:
(Intercept) SO4 NO3 NH4
0.01323 0.01968
2009 Jul 25
1
yaxp problem for more irregular time series in one plot
Good day,
I'm trying to get more time series in one plot. As there are bigger
differences in values of variables I need logaritmic y axis.
The code I use is the following:
nvz_3_data <- read.csv('/home/tomas/R_outputs/nvz_3.csv')
date <- (nvz_3_data$date)
NO3 <- (nvz_3_data$NO3)
NH4 <- (nvz_3_data$NH4)
date_p <- as.POSIXct(date, "CET")
par(mfrow=c(2,1), ylog
2009 Sep 11
1
format (?) problems with data imported from postgres
Good day,
I read some data from a PostgreSQL database by a following script:
library(Rdbi)
library(RdbiPgSQL)
# conn becomes an object which contains the DB connection:
conn <- dbConnect(PgSQL(), host="localhost", dbname="BVS",
user="postgres", password = "*******")
query_duj_kal <- dbSendQuery(conn, "select zdroj as well, cas as date,
fe2,
2009 Sep 13
2
zoo plot: yearly marks on X-Axis
On Sun, 2009-07-26 at 13:17 +0200, Poersching wrote:
> stvienna wiener schrieb:
> > Hi all,
> >
> > I am plotting a financial time series, but I need a more detailed X-Axis.
> >
> > Example:
> > x <- zoo(rnorm(1:6000), as.Date("1992-11-11")+c(1:6000))
> > plot(x)
> >
> > The X-Axis is labeled "1995", "2000"
2007 Jan 09
1
contingency table analysis; generalized linear model
Dear List,
I would appreciate help on the following matter:
I am aware that higher dimensional contingency tables can be analysed using either log-linear models or as a poisson regression using a generalized linear model:
log-linear:
loglm(~Age+Site, data=xtabs(~Age+Site, data=SSites.Rev, drop.unused.levels=T))
GLM:
glm.table <- as.data.frame(xtabs(~Age+Site, data=SSites.Rev,
2006 Oct 06
1
sparklines in lattice
Dear R-help,
Has anyone implemented sparklines in the strips of a lattice plot? What I have in mind is, say, highlighting that part of a time series that one is examining in more detail in a set of lattice plots.
Regads,.
Mark Difford.
PS: (Andreas Loffler has implemented a simple but functional version for
TeX/LaTeX:
http://www.tug.org/tex-archive/help/Catalogue/entries/sparklines.html)
2006 Dec 20
2
RuleFit & quantreg: partial dependence plots; showing an effect
Dear List,
I would greatly appreciate help on the following matter:
The RuleFit program of Professor Friedman uses partial dependence plots
to explore the effect of an explanatory variable on the response
variable, after accounting for the average effects of the other
variables. The plot method [plot(summary(rq(y ~ x1 + x2,
t=seq(.1,.9,.05))))] of Professor Koenker's quantreg program
2007 Sep 25
0
Multiple comparisons; rank-based anova
Dear List-Members,
Is the application of multiple comparison procedures (using the multcomp
package) to the output from a rank-based ANOVA straightforward, or do I need
to take heed ?
That is, is it as simple as:
glht( aov(rank(NH4) ~ Site, data=mydat), linfct=mcp(Site="Tukey") )
Thanks in advance for your help.
Regards,
Mark Difford.
--
View this message in context:
2008 Sep 01
3
how to read multiple lines per case
How can I read a space-delimited file, where the data values for each case
are folded before column 80, and so appear on two lines for each case?
The first few cases look like this
loc type bio H2S sal Eh7 pH buf P K Ca Mg Na Mn Zn Cu NH4
OI DVEG 676 -610 33 -290 5.00 2.34 20.238 1441.67 2150.00 5169.05 35184.5
14.2857 16.4524 5.02381 59.524
OI DVEG 516 -570 35 -268 4.75 2.66 15.591 1299.19
2011 Aug 04
2
Graphical option to update.packages in development version (build of the 2011-07-31 r56569) for Windows not working properly
Dear R-core/development-team,
The problem noted in the subject-line has been a problem in the last three
development versions of R for Windows that I have downloaded and tested, the
most recent of them being a version I downloaded this morning.
Update.packages() using the graphical option, i.e. called as
update.packages(ask='graphics', checkBuilt=TRUE)
does not work as it should, but
2011 Oct 09
1
sapply(pred,cor,y=resp)
Hello. I am wondering why I am getting NA for all in cors=sapply(pred,cor,y=resp). I suppose that each column in pred has NAs in them. Is there some way to fix this? Thanks
> str(pred)
'data.frame': 200 obs. of 13 variables:
$ mnO2: num 9.8 8 11.4 4.8 9 13.1 10.3 10.6 3.4 9.9 ...
$ Cl : num 60.8 57.8 40 77.4 55.4 ...
$ NO3 : num 6.24 1.29 5.33 2.3 10.42 ...
$ NH4 : num 578
2013 Jun 12
2
grDevices::convertColor XYZ space is it really xyY?
grDevices::convertColor has arguments 'from' and 'to' which can take on value 'XYZ'. Can someone confirm that 'XYZ' is the same as the CIE chromaticity coordinates that are also sometimes refered to as 'xyY' in the literature? Or are these the CIE tristimulus values? It looks to me like the first case is true, but I would appreciate hearing from one of
2011 Nov 29
5
Why Numeric Values Become Factors in Data Frame
I have a data frame with 1 factor, one date, and 37 numeric values:
str(waterchem)
'data.frame': 3525 obs. of 39 variables:
site : Factor w/ 64 levels "D-1","D-2","D-3",..: 1 1 1 1 1 ...
$ sampdate : Date, format: "2007-12-12" "2008-03-15" ...
$ CO3 : num 1 1 6.7 1 1 1 1 1 1 1 ...
$ HCO3 : num 231 228 118 246
2013 Oct 21
3
speeding up "sum of squared differences" calculation
All,
I am using a sum of squared differences in the objective function of an optimization problem I am doing and I have managed to speed it up using the outer function versus the nested for loops, but my suspicion is that the calculation could be done even quicker. Please see the code below for a simple example. If anyone can point out a faster way I would appreciate it greatly.
Thanks,
Roger
2011 May 25
1
Multinomial Logistical Model
On May 24, 2011; 11:06pm Belle wrote:
> Does anyone know how to run Multinomial logistical Model in R in order to
> get predicted probability?
Yes. I could stop there but you shouldn't. The author of the package
provides plenty of examples (and two good vignettes) showing you how to do
this. Suggest you do some work in that area. Look especially at how model
formulas are
2011 Nov 13
0
Has anyone used SIAR package add on?
On Nov 12, 2011 at 8:29pm Alex wrote:
> Has anyone used SIAR package add on?
I posted a reply to an earlier question from you on this subject. See
http://r.789695.n4.nabble.com/Errors-in-SIAR-td4029804.html. In it I note
that there are problems with the function from siar (not SIAR) you are
using, but that this may not be "your" problem, that the function calls for
matrices (you
2005 Dec 08
2
'mean' and 'sd' calculations do not match
Dear list,
I am using R 2.1.1 on a Fedora 3 Linux, 32 bit PC.
If I compute the aggregated mean and the standard deviation I get
standard deviation values for factors where the mean was not computed.
It seems to me that this is somehow related to the NA values. But I
don't quite understand what is going wrong?
Could it be related to the data import already? Some of the imported
data got the