[R] Odp: SLR 500 Random Samples
petr.pikal at precheza.cz
Mon Feb 15 08:58:39 CET 2010
seems to me like a homework for bootstraping
?boot, ?lm, ?confint
If not, some code how you tried to solve it yourself and how it did not
worked as expected would be greatly appreciated.
r-help-bounces at r-project.org napsal dne 15.02.2010 05:41:14:
> Consider the SLR y = 50 + 10x + e where e is NID(0.16). n = 20 pairs of
> observations. Generate 500 samples of 20 obersvations drawing 1
> drawing one observation from each level of x = .5,1,1.5 ... 10 for each
> A) For each sample computer the least squares regression estimates of
> slop and intercept. Construct histograms of the sample values of B_0_hat
> B) For each sample compute an estimate of E(y|x=5) Construct a histogram
> from these estimates.
> C) For each sample compute a 95% CI on the slope. How manyt of these
> the true value B_1 = 10
> D) For each estimate of E(y|x=5) in part b compute the 95% CI. How many
> these intervals contain the trye value of E(y|x=5)=100?
> I have 0 idea how to do these as R was not a prereq for my regression
> but is needed for these problems. As much help as you could offer would
> View this message in context:
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help