similar to: linear regression and testing the slope

Displaying 20 results from an estimated 300 matches similar to: "linear regression and testing the slope"

2009 Mar 25
5
histogram plots with many different samples
Dear R users, I would like to draw some histograms as seen in the page whose address I wrote below. I searched through the web a lot and I found a page which describes how I can do it for older versions of R. For newer versions they recommend to install the package R.basics in R.clusters but this does not exist. The address of the web page is http://www1.maths.lth.se/help/R/plot.histogram/
2009 Feb 04
3
chi squared goodness of fit test with R
Dear R users, I am a master student in Mathematics and I am writing my thesis in statistics. I need to use R and unfortunately I do not have any experience with a computer program. Could you please help me about chi squared goodness of fit test with R? In R-help website I saw a message about how to do that but I do not know how to cut the data into bins and calculate the expected numbers in each
2009 Feb 23
1
incomplete data analysis
Dear R users, First of all, thank you for your help about goodness of fit tests. I have another set of data and i am sure it is incomplete. I searched for incomplete data analysis with R but I could not find any suggestion, or method. Lets say (totally hypothetical situation) from a distribution you can generate a continuous random sample between the numbers 0 and 100. but I have data from 20 to
2010 Feb 20
3
aggregating using 'with' function
Hi All, I am interested in aggregating a data frame based on 2 categories--mean effect size (r) for each 'id's' 'mod1'. The 'with' function works well when aggregating on one category (e.g., based on 'id' below) but doesnt work if I try 2 categories. How can this be accomplished? # sample data id<-c(1,1,1,rep(4:12)) n<-c(10,20,13,22,28,12,12,36,19,12,
2009 Jul 08
2
Formatting a Table
I've created a short program to print a table of learning curve factors. However, I cannot figure out how to format the table to: 1) Get rid of the [1]s in the first column and replace it with the values of N. 2) Line up the first row with the factors (decimal fractions). Thanks for any help. The complete program and output is as follows: > Lc<-seq(0.70,0.95,0.05) #Specify learning
2006 Oct 15
4
Hide line ends behind unfilled circles?
Dear r-helpers, xx <- c(0.000, 0.210, 0.714, 0.514, 1.000, 0.190, 0.590, 0.152) yy <- c(0.000, 0.265, 0.256, 0.521, 0.538, 0.761, 0.821, 1.000) aa <- c(19, 19, 19, 21, 19, 21, 21, 21) x0 <- xx[c(1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 6, 6, 7)] y0 <- yy[c(1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 6, 6, 7)] x1 <- xx[c(2, 3, 3, 4, 6, 4, 5, 5, 6, 7, 7, 7, 8, 8)] y1 <- yy[c(2, 3, 3, 4, 6, 4, 5,
2006 Jun 13
2
Garch Warning
Dear all R-users, I wanted to fit a Garch(1,1) model to a dataset by: >garch1 = garch(na.omit(dat)) But I got a warning message while executing, which is: >Warning message: >NaNs produced in: sqrt(pred$e) The garch parameters that I got are: > garch1 Call: garch(x = na.omit(dat)) Coefficient(s): a0 a1 b1 1.212e-04 1.001e+00 1.111e-14 Can any one
2011 Mar 29
0
Plotting 95% Confidence Intervals around RMA slope
Hi, I'm regressing various body dimensions upon body mass using the 'lmodel2' function, as I'm keen to obtain both OLS and RMA slope values. I also wish to create a plot of the regressions, with the 95% confidence interval of both the slope and intercept. I know how to plot 95% ci bands of the OLS slope using lm with the 'predict' function and 'matlines'. Does
2007 Nov 06
0
Bootstrap CI of Slope in a Weighted Simple Linear Regression
Greetings, I would like to use the "boot" function to generate a bootstrap confidence interval for the slope in a SLR that has a zero intercept. My attempt to do this is shown below. Is this the correct implementation of the boot function to solve this problem? In particular, should I be doing anything with the residuals in the "bs" function (e.g., using weighted residuals)?
2008 Dec 12
1
How can we predict differences in a slope, given that the random component was significant?
Dear R users, Using R lme function, I found that both fixed and random effects of variable A on variable B are significant. Now, I'd like to analyze what variables are predicting differences in the slope. In other words, I'd like to know what variables (e.g., variable C) are predicting individual differences in the effects of A on B. I have many data points for A and B for each
2010 Jul 23
1
calculate slope of line
Dear All, I fear that this is a really easy question but I do seem to go around in circles.. I have 2 points on a plot and would like to calculate the slope of the line drawn through these 2 points. that cant be so hard?! Thank you in advance, Katrin -- Katrin Fleischer Vrije Universiteit Amsterdam Faculty of Earth and Life Sciences Subdepartment Hydrolgy and Geo-Environmental Sciences Room
2012 Oct 26
0
Problems getting slope and intercept to change when do multiple reps.
library(ROCR) n <- 1000 fitglm <- function(iteration,intercept,sigma,tau,beta){ x <- rnorm(n,0,sigma) ystar <- intercept+beta*x z <- rbinom(n,1,plogis(ystar)) xerr <- x + rnorm(n,0,tau) model<-glm(z ~ xerr, family=binomial(logit)) *int*<-coef(model)[1] *slope*<-coef(model)[2] # when add error you are suppose to get slightly bias slope. However when I change
2005 Mar 01
1
constraining initial slope in smoother.spline
Hello. I want to fit a smoother spline (or an equivalent local regression method) to a series of data in which the initial value of the 1st derivative (slope) is constrained to a specific value. Is it possible to do this? If so, how? Bill Shipley [[alternative HTML version deleted]]
2017 Aug 09
0
Random slope random intercept plot after clmm regression
0down votefavorite <https://stats.stackexchange.com/questions/296569/how-to-obtain-random-slope-random-intercept-plots-for-categorical-response-varia#> I'm trying to generate a random slope random intercept plot after ordinal regression using the clmmfunction from the ordinal package in R. I have aggression levels which are categorical with six levels. Earlier, I made random intercept
2017 Sep 29
0
Error in Lordif: slope is missing or negative
Hi all I am not an experienced user of R. I am trying to perform DIF analysis using Lordif and I get the follow error: > GroupDIF <- lordif(resp.data=Resp, group=Group, criterion="R2", pseudo.R2="McFadden", R2.change=0.02) Iteration: 500, Log-Lik: -137340.437, Max-Change: 0.00119 EM cycles terminated after 500 iterations. (mirt) | Iteration: 1, 14 items flagged for DIF
2002 Mar 10
1
multiple pairwise slope comparisons
Hello, I have a linear model with different slopes for different treatment groups. I need to pairwise compare the different slope estimates for the different treatment groups. Is there a package that does pairwise comparisons of slope coefficients, making the appropriate adjustments in the P values? Thanks, John. -- ========================================== John Janmaat Department of
2003 Aug 11
0
Gradient of the slope of a surface
Hello All I am currently looking at spatial data - Chorophyll A concentration in sea water over a wide geographic area. These data are used to determine the location of ocean fronts and hence where tuna are located. A front is identified by a steep gradient in the change in chloroA concentration. I have been looking at these data qualitatively using persp, contour, and image but would like to
2007 Apr 09
1
testing differences between slope differences with lme
hello i have a mixed effect model which gives slope and intercept terms for 6 groups (diagnosis (3 levels) by risk group(2 levels)). the fixed part of the model is -- brain volume ~ Diagnosis + Risk Group + (Risk Group * age : Diagnosis) - 1 thus allowing risk group age/slope terms to vary within diagnosis and omitting a nonsignificant diagnosis by risk group intercept (age was centered)
2007 Oct 15
2
Linear regression and slope from 1
Dear R-Users, I am new to R, so please excuse the ignorance. I have data: x (2.14, 2.41, 1.09, 0.17, 8.18) y (3.81, 5.13, 0.63, 0.75, 6.35) I would like to use simple linear regression and test 2 things: 1) slope of line of best fit is statistically different from 1 2) y-intercept is statically different from 0 Could anyone provide me with the R terminology to do this? Thanks so much, Dan
2007 Nov 08
1
ggplot2 geom_abline slope not working?
I am learning ggplot2, and need your help. When I try > p <- ggplot(mtcars, aes(x = wt, y=mpg)) + geom_point() > p + geom_abline(slope=5) (from http://had.co.nz/ggplot2/geom_abline.html) the slope of the abline does not change, but this works: > p + geom_abline(intercept=20) In order to have slope work, I have to use > p + geom_abline(aes(slope=5)) Is it a bug, or is there