Hi all,

I have a time series a column vector with the ordered data so that the first
column is the first observation and so on.

The fact is that I want to run a multiple regression with only intercept.

My first task is to run the regression on the first observation (1 from 276)
and at the same time the same type of regressión on the 275 data.

Then, is to run a regression on 2 of the data (the first and the second
observation) and other with the 274 rest of observations....

...

The final tram of the loop would the to run 1 regression with the 275 first
observations and one with the last observation.

I want to save each pair of regression made in each loop.

I have seen that the regression I want is

data˜1

But how Shoud I use mapply or sapply? To run avoind using loops?

Thanks in advance¡¡¡

Hope someone can send me examples similar o documents to try to make by my
own.

I attach the data.
0,044018608
-0,110930705
-0,004672806
0,036287839
0,076363838
0,184673507
0,054624796
0,004673399
-0,350369342
-0,018010741
0,04551358
0,103917907
0,003625427
0,053179293
-0,033782013
0,045388376
0,046058974
-0,026597853
-0,043024922
0,000107398
0,023316523
-0,025215586
-0,022010788
0,032180548
-0,046694162
0,04754586
0,04477713
0,050400827
-0,006016904
-0,009683332
0,060819249
0,02778801
-0,066637611
-0,015145689
-0,024107075
-0,054245015
-0,028267407
-0,106028435
0,058280299
0,048688903
0,03650455
-0,011679631
-0,118281484
-0,20053834
0,111253729
-0,006097049
-0,017805671
0,03705825
0,116787459
0,061440659
-0,012156779
0,038099168
-0,039006922
-0,016260521
0,021109252
0,022975469
-0,023373208
-0,05750481
-0,002784887
0,040829062
0,052226191
-0,038081497
-0,025343725
0,048157965
-0,09697759
-0,109103964
-0,057933746
-0,061468063
0,037968306
0,104264106
0,0007851
0,075840568
0,018310751
0,031504956
0,010294806
0,046695997
0,014182633
0,043380758
0,119688009
-0,055959275
0,082225757
-0,050393069
0,097278802
0,096262265
-0,06241493
-0,069361955
0,009030263
-0,002314697
-0,092980997
0,049805643
-0,008103107
-0,04925431
0,005615955
0,028565833
-0,062582675
-0,015542748
-0,005118238
-0,031176554
0,053190392
0,042622007
-0,002308574
0,046831888
0,017443516
-0,016442058
-0,029890565
0,068621158
0,033791768
0,02816927
0,04733688
-0,015027352
0,056886729
0,00701932
0,036404299
-0,069112649
0,011523185
0,046143139
0,021396424
0,080506631
0,099234631
0,032944569
-0,004136244
0,022154347
0,085647286
0,064147326
0,088601439
-0,010758421
-0,041759107
0,106954082
-0,130488552
0,082933574
0,045583222
0,092556088
0,111759282
0,137223967
-0,018135555
-0,001992872
0,013962033
0,033656114
-0,238781644
-0,073829719
0,136588007
0,091739764
0,019618638
0,004280924
0,01192401
-0,026002073
0,023809079
0,00966702
0,014420507
-0,084361973
0,043157025
-0,029042726
0,022433195
0,117683799
0,060488801
-0,071776846
0,14977833
-0,053093935
-0,039923432
-0,070383431
-0,010080105
-0,004708031
0,032977872
0,005981323
-0,055088036
-0,11747309
-0,011427573
0,104767572
-0,057430588
-0,025781265
0,047488379
-0,027029374
-0,06774412
-0,045910911
-0,018915992
-0,129004138
0,061033102
0,073197048
0,003925481
-0,042224171
0,010515422
0,013939634
-0,011619177
-0,025398309
-0,139755653
-0,100934239
0,029391158
-0,169608455
0,122474857
0,085228942
-0,102065325
-0,014886045
0,008654874
-0,021719655
0,100245677
0,002923529
0,05288993
0,028686871
0,006999252
-0,059040373
0,06159641
0,017105131
0,064693628
0,02460056
0,039500045
-0,028438984
0,011334728
-0,018695158
0,014840398
-0,019878636
-0,00630829
0,020090369
0,047323011
0,032110196
0,04364419
0,015635647
0,017953842
-0,014177333
-0,028172111
0,046186181
0,037078109
0,033412158
-0,01060409
0,077357646
-0,030047737
0,006080317
0,016542034
0,033925463
0,055729017
0,009629233
0,003217278
-0,04752756
0,018140532
0,023102872
0,027269068
0,063020762
0,06134336
0,006977708
0,021232554
0,028343657
-0,021166281
0,027229002
-0,018410862
0,064309793
-0,028948397
-0,006034826
-0,022034755
0,006656068
0,086310803
-0,008252707
-0,037338464
-0,137718886
-0,004439502
0,0074586
0,039114909
-0,014409429
-0,12138671
-0,013783522
-0,014753157
-0,063454316
-0,186727152
-0,022789532
0,031505279
-0,084533081
-0,103319305
0,025150491
0,145392947
0,041853549
0,037845252
0,103498303
0,045912241
0,033824999
-0,029461496
0,019940382
0,025042967
-0,097638684
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to