similar to: Elasticity in Leslie Matrix

Displaying 20 results from an estimated 700 matches similar to: "Elasticity in Leslie Matrix"

2010 Feb 12
1
popbio and stochastic lambda calculation
Hello R users, I am trying to calculate the stochastic lambda for a published matrix population model using the popbio package. Unfortunately, I have been unable to match the published results. Can anyone tell me whether this is due to slightly different methods being used, or have I gone wrong somewhere in my code? Could the answer be as simple as comparing deterministic lambdas to
2008 Jan 14
1
stochastic growth rate (package biopop)
Dear all, I am running matrix population models using package "popbio". In a deterministic model {i.e., transition matrix is defined as A <- matrix(c(0.70, 0.70,0.35,0.50), nrow=2,byrow=TRUE}, population growth rate can be estimated from the dominant eigenvalue {command "eigen.analysis"}. However, I cannot figure out the way to compute the asymptotic stochastic population
2006 Mar 06
3
how to make plotmath expression work together with paste
Recent questions about using plotmath have renewed my interest in this question I want to have expressions take values of variables from the environment. I am able to use expressions, and I am able to use paste to put text and values of variables into plots. But the two things just won't work together. Here is some example code that shows what I mean. plot(NA,xlim=c(0,100),ylim=c(0,100))
2007 Sep 28
0
Elasticity
Hello, I'm starting with data analysis with R, and I'd like to know if there is in any package a function to have price elasticity of an item. For example I have information about sale quantity and price, and I want to know if the series is sensitive to the price. Sale Quantity Price 34 4$ 23 4$ 46 5$ 21
2011 Jan 26
0
using popbio, reduce number of digits in image2 plot
Hello All. I am using the image2 plot function in the popbio package to create 6 elasticity analyses. I am trying to reduce the number of significant digits that displays -- from 3 digits to 2. I tried rounding my original matrices, but one is comprised primarily of zeros, and the cut / breaks options returns an error message. (see code and error message below) Here are the elasticity values
2010 Aug 27
1
calculate the elasticities by linear.hypothesi commander
Dear all If I run the model and get the estimated parameter a11. Then I want to use the estimated parameter to calculate the elasticities by using the formula e11=a11/mw1-1. What I have done is using the command of linear. Hypothesis. > formulas1=dWfresh~dlnPfresh+dlnPfrozen+dlnPsmoke+dlnQP+cosL1+sinL1+cosL2 >
2006 Mar 05
2
plotting partial deriviatives
Dear R Helpers: I am trying to annotate a plot. The following code snippet works, but it is kind of a kludge since it adds the partial derivative symbols after creating the plotmath frac(). Is there a more elegant way to write a partial derivative? dev.off() plot(NA, xlim=c(-3,3), ylim=c(0,1.6), xlab="", ylab="", tck=-0.015) text(1.6, 1, expression(paste("slope =
2005 Feb 08
5
How to get variable names in a function?
Hello, applying a function to a list of variables I face the following problem: Let's say I want to compute tables for several variables. I could write a command for every single table, like bravo<-c(1,1,2,3,5,5,5,);charly<-c(7,7,4,4,2,1) table(bravo); table(charly) > table(bravo); table(charly) bravo 1 2 3 5 2 1 1 3 charly 1 2 4 7 1 1 2 2 The results are two tables with the
2010 Feb 18
1
variable substitution
Hi I would like to write a script that reads a list of variable names. These variable names are some of the column headers in a data.frame. Then I want do a for-loop to execute various operations on the specified variables in the data.frame, but can't figure out how to do the necessary variable substitution. In bash (or C) I would use "$var", but there seems to be no equivalent in
2003 Oct 08
2
Generating automatic plots
Hello, I have been trying to write a small program to generate automatic plots. What I want is to draw boxplots for some variables in my data frame, contrasting with a variable called 'missing' that has value 1 if some variable in a concrete case has at least one missing value, in order to check if the cases that don't enter in my analysis are biased. The first attempt was to
2012 Mar 10
1
Treat Variable as String and a String as variables name
Dear all. I am having ten variables (let's call the four of them as Alpha, Beta, Gamma and Delta.....) For each variable I have to print around 100 (plots). E So far I was copying paste the code below many times. pdf(file="DC_Alpha_All.pdf", width=15) # First Variable is treated as string plot_dc_for_multiple_kapas(Alpha, 4, c(5, 4), coloridx=c(24, 32)) # First Variable is
2016 Dec 13
2
syntax difference clusterExport in parallel and snow
We got some errors and eventually figured out that parallel::clusterExport second argument is "varlist" while in snow::clusterExport it is "list". The user had loaded parallel first, but did something else which inadvertently loaded snow, then clusterExport failed because we had "varlist" and not "list". Are these different on purpose? pj -- Paul E.
2010 Feb 25
3
variable substitution in for loops
Friends I can't quite find a direct answer to this question from the lists, so here goes: I have several dataframes, 200+ columns 2000+ rows. I wish to script some operations to perform on some of the variables (columns) in the data frames not knowing what the column number is, hence have to refer by name. I have variable names in a text file "varlist". So, something like this:
2012 Nov 24
1
Bootstrap lmekin model
Hi,I use the 'lmekin' model of the 'kinship' package of R in order to estimate heritability. I want to estimate the confidence interval of the variance coefficient and so I should use a bootstrap simulation. The pedigree file has 1386 subjects so I create a kinship matrix [1386*1386].This is the code of R I use: kfit2 <- lmekin(IT~1+AGE +(1|ID), dati1,
2009 Oct 11
1
How do you test if a number is in a list of numbers?
Hi, I want to subset a data frame if one of the variables matches any in a list. I could of course do something like this: subset(dataset, var == 1 | var == 2 | var ==3) but that's tedious. I tried varlist = c(1,2,3,4) subset(dataset, any(var == varlist)) but it doesn't work because 'any' doesn't go row-by-row and hence always returns TRUE. Is there any simple way to do this?
2013 Feb 18
3
foreach loop, stata equivalent
Hi! I'm a recent convert from Stata, so forgive my ignorance. In Stata, I can write foreach loops (example below) foreach var of varlist p1-p14 { foreach y of varlist p15-p269 { reg `var' `y' } } It's looping p1-p15, p1-p16...., p1-p269, p2-p15, p2-p16,... p2-p269,... variable pairs. How can I write something similar in R? I 'tried' understanding the
2011 Apr 15
1
no solution yet, please help: extract p-value from mixed model in kinship package
I am making the question clear. Please help. > Dear R experts > > I was using kinship package to fit mixed model with kinship matrix. > The package looks like lme4, but I could find a way to extract p-value > out of it. I need to extract is as I need to analyse large number of > variables (> 10000). > > Please help me: > > require(kinship) > > #Generating
2013 Apr 25
1
Stochastic Frontier: Finding the optimal scale/scale efficiency by "frontier" package
Hi, I am trying to find out the scale efficiency and optimal scale of banks by stochastic frontier analysis given the panel data of bank. I am free to choose any model of stochastic frontier analysis. The only approach I know to work with R is to estimate a translog production function by sfa or other related function in frontier package, and then use the Ray 1998 formula to find the scale
2010 Nov 11
3
Evaluation puzzle
The survexp function can fail when called from another function. The "why" of this has me baffled, however. Here is a simple test case, using a very stripped down version of survexp: survexp.test <- function(formula, data, weights, subset, na.action, rmap, times, cohort=TRUE, conditional=FALSE, ratetable=survexp.us, scale=1, npoints, se.fit,
2010 Jul 16
1
read.table input array
Hello to all! I am new with R and I need your help. I'm trying to read a file which contests are similar to this: A B C T Lengths 1 4.0 0.0015258789 18 c(1,2,3) 1 1.0 0.0017166138 24 c(1,1,4) So all the columns are numeric values, except Lengths, which is supposed to be an variable length array of integers. How can I make R read them as arrays of integers?