Displaying 20 results from an estimated 1000 matches similar to: "Generalized linear model"
2016 Apr 04
2
multiple bar plot annotation text labelling
Readers,
The attempt is to create a bar plot with text labels adjacent to each
datum value.
Data file:
1,3,A
1,8,B
1,1,C
1,9,D
2,5,C
2,4,E
2,2,F
2,0,G
testbarplot<-read.csv('data1.csv', header=FALSE)
barplot(axes=FALSE, ann=FALSE, horiz=TRUE, testbarplot[,2], ylab=
'group', xlab= '(x values)', space=c(1,0,0,0, 1,0,0,0))
text(testbarplot[,2], testbarplot[,1],
2013 Jul 02
2
Recoding variables based on reference values in data frame
I'm new to R (previously used SAS primarily) and I have a genetics data
frame consisting of genotypes for each of 300+ subjects (ID1, ID2, ID3,
...) at 3000+ genetic locations (SNP1, SNP2, SNP3...). A small subset of
the data is shown below:
SNP_ID SNP1 SNP2 SNP3 SNP4 Maj_Allele C G C A Min_Allele T A T G ID1
CC GG CT AA ID2 CC GG CC AA ID3 CC GG
nc
AA
2016 Apr 04
0
multiple bar plot annotation text labelling
Use only plain text emails. Don't attach file types that will be stripped. See the footer at the bottom of your email for more information.
Do give us the data using dput():
> dput(testbarplot)
structure(list(V1 = c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L), V2 = c(3L,
8L, 1L, 9L, 5L, 4L, 2L, 0L), V3 = structure(c(1L, 2L, 3L, 4L,
3L, 5L, 6L, 7L), .Label = c("A", "B",
2012 Feb 26
1
Matrix problem to extract animal associations
Dear List,
I have been trying to extract associations from a matrix whereby individual locations are within a certain distance threshold from one another.
I have been able to extract those individuals where there is 'no interaction' (i.e. where these individuals are not within a specified distance threshold from another individual) and give these individuals a unique Group ID containing
2007 Jun 29
1
Assign name to a name
I would like to know how I can assign a name to a name. I have a
dataset that has different years in it. I am writing scripts using R
and I would like to give a month a generic name and then use the generic
name to do different analysis. The reason for the generic name would be
so that I only have to change one thing if I wanted to change the year.
For example.
Year1 = 1999
datayear <-
2008 Dec 10
2
how to merge panel data stored by variable?
Hi,
I have two datasets stored in tab-separated format in the following way
file1:
country year1 year2
Germany var1 var1
Hungary var1 var1
file2:
country year1 year2
Germany var2 var2
Hungary var2 var2
I can easily read in these files, but how can I merge them as a panel
dataset?
Thanks,
Viktor
2010 Aug 24
2
chisq.test on samples of different lengths
Hello,
I am trying to see whether there has been a significant difference in whether people experienced damages from wildlife in two different years. I therefore have two columns:
year 1:
yes
no
no
no
yes
yes
no
year 2:
no
yes
no
yes
I wanted to do a chisq.test, but if I enter it this way:
chisq.test(year1, year2)
I get the error saying the columns are two different lengths. So then I tried
2006 Aug 24
1
Using a 'for' loop : there should be a better way in R
I need to apply a yearly inflation factor to some
wages and supply some simple sums by work category. I
have gone at it with a brute force "for" loop approach
which seems okay as it is a small dataset. It looks
a bit inelegant and given all the warnings in the
Intro to R, etc, about using loops I wondered if
anyone could suggest something a bit simpler or more
efficent?
Example:
2007 Aug 16
4
residual plots for lmer in lme4 package
Hi,
I was wondering if I might be able to ask some advice about doing residual
plots for the lmer function in the lme4 package.
Our group's aim is to find if the expression staining of a particular gene
in a sample (or "core") is related to the pathology of the core.
To do this, we used the lmer function to perform a logistic mixed model
below. I apologise in advance
2006 Dec 14
1
legend/plotmath/substitute problem
Dear R Experts,
I am trying to produce a legend for a series of plots which are
generated in a loop. The legend is supposed to look like this:
2000: gamma=1.8
where gamma is replaced by the greek letter and both the year and the
value of gamma are stored in variables.
Everything works fine as long as I have only one data series:
year = 2001
g = 1.9
plot(1)
legend('top',
2011 Apr 18
1
Comparing two lines - Ancova: lm or aov?
Hello!
I have measurements (length and volume) of fish collected in two years. I
want to know if the the relationship between length and volume is the same
for both years. The number of fish measured is different for each year. I
don't know whether lm or aov is more appropriate to use.
Here are the two output options:
Call:
lm(formula = Volume ~ Length * Year)
Residuals:
Min 1Q
2006 Dec 12
1
SPA2100 sends an unexpected BYE message when transmitting a FAX
Hi everyone,
I'm trying to send a FAX with the following configuration:
Analog FAX machine (OKI) <----->SPA21000<----->LAN<----->Asterisk<--------> PSTN
I'm restricted to use passthru mode for faxing, instead of T.38
protocol, because the Asterisk box is running v1.2 and cannot be
changed as it is in a heavy production environment. Anyway, it
"should"
2002 Nov 18
2
Boot problem: may you help me?
Hello!
I have a boot problem with ISOLinux 2.00, downloaded yesterday. The CD
works fine with every PC except on an IBM Thinkpad. If I poweron the TP and
try to boot from CD I get back a "isolinux: disk error 01, ax = 4211,8B".
Then, if I reboot (ctrl-alt-canc) your isolinux works fine.
May you help me?
--
Stefano Pettini
spettini at inwind.it
New ICQ number: 159144497
Notary of
2013 Apr 03
1
linear model coefficients by year and industry, fitted values, residuals, panel data
Hi R-helpers,
My real data is a panel (unbalanced and with gaps in years) of thousands of firms, by year and industry, and with financial information (variables X, Y, Z, for example), the number of firms by year and industry is not always equal, the number of years by industry is not always equal.
#reproducible example
firm1<-sort(rep(1:10,5),decreasing=F)
year1<-rep(2000:2004,10)
2010 Jan 30
2
drawing a line that shifts from solid to broken
I am graphing longitudinal data from three time points. I'd like to draw a
solid line from point 1 to point 2, and then a dashed line from point 2 to
point 3. It works if I do it in two steps:
> first.vector <- c(mean(year1$variable1), mean(year2$variable1))
> second.vector <- c(NA, mean(year2$variable1), mean(year3$variable1))
> plot(first.vector, type="b",
2010 Aug 20
1
Shifting of Principal amount while calculating Present Value
Dear R Helpers
I have following data -
cash_flow = c(7, 7, 107) # 107 = Principle 100 + interest of 7%
t = c(1,2,3)
and zero rate table as
rating year1 year2 year3
AAA 3.60 4.17 4.73
AA 3.65 4.22
4.78
A 3.72 4.32 4.93
BBB 4.10
2012 Jun 24
2
Defining multiple variables in a loop
Good day,
For lack of a better solution (or perhaps I am ignorant to something
more elegant), I have been bootstrapping panel data by hand so to
speak and I would like to know if there is a way to define multiple
variables in a loop using the loop variable. I found a post (here:
https://stat.ethz.ch/pipermail/r-help/2002-October/026305.html ) that
discussed naming multiple variables but it
2011 Jul 04
4
How to build a matrix of number of appearance?
I have a matrix of claims at year1 that I get simply by
claims<-read.csv(file="Claims.csv")
qq1<-claims[claims$Year=="Y1",]
I have MemberID and ProviderID for every claim in qq1 both are integers
An example for the type of questions that I want to answer is
how many times ProviderID number 345 appears together with MemberID 23 in
the table qq1
In order to answer
2012 Apr 14
3
Choose between duplicated rows
Dear r experts,
Sorry for this basic question, but I can't seem to find a solution?
I have this data frame:
df <- data.frame(id = c("id1", "id1", "id1", "id2", "id2", "id2"), A =
c(11905, 11907, 11907, 11829, 11829, 11829), v1 = c(NA, 3, NA,1,2,NA), v2 =
c(NA,2,NA, 2, NA,NA), v3 = c(NA,1,NA,1,NA,NA), v4 = c("N",
2008 Jul 09
2
Parsing
Dear R users,
I have a big text file formatted like this:
x x_string
y y_string
id1 id1_string
id2 id2_string
z z_string
w w_string
stuff stuff stuff
stuff stuff stuff
stuff stuff stuff
//
x x_string1
y y_string1
z z_string1
w w_string1
stuff stuff stuff
stuff stuff stuff
stuff stuff stuff
//
x x_string2
y y_string2
id1